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
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public void setDistinct(boolean distinct) { this.distinct = distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public String getProductVersion();", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "public void setVersion(String version) {\n\t\t\r\n\t}", "String getVersionFilter(String tableAlias);", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.68304133", "0.6393708", "0.6384752", "0.63761765", "0.6367759", "0.6222356", "0.6067583", "0.6066662", "0.60259044", "0.59848064", "0.5975453", "0.5956886", "0.5956886", "0.5956886", "0.5956886", "0.5956886", "0.5940845", "0.5889835", "0.5880093", "0.5801687", "0.57918274", "0.5786315", "0.57769084", "0.57742923", "0.57742923", "0.57742923", "0.57742923", "0.5772381", "0.5766353", "0.576271", "0.57495266", "0.57424897", "0.57275593", "0.5721046", "0.5714189", "0.5713738", "0.57137287", "0.57092476", "0.5707374", "0.5693552", "0.5690621", "0.5690621", "0.5690621", "0.5690621", "0.5690621", "0.5690621", "0.5690267", "0.5687478", "0.56647277", "0.5662183", "0.5662183", "0.5662183", "0.56614274", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.5649743", "0.5638272", "0.5638272", "0.56276906", "0.5626148", "0.56224304", "0.562217", "0.56165314", "0.5615688", "0.5615688", "0.5615688", "0.5611435", "0.56080234", "0.5604329", "0.56014466", "0.559271", "0.55922866", "0.559028", "0.5589148", "0.5577428", "0.55768025", "0.55768025", "0.5566507", "0.5563999", "0.5562208", "0.5561963", "0.5561963", "0.5548092", "0.5542109", "0.55336237", "0.5533359", "0.5532874", "0.5531395", "0.55305326", "0.55268806", "0.55175537", "0.5515666", "0.5513795", "0.5512378", "0.5495632" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public boolean isDistinct() { return distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.6828705", "0.6393162", "0.63825506", "0.63770574", "0.6367192", "0.6221846", "0.6067397", "0.6065189", "0.6023013", "0.5983748", "0.5972557", "0.5955663", "0.5955663", "0.5955663", "0.5955663", "0.5955663", "0.5937606", "0.588693", "0.5879829", "0.58024454", "0.5791238", "0.5787106", "0.57749337", "0.57713085", "0.57713085", "0.57713085", "0.57713085", "0.57701516", "0.5763202", "0.57594424", "0.5746962", "0.5739705", "0.5725181", "0.571752", "0.57108444", "0.5710437", "0.5710344", "0.57079035", "0.5704801", "0.569195", "0.5691197", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5685642", "0.56618494", "0.5661401", "0.56594795", "0.56594795", "0.56594795", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.56486577", "0.56349707", "0.56349707", "0.56266606", "0.5622617", "0.5619747", "0.5618789", "0.5617751", "0.5612265", "0.5612265", "0.5612265", "0.56089383", "0.56051797", "0.5601085", "0.5599086", "0.5589867", "0.55894285", "0.558873", "0.5587438", "0.557466", "0.5573613", "0.5573613", "0.5563884", "0.55625135", "0.5560344", "0.55586344", "0.55586344", "0.554709", "0.5539058", "0.5533458", "0.553152", "0.553114", "0.5530452", "0.55274004", "0.55256975", "0.5517219", "0.5512697", "0.55116016", "0.5508943", "0.54934585" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public List<Criteria> getOredCriteria() { return oredCriteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "public Version getVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.68282694", "0.6391548", "0.638283", "0.63750577", "0.6366563", "0.6221217", "0.60655916", "0.6064851", "0.60234106", "0.5982685", "0.5973177", "0.5954892", "0.5954892", "0.5954892", "0.5954892", "0.5954892", "0.59384537", "0.58872634", "0.5878296", "0.5800361", "0.5790003", "0.5785671", "0.5774535", "0.57719797", "0.57719797", "0.57719797", "0.57719797", "0.5770504", "0.57646275", "0.57607627", "0.57472396", "0.5739771", "0.5724912", "0.57188267", "0.5712415", "0.5711841", "0.5711465", "0.57075286", "0.5704927", "0.569148", "0.5689696", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5686058", "0.56624734", "0.5660683", "0.5659967", "0.5659967", "0.5659967", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5647891", "0.56360346", "0.56360346", "0.5625758", "0.56234896", "0.5620233", "0.56199205", "0.561633", "0.5613495", "0.5613495", "0.5613495", "0.56089544", "0.5605614", "0.5602543", "0.55999887", "0.5591356", "0.55897456", "0.5588869", "0.55879027", "0.55759746", "0.55747336", "0.55747336", "0.5564352", "0.55625635", "0.55603933", "0.5560282", "0.5560282", "0.55464405", "0.554052", "0.5533581", "0.5531257", "0.55312055", "0.5530561", "0.5528057", "0.55250156", "0.55173916", "0.5513208", "0.5511884", "0.55102986", "0.5493719" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public void or(Criteria criteria) { oredCriteria.add(criteria); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.6828057", "0.6392046", "0.6381866", "0.6375635", "0.6367022", "0.6221832", "0.60662436", "0.6063608", "0.6022423", "0.5981807", "0.5971875", "0.5953997", "0.5953997", "0.5953997", "0.5953997", "0.5953997", "0.5935702", "0.5886104", "0.5878172", "0.5801646", "0.57899404", "0.5786268", "0.57733744", "0.57703805", "0.57703805", "0.57703805", "0.57703805", "0.5769284", "0.576121", "0.5757441", "0.5746087", "0.5739221", "0.57241726", "0.5716898", "0.5710691", "0.5708473", "0.5708437", "0.57066464", "0.57038355", "0.5691065", "0.5689411", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.56841457", "0.56618106", "0.56603146", "0.565888", "0.565888", "0.565888", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.56464565", "0.5633074", "0.5633074", "0.56253475", "0.5621805", "0.56194067", "0.561695", "0.56167203", "0.56104565", "0.56104565", "0.56104565", "0.56072205", "0.5603025", "0.55991834", "0.5598401", "0.5588668", "0.5587306", "0.5586546", "0.55853075", "0.5574996", "0.5571456", "0.5571456", "0.55630016", "0.55615884", "0.55586433", "0.5557323", "0.5557323", "0.554513", "0.55377656", "0.5533407", "0.5530356", "0.5530061", "0.5529839", "0.55264634", "0.55245245", "0.55153465", "0.5511362", "0.5509758", "0.55071586", "0.54926467" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public String getProductVersion();", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "public void setVersion(String version) {\n\t\t\r\n\t}", "String getVersionFilter(String tableAlias);", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.68304133", "0.6393708", "0.6384752", "0.63761765", "0.6367759", "0.6222356", "0.6067583", "0.6066662", "0.60259044", "0.59848064", "0.5975453", "0.5956886", "0.5956886", "0.5956886", "0.5956886", "0.5956886", "0.5940845", "0.5889835", "0.5880093", "0.5801687", "0.57918274", "0.5786315", "0.57769084", "0.57742923", "0.57742923", "0.57742923", "0.57742923", "0.5772381", "0.5766353", "0.576271", "0.57495266", "0.57424897", "0.57275593", "0.5721046", "0.5714189", "0.5713738", "0.57137287", "0.57092476", "0.5707374", "0.5693552", "0.5690621", "0.5690621", "0.5690621", "0.5690621", "0.5690621", "0.5690621", "0.5690267", "0.5687478", "0.56647277", "0.5662183", "0.5662183", "0.5662183", "0.56614274", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.56572646", "0.5649743", "0.5638272", "0.5638272", "0.56276906", "0.5626148", "0.56224304", "0.562217", "0.56165314", "0.5615688", "0.5615688", "0.5615688", "0.5611435", "0.56080234", "0.5604329", "0.56014466", "0.559271", "0.55922866", "0.559028", "0.5589148", "0.5577428", "0.55768025", "0.55768025", "0.5566507", "0.5563999", "0.5562208", "0.5561963", "0.5561963", "0.5548092", "0.5542109", "0.55336237", "0.5533359", "0.5532874", "0.5531395", "0.55305326", "0.55268806", "0.55175537", "0.5515666", "0.5513795", "0.5512378", "0.5495632" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.6828705", "0.6393162", "0.63825506", "0.63770574", "0.6367192", "0.6221846", "0.6067397", "0.6065189", "0.6023013", "0.5983748", "0.5972557", "0.5955663", "0.5955663", "0.5955663", "0.5955663", "0.5955663", "0.5937606", "0.588693", "0.5879829", "0.58024454", "0.5791238", "0.5787106", "0.57749337", "0.57713085", "0.57713085", "0.57713085", "0.57713085", "0.57701516", "0.5763202", "0.57594424", "0.5746962", "0.5739705", "0.5725181", "0.571752", "0.57108444", "0.5710437", "0.5710344", "0.57079035", "0.5704801", "0.569195", "0.5691197", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5685642", "0.56618494", "0.5661401", "0.56594795", "0.56594795", "0.56594795", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.56486577", "0.56349707", "0.56349707", "0.56266606", "0.5622617", "0.5619747", "0.5618789", "0.5617751", "0.5612265", "0.5612265", "0.5612265", "0.56089383", "0.56051797", "0.5601085", "0.5599086", "0.5589867", "0.55894285", "0.558873", "0.5587438", "0.557466", "0.5573613", "0.5573613", "0.5563884", "0.55625135", "0.5560344", "0.55586344", "0.55586344", "0.554709", "0.5539058", "0.5533458", "0.553152", "0.553114", "0.5530452", "0.55274004", "0.55256975", "0.5517219", "0.5512697", "0.55116016", "0.5508943", "0.54934585" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "public Version getVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.68282694", "0.6391548", "0.638283", "0.63750577", "0.6366563", "0.6221217", "0.60655916", "0.6064851", "0.60234106", "0.5982685", "0.5973177", "0.5954892", "0.5954892", "0.5954892", "0.5954892", "0.5954892", "0.59384537", "0.58872634", "0.5878296", "0.5800361", "0.5790003", "0.5785671", "0.5774535", "0.57719797", "0.57719797", "0.57719797", "0.57719797", "0.5770504", "0.57646275", "0.57607627", "0.57472396", "0.5739771", "0.5724912", "0.57188267", "0.5712415", "0.5711841", "0.5711465", "0.57075286", "0.5704927", "0.569148", "0.5689696", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5686058", "0.56624734", "0.5660683", "0.5659967", "0.5659967", "0.5659967", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5647891", "0.56360346", "0.56360346", "0.5625758", "0.56234896", "0.5620233", "0.56199205", "0.561633", "0.5613495", "0.5613495", "0.5613495", "0.56089544", "0.5605614", "0.5602543", "0.55999887", "0.5591356", "0.55897456", "0.5588869", "0.55879027", "0.55759746", "0.55747336", "0.55747336", "0.5564352", "0.55625635", "0.55603933", "0.5560282", "0.5560282", "0.55464405", "0.554052", "0.5533581", "0.5531257", "0.55312055", "0.5530561", "0.5528057", "0.55250156", "0.55173916", "0.5513208", "0.5511884", "0.55102986", "0.5493719" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.6828057", "0.6392046", "0.6381866", "0.6375635", "0.6367022", "0.6221832", "0.60662436", "0.6063608", "0.6022423", "0.5981807", "0.5971875", "0.5953997", "0.5953997", "0.5953997", "0.5953997", "0.5953997", "0.5935702", "0.5886104", "0.5878172", "0.5801646", "0.57899404", "0.5786268", "0.57733744", "0.57703805", "0.57703805", "0.57703805", "0.57703805", "0.5769284", "0.576121", "0.5757441", "0.5746087", "0.5739221", "0.57241726", "0.5716898", "0.5710691", "0.5708473", "0.5708437", "0.57066464", "0.57038355", "0.5691065", "0.5689411", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.56841457", "0.56618106", "0.56603146", "0.565888", "0.565888", "0.565888", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.56464565", "0.5633074", "0.5633074", "0.56253475", "0.5621805", "0.56194067", "0.561695", "0.56167203", "0.56104565", "0.56104565", "0.56104565", "0.56072205", "0.5603025", "0.55991834", "0.5598401", "0.5588668", "0.5587306", "0.5586546", "0.55853075", "0.5574996", "0.5571456", "0.5571456", "0.55630016", "0.55615884", "0.55586433", "0.5557323", "0.5557323", "0.554513", "0.55377656", "0.5533407", "0.5530356", "0.5530061", "0.5529839", "0.55264634", "0.55245245", "0.55153465", "0.5511362", "0.5509758", "0.55071586", "0.54926467" ]
0.0
-1
4th step of EH override the only abstract method of AL
public void actionPerformed(ActionEvent e) { String str = e.getActionCommand(); if(str.equals("Red")) { rc++; } else if(str.equals("Green")) { gc++; } else if(str.equals("Blue")) { bc++; } repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void mo70713b();", "@Override\n\tpublic void anular() {\n\n\t}", "public abstract void afvuren();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public abstract void mo27386d();", "public abstract void mo27464a();", "public abstract void mo3994a();", "public abstract void mo4359a();", "@Override\n\tpublic void nghe() {\n\n\t}", "public abstract void mo35054b();", "public abstract void alimentarse();", "@Override\n\tpublic void e() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected void h() {}", "public abstract void mo2150a();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public abstract void mo27385c();", "public abstract void mo30696a();", "public abstract void mh();", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo6549b();", "@Override\n\tpublic void A() {\n\t\t\n\t}", "@Override\n\tpublic void A() {\n\t\t\n\t}", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public abstract void mo42330e();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "public abstract void mo42331g();", "public abstract void mo42329d();", "public abstract void mo102899a();", "public abstract void mo56925d();", "@Override\n\tpublic void effetCase() {\n\t\t\n\t}", "@Override\n\tpublic void a() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "@Override\r\n\tpublic void a1() {\n\t\t\r\n\t}", "public abstract void mo45765b();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void m15813a();", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "public /* bridge */ /* synthetic */ void mo22964h(C7059Ec ec) {\n super.mo22964h(ec);\n }", "@Override\n public void b() {\n }", "public abstract void abstractone();", "@Override\r\n public void salir() {\n }", "public abstract void mo957b();", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "public final void mo51373a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "abstract C0451h mo1607e();", "public abstract void mo53562a(C18796a c18796a);", "private void a(NativeAdData paramh)\n/* */ {\n/* 206 */ if ((this.e != null) && (paramh != null)) {\n/* 207 */ this.e.a(paramh);\n/* */ }\n/* */ }", "protected void mo6255a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public AbstractGenerateurAbstractSeule() {\r\n\t\tsuper();\r\n\t}", "public void setupAbstract() {\n \r\n }", "public void mo4359a() {\n }", "public void mo38117a() {\n }", "public void smell() {\n\t\t\n\t}", "abstract void method();", "public abstract Object mo1771a();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "abstract void sub();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public abstract int forca();", "public abstract void mo90486a(C9515Ad ad);", "abstract void uminus();", "private abstract void privateabstract();", "@Override\n\tpublic void b() {\n\n\t}", "public abstract void mo2624j();", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "public interface AbstractC0647Pn {\n void A9C(AbstractC0645Pl pl);\n\n void A9Y(Exception exc);\n}", "abstract int pregnancy();", "@Override\n public void matiz() {\n System.out.println(\"New not Abstract method\");\n }", "@Override\n public void e(int i0, int i1) {\n\n }", "public abstract EUT eut();", "public abstract void t3();", "public abstract int zzbej();", "@Override\n protected void prot() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public /* bridge */ /* synthetic */ void mo22963g(C7059Ec ec) {\n super.mo22963g(ec);\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 }", "public abstract void peel();", "public abstract void mo1184a(Object obj);", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public interface AbstractC0273Ek {\n void e();\n}", "@Override\n\tprotected void interr() {\n\t}", "public abstract void engineWork() throws Exception;" ]
[ "0.67347664", "0.6699584", "0.6672624", "0.66433215", "0.6596663", "0.65675557", "0.65365666", "0.6508219", "0.65064293", "0.64815056", "0.6481365", "0.64284056", "0.64258605", "0.6417171", "0.6413816", "0.639541", "0.63938314", "0.63904977", "0.63858944", "0.6336881", "0.6328459", "0.63250464", "0.63216305", "0.63132185", "0.63132185", "0.6311612", "0.630566", "0.62760335", "0.6271395", "0.624367", "0.6200975", "0.6194226", "0.6182058", "0.6172135", "0.61550945", "0.6152997", "0.61357665", "0.61151814", "0.61136043", "0.6108963", "0.61071104", "0.61012733", "0.6092824", "0.60772187", "0.6060815", "0.6060096", "0.6041542", "0.6036465", "0.6034555", "0.6030204", "0.60298073", "0.60093796", "0.60077", "0.59943104", "0.5991293", "0.5957932", "0.59516764", "0.5950895", "0.5944416", "0.5937728", "0.5936171", "0.59333616", "0.5928594", "0.59275305", "0.5922916", "0.59186226", "0.5908765", "0.59070647", "0.5905621", "0.5899838", "0.5881955", "0.58813906", "0.58705", "0.58615756", "0.5854154", "0.5854154", "0.58496517", "0.58458954", "0.5843937", "0.58406657", "0.58322936", "0.5822632", "0.5821927", "0.58214843", "0.58214426", "0.5821401", "0.5815154", "0.58124846", "0.5809259", "0.580787", "0.58033854", "0.5797825", "0.5795362", "0.5793406", "0.57819897", "0.578098", "0.5776707", "0.57757264", "0.57672477", "0.5765841", "0.57623154" ]
0.0
-1
Figures out reservoir size and quantile bounds
public int estimateQuantiles(List<double[]> metrics) { int rSize = Math.min(tConf.qReservoirMin, metrics.size()); int sampleSize = Math.min(rSize, tConf.qSampleSize); double curCutoffH = -1; double curCutoffL = -1; double curTolerance = -1; double[] curBW = new BandwidthSelector() .setValue(tConf.bwValue) .setMultiplier(tConf.bwMultiplier) .setUseStdDev(tConf.useStdDev) .findBandwidth(metrics); if (tConf.bwValue > 0) { log.debug("BW: {}", tConf.bwValue); } else { log.debug("BW: {}", curBW); } KDTree oldTree = null; int maxReservoirSize = Math.min( tConf.qReservoirMax, metrics.size() ); while (rSize <= maxReservoirSize) { List<double[]> curData = metrics.subList(0, rSize); if (oldTree == null) { oldTree = trainTree(curData); } Percentile pCalc = calcQuantiles( metrics.subList(0, rSize), curBW, sampleSize, oldTree, curCutoffH, curCutoffL, curTolerance ); double pT = tConf.percentile; double pDelta = confidenceFactor * Math.sqrt(pT * (1-pT) / sampleSize); double pL = pT - pDelta; double pH = Math.min(1.0, pT + pDelta); qT = pCalc.evaluate(100 * pT); if (pL > 0.0) { qL = pCalc.evaluate(100 * pL); } else { qL = 0.0; } if (qL < 0.0) { qL = 0.0; } qH = pCalc.evaluate(100 * pH); log.debug("rSize: {}, cutH: {}, cutL: {} tol: {}", rSize, curCutoffH, curCutoffL, curTolerance); log.debug("pL: {}, pT: {}, pH: {}, qL: {}, qT: {}, qH: {}", pL, pT, pH, qL, qT, qH); boolean cutoffHBad = curCutoffH <= qH && curCutoffH > 0; boolean cutoffLBad = curCutoffL >= qL && curCutoffL > 0; if (cutoffHBad) { log.debug("Bad CutoffH"); curCutoffH *= 4; } if (cutoffLBad) { log.debug("Bad CutoffL"); curCutoffL /= 4; } if (!cutoffHBad && !cutoffLBad){ if (rSize == metrics.size()) { break; } else { curCutoffH = tConf.qCutoffMultiplier * qH; curCutoffL = qL / tConf.qCutoffMultiplier; curTolerance = tConf.qTolMultiplier * qL; if (rSize < maxReservoirSize) { rSize = Math.min(4 * rSize, maxReservoirSize); } else { rSize += 1; } sampleSize = Math.min(rSize, tConf.qSampleSize); oldTree = null; } } } cutoffH = qH; cutoffL = qL; tolerance = tConf.qTolMultiplier * qL; tree = oldTree; return rSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract double getRangeSize();", "public void computeStoredBounds()\n {\n computeSRectangleBound();\n computeCircleBound();\n }", "public float getCapacity();", "int range() {\n\t\treturn mpg * fuelcap;\n\t}", "public abstract double[] getUpperBound();", "public int getBound();", "public abstract int getPageFreeSpace(int bucket);", "public void computeSRectangleBound()\n {\n this.savedSRectangleBound = getSRectangleBound();\n }", "public abstract void recalculateSnapshotBounds();", "GridEnvelope getLimits();", "Limits limits();", "public double getOccupiedRamGB () { return getRamBaseResource().getOccupiedCapacity(); }", "double bucketSize(Rounding.DateTimeUnit unit);", "public abstract long[] GetApproximateSizes(Range[] range, int n) throws IOException, DecodeFailedException, BadFormatException;", "@Override\n\tprotected double getUpperBound() {\n\t\treturn 0;\n\t}", "double bucketSize(long bucket, Rounding.DateTimeUnit unit);", "double getStepSize();", "void calculateRange() {\n //TODO: See Rules\n }", "protected void calcMinMax() {\n }", "int range(){\n return fuelcap*mpg;\n }", "private double getMarginFromBounds(int lowerBound, int upperBound) {\n return (upperBound - lowerBound) / 2.0;\n }", "public double getBaseStepSize() {\n \t\treturn 0.105;\n \t}", "private double getRngInQueue() {\n\t\tdouble rngLen = 0;\n\t\tfor(QueueEntry q : queue)\n\t\t\tif(q.getViewer().getUserId().equalsIgnoreCase(ViewerManager.getDystrackUserId()))\n\t\t\t\trngLen += q.getSong().getSongLength();\n\t\treturn rngLen / getQueueLength();\n\t}", "public void testFindRangeBounds() {\n XYBlockRenderer renderer = new XYBlockRenderer();\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series = new XYSeries(\"S1\");\n series.add(1.0, null);\n dataset.addSeries(series);\n Range r = renderer.findRangeBounds(dataset);\n }", "private double bound(int iter, Solution next) {\n return Math.exp((-1.0 * (next.getValue() - bestSol.getValue())) / denominator(iter));\n }", "QuantityExtentType getQuantityExtent();", "public Region getSiteRegionBounds() {\n int numSources = eqkRupForecast.getNumSources();\n\n double minLat = Double.POSITIVE_INFINITY;\n double maxLat = Double.NEGATIVE_INFINITY;\n double minLon = Double.POSITIVE_INFINITY;\n double maxLon = Double.NEGATIVE_INFINITY;\n\n\n //Going over each and every source in the forecast\n for (int sourceIndex = 0; sourceIndex < numSources; ++sourceIndex) {\n // get the ith source\n ProbEqkSource source = eqkRupForecast.getSource(sourceIndex);\n int numRuptures = source.getNumRuptures();\n\n //going over all the ruptures in the source\n for (int rupIndex = 0; rupIndex < numRuptures; ++rupIndex) {\n ProbEqkRupture rupture = source.getRupture(rupIndex);\n\n RuptureSurface rupSurface = rupture.getRuptureSurface();\n\n //getting the iterator for all points on the rupture\n ListIterator it = rupSurface.getLocationsIterator();\n boolean rupInside = false;\n //looping over all the rupture pt locations and if any of those lies\n //within the provided distance range then include the rupture in the list.\n while (it.hasNext()) {\n Location ptLoc = (Location) it.next();\n if (region.contains(ptLoc)) {\n rupInside = true;\n break;\n }\n }\n it = rupSurface.getLocationsIterator();\n while (it.hasNext() && rupInside) {\n Location ptLoc = (Location) it.next();\n double lat = ptLoc.getLatitude();\n double lon = ptLoc.getLongitude();\n double depth = ptLoc.getDepth();\n if (lat < minLat)\n minLat = lat;\n if (lat > maxLat)\n maxLat = lat;\n if (lon < minLon)\n minLon = lon;\n if (lon > maxLon)\n maxLon = lon;\n if (depth > maxDepth)\n maxDepth = depth;\n }\n }\n }\n return new Region(\n \t\tnew Location(minLat, minLon),\n \t\tnew Location(maxLat, maxLon));\n }", "double getMaxTfCapacity();", "private void initExplorationBounds() {\n switch (configuration.getCoverageCriteria()) {\n case GOAL_COVERAGE:\n case BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENTAL_OBJECT_SCOPE :\n configuration.getMaximumObjectScope()\n );\n configuration.setLoopUnroll(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENAL_LOOP_UNROLL :\n configuration.getMaximumLoopUnroll()\n );\n break;\n case CLASS_COVERAGE:\n case DUAL_CLASS_BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.getMaximumObjectScope());\n configuration.setLoopUnroll(configuration.getMaximumLoopUnroll());\n break;\n }\n }", "public abstract Rectangle getSnapshotBounds();", "public BigDecimal getLiterAllocation();", "int calculateCapacity(int[] vesselArray);", "public interface SizedBucketAggregator {\n /**\n * Reports size of the particular bucket in requested units.\n */\n double bucketSize(long bucket, Rounding.DateTimeUnit unit);\n\n /**\n * Reports size of all buckets in requested units. Throws an exception if it is not possible to calculate without knowing\n * the concrete bucket.\n */\n double bucketSize(Rounding.DateTimeUnit unit);\n}", "public float getUpperBound()\n {\n return fUpperBound;\n }", "public void statistics(){\n // calculate N\n for (int k=0 ; k<K ; ++k){\n N[k] = 0.0;\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv =X.get(n);\n N[k] = N[k] + sv.getVoxels().length*r.getEntry(n, k);\n }\n N[k] = N[k] + .000001;\n }\n\n \n // calculate xBar\n for (int k=0 ; k<K ; ++k){\n xBar[k].set(0.0);\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n double rnk = r.getEntry(n, k);\n RealVector x = sv.getCenter().mapMultiply(rnk*sv.getVoxels().length);\n xBar[k] = xBar[k].add(x);\n }\n xBar[k].mapDivideToSelf(N[k]);\n } \n \n // calculate the S\n for (int k=0 ; k<K ; ++k){\n for (int row=0 ; row<X.getD() ; ++row){\n for (int col=0 ; col<X.getD() ; ++col){\n S[k].setEntry(row, col, 0.0);\n }\n }\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n for (RealVector vox : sv.getVoxels()){\n RealVector del = vox.subtract(xBar[k]); \n S[k] = S[k].add(del.outerProduct(del).scalarMultiply(r.getEntry(n, k))); \n }\n }\n S[k] = S[k].scalarMultiply(1.0/N[k]);\n }\n }", "protected void computeBounds() {\r\n bounds = new Rectangle(layout.location.x - icon.getIconWidth() / 2,\r\n layout.location.y - icon.getIconHeight() / 2, icon.getIconWidth(), icon.getIconHeight()).union(labelBox)\r\n .union(ports[0].getBounds()).union(ports[1].getBounds()).union(ports[2].getBounds())\r\n .union(component.getType() == TemplateComponent.TYPE_CHANNEL\r\n ? ports[3].getBounds().union(supHalo.getBounds())\r\n : ports[3].getBounds());\r\n }", "private void computeDimensions(int bitResolution) {\n\t\tint dimension = (int) Math.round(Math.sqrt(bitResolution + 1));\n\n\t\t// width //height\n\t\tint normalBound = (dimension - 1) * (dimension);\n\t\tint higherBound = (dimension - 1) * (dimension + 1);\n\n\t\tthis.width = dimension;\n\t\tthis.height = dimension;\n\n\t\tif (higherBound < bitResolution) {\n\t\t\tthis.width++;\n\t\t\tthis.height++;\n\t\t} else {\n\t\t\tif (normalBound < bitResolution || (normalBound - bitResolution) > (higherBound - bitResolution)) {\n\t\t\t\tthis.height++;\n\t\t\t}\n\t\t}\n\n\t}", "private static int calculateInSampleSize(Options options, int reqWidth, int reqHeight) {\n\t\tfinal int height = options.outHeight;\r\n\t\tfinal int width = options.outWidth;\r\n\t\tint inSampleSize = 1;\r\n\r\n\t\tif (height > reqHeight || width > reqWidth) {\r\n\t\t\tif (width > height) {\r\n\t\t\t\tinSampleSize = Math.round((float) height / (float) reqHeight);\r\n\t\t\t} else {\r\n\t\t\t\tinSampleSize = Math.round((float) width / (float) reqWidth);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn inSampleSize;\r\n\t}", "void TruncPopulationAvgSize(double scale){\n\t\t\tint i,j;\n\t\t\tnode[] _nm;\n\t\t \tdouble sumSize,sizeThreshold; \t\n\t\t \t\n//\t\t \tdouble fitnessBefore;\n//\t\t \tdouble fitnessAfter;\n\t\t \t\n//\t\t\tdouble TheBestPrune, TheBestNotPrune;\n//\t\t \tdouble sumNotPrune, sumBeforePrune, sumAfterPrune;\n\t\t \t\n//\t\t \tlong starttime = System.currentTimeMillis();\n\t\t \t\n\t\t \tg_numberTrunc=0;\t\t \n\t\t \tg_TimePartTrunc=0.0;\n\t\t \tg_numTruncFalse=0;\n\t\t \t\n\t\t \t \t\t \n\t\t \tsumSize = oldpop[0].size;\n\t\t\t\n\t\t\tfor(i = 1; i < poplen; i++) {\t\t\t\t\n\t\t\t\tsumSize += oldpop[i].size;//\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(\"Tong:\"+sumSize);\n\t\t\tsumSize=sumSize /poplen;\n//\t\t\tSystem.out.println(\"Avg:\"+sumSize);\n\t\t\tsizeThreshold=sumSize+scale*sumSize;\n//\t\t\tSystem.out.println(\"Nguong:\"+sizeThreshold);\n\t\t \t\n//\t\t \tSystem.out.println(numIndiviadual);\n//\t\t\tTheBestPrune=HUGE_VAL;\n//\t\t \tTheBestNotPrune=HUGE_VAL;\n//\t\t \tsumNotPrune=0.0;\n//\t\t \tsumBeforePrune=0.0;\n//\t\t \tsumAfterPrune=0.0;\n\t\t \t\n\t\t\tfor(i = 0; i < poplen; i++){\n\t\t\t\t\n\t\t\t\tif(oldpop[i].size>sizeThreshold){\n//\t\t\t\t\tSystem.out.println(\"Vi tri:\"+i);\n\t\t\t\t\tindividual[] m_individual=new individual[1];\n\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\n\t\t\t\t\t//=====\n//\t\t\t\t\tif(oldpop[i].evaluated==FALSE){\n//\t\t\t\t\t\tfitnessBefore=ComputeRF(oldpop[i]);\n//\t\t\t\t\t}\n//\t\t\t\t\telse\n//\t\t\t\t\t{\n//\t\t\t\t\t\tfitnessBefore=oldpop[i].oldfitness;\n//\t\t\t\t\t}\n\t\t\t\t\t//====\n\t\t\t\t\t\n\t//\t\t\t\tSystem.out.println(\"Trước+\"+oldpop[i].size);\n\t\t\t\t\tif(this.TruncateTreeGrow(oldpop[i], m_individual,_mt,_nm)==TRUE){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\toldpop[i]=new individual();\n\t\t\t\t\t\toldpop[i].CopyIndividual(m_individual[0], TRUE);\t\t\t\n\t\t\t\t\t\toldpop[i].evaluated=FALSE;\n\t\t//\t\t\t\tSystem.out.println(\"Sau+\"+oldpop[i].size);\n//\t\t\t\t\t\tfitnessAfter=ComputeRF(oldpop[i]);\n//\t\t\t\t\t\toldpop[i].oldfitness=fitnessAfter;\n//\t\t\t\t\t\toldpop[i].fitness=fitnessAfter;\n//\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t\t\n\t\t\t\t\t\tg_numTrunc++;\n\t\t\t\t\t\t//=====================\n//\t\t\t\t\t\tsumBeforePrune=sumBeforePrune+fitnessBefore;\n//\t\t\t\t\t\tsumAfterPrune=sumAfterPrune+fitnessAfter;\t\t\t\t\t\n//\t\t\t\t\t\tif(TheBestPrune>fitnessAfter){\n//\t\t\t\t\t\t\tTheBestPrune=fitnessAfter;\n//\t\t\t\t\t\t}\n\t\t\t\t\t\t//================================\n\t\t\t\t\t\t\n//\t\t\t\t\t\tDecreaseAllFitness=DecreaseAllFitness+(fitnessBefore-fitnessAfter);\n//\t\t\t\t\t\tif(fitnessAfter<=fitnessBefore){\n//\t\t\t\t\t\t\tg_numOfBetter++;\t\t\t\t\t\t\n//\t\t\t\t\t\t\tDecreaseFitness=DecreaseFitness+(fitnessBefore-fitnessAfter);\n//\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n//\t\t\t\t\telse{\n//\t\t\t\t\t\tsumNotPrune=sumNotPrune+fitnessBefore;\n//\t\t\t\t\t\tif(TheBestNotPrune>fitnessBefore){\n//\t\t\t\t\t\t\tTheBestNotPrune=fitnessBefore;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\n//\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\tif(oldpop[i].evaluated==FALSE){\n//\t\t\t\t\t\tfitnessBefore=ComputeRF(oldpop[i]);\n//\t\t\t\t\t}\n//\t\t\t\t\telse\n//\t\t\t\t\t{\n//\t\t\t\t\t\tfitnessBefore=oldpop[i].oldfitness;\n//\t\t\t\t\t}\n//\t\t\t\t\t\n//\t\t\t\t\tsumNotPrune=sumNotPrune+fitnessBefore;\n//\t\t\t\t\tif(TheBestNotPrune>fitnessBefore){\n//\t\t\t\t\t\tTheBestNotPrune=fitnessBefore;\n//\t\t\t\t\t}\t\t\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//new\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tnumberTrunc[gen]=g_numberTrunc;\t\t\t\n\t\t\tTimePartTrunc[gen]=g_TimePartTrunc;\n\t\t\t\n\t\t\t\n\t\t\t\n//\t\t\t// Gan cac gia tri \n//\t\t\tavgFitnessNotPrune[gen]=sumNotPrune/(1.0*(poplen-g_numTrunc));\n//\t\t\t\t\t\t\n//\t\t\tavgFitnessBeforePrune[gen]=sumBeforePrune/(1.0*g_numTrunc);\t\t\t\n//\t\t\tavgFitnessAfterPrune[gen]=sumAfterPrune/(1.0*g_numTrunc);\n//\t\t\t\t\t\t\n//\t\t\tTheBestFitnessNotPrune[gen]=TheBestNotPrune;\n//\t\t\tTheBestFitnessPrune[gen]=TheBestPrune;\n//\t\t\t\t\n//\t\t\tif(TheBestNotPrune<TheBestPrune){\n//\t\t\t\tTheBestInNotPrune[gen]=1;\n//\t\t\t}\n//\t\t\telse{\n//\t\t\t\tTheBestInNotPrune[gen]=0;\n//\t\t\t}\n//\t\t\t\t\t\t\t\t\t\n//\t\t\tavgFitnessAllPopBefore[gen]=(sumNotPrune+sumBeforePrune)/(1.0*poplen);\t\t\t\n//\t\t\tavgFitnessAllPopAfter[gen]=(sumNotPrune+sumAfterPrune)/(1.0*poplen);\n//\t\t\t\t\t\t\n//\t\t\t\t\t\t\n//\t\t\t\t\t\tif(sumBeforePrune<sumAfterPrune)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tTheBestAvgInAllPopBefore[gen]=1;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tTheBestAvgInAllPopBefore[gen]=0;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\n//\t\t\t\t\t\t\n//\t\t\t\t\t\tif(avgFitnessNotPrune[gen]<avgFitnessAfterPrune[gen])\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tTheBestAvgInNotPrune[gen]=1;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tTheBestAvgInNotPrune[gen]=0;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//===========================\n\t\t}", "double getSize();", "private List<Rectangle> getRectanglesToConsiderForBranchingVarCalculation () {\r\n \r\n List<Rectangle> rectanglesToConsider = new ArrayList<Rectangle> ();\r\n \r\n //for every constraint, see if it has rects at the best lp\r\n \r\n for (Map <Double, List<Rectangle>> rectMap: myInfeasibleRectanglesList) {\r\n for (List<Rectangle> rectList : rectMap.values()) { \r\n \r\n rectanglesToConsider.addAll(rectList );\r\n \r\n } \r\n }\r\n \r\n return rectanglesToConsider;\r\n }", "private int getBufferSize() {\n int maxBandOff = bandOffsets[0];\n for (int i = 1; i < bandOffsets.length; i++) {\n maxBandOff = Math.max(maxBandOff, bandOffsets[i]);\n }\n\n if (maxBandOff < 0 || maxBandOff > (Integer.MAX_VALUE - 1)) {\n throw new IllegalArgumentException(\"Invalid band offset\");\n }\n\n if (pixelStride < 0 || pixelStride > (Integer.MAX_VALUE / width)) {\n throw new IllegalArgumentException(\"Invalid pixel stride\");\n }\n\n if (scanlineStride < 0 || scanlineStride > (Integer.MAX_VALUE / height)) {\n throw new IllegalArgumentException(\"Invalid scanline stride\");\n }\n\n int size = maxBandOff + 1;\n\n int val = pixelStride * (width - 1);\n\n if (val > (Integer.MAX_VALUE - size)) {\n throw new IllegalArgumentException(\"Invalid pixel stride\");\n }\n\n size += val;\n\n val = scanlineStride * (height - 1);\n\n if (val > (Integer.MAX_VALUE - size)) {\n throw new IllegalArgumentException(\"Invalid scan stride\");\n }\n\n size += val;\n\n return size;\n }", "private void initLimits() {\n lowerLimit1 = quarterHolderWidth;\n lowerLimit2 = (2 * quarterHolderWidth);\n lowerLimit3 = (3 * quarterHolderWidth);\n lowerLimit4 = holderWidth;\n }", "private float[] getBounds(TileCoolantPipe tile) {\n float[] bounds = new float[6];\n boolean[] connected = tile.getConnectedSides();\n float hDiameter = cableDiameter / 2.0F;\n for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {\n float width = 0.5F;\n if (!connected[dir.ordinal()]) {//(sides & dir.flag) != dir.flag) {\n width = hDiameter;\n }\n if (dir.ordinal() % 2 == 0) {\n width *= -1;\n }\n bounds[dir.ordinal()] = 0.5F + width;\n }\n return bounds;\n }", "public Bounds getProbabilityBounds();", "public abstract Rectangle getSnapshotSquareBounds();", "@Override\n\tprotected void setUpperBound() {\n\t\t\n\t}", "BigDecimal getCacheSpaceAvailable();", "private double loadFactor()\n {\n double bucketsLength = buckets.length;\n return currentSize / bucketsLength;\n }", "public double getTotalRamGB () { return n.getResources(RESOURCETYPE_RAM).stream().mapToDouble(r->r.getCapacity()).sum (); }", "@Override\n public int requestAvailableCapacity() {\n int total = facility.getCapacity();\n for (Facility facility : facilities) {\n total += facility.getCapacity();\n }\n return total;\n }", "private int calculateResizeThreshold() {\n\t\treturn (buffer.length >> 2) * 3;\n\t}", "public V getUpperBound();", "double CalcRager(double amount, double size, double sg, double time, double AA) {\n \t\tdouble ibu, utilization, ga;\n \t\t// should be tanh:\n \t\tdouble x = (time - 31.32) / 18.27;\n \t\t// tanh:\n \t\tdouble tanhx = (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));\n \t\tutilization = 18.11 + (13.86 * tanhx / 18.27);\n\t\tga = sg < 1.050 ? 0.0 : ((sg - 1.050) / 0.2);\n \t\tibu = amount * (utilization / 100) * (AA / 100.0) * 7490;\n \t\tibu /= size * (1 + ga);\n \t\treturn ibu;\n \t}", "public double getRange(){\n\n double range = fuelRemaining * fuelEconomy;\n return range;\n }", "public void findHighestPowerUnitAnySize() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.findHighestPowerUnitAnySize()\");\r\n\t\tfor (int i=1; i<=300; i++) {\r\n//\t\t\tcurrentGrid = new ShrinkingPowerGrid(i, 300);\r\n\t\t\tfindHighestPowerUnit(i);\r\n//\t\t\tpreviousGrids.add(currentGrid);\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}", "int xBins();", "@Override\n public long estimateSize(){\n return ((long)upTo)-from+last;\n }", "double generate(double i_load, double cap, GridTime gt) {\n \r\n double max_boundary = cap * Math.min(1., prev_load_perc + rampperc); //These in MW\r\n double min_boundary = cap * Math.max(0., prev_load_perc - rampperc);\r\n \r\n \r\n //Determine load to ramp generator to\r\n if (i_load >= max_boundary) {\r\n prev_load_perc = Math.min(1., prev_load_perc + rampperc);\r\n i_load -= max_boundary;\r\n }\r\n else if (i_load <= min_boundary) {\r\n prev_load_perc = Math.max(0., prev_load_perc - rampperc);\r\n i_load -= min_boundary;\r\n }\r\n else {\r\n prev_load_perc = Math.max(0., Math.min(1., i_load / cap));\r\n i_load = 0.;\r\n }\r\n \r\n return i_load;\r\n }", "private Rectangle computeGrabRect() {\n\t\tint grabWidth = (int) ((double) magnifierSize.width / zoom);\n\t\tint grabHeight = (int) ((double) magnifierSize.height / zoom);\n\t\t// upper left corner is current point\n\t\treturn new Rectangle(point.x-grabWidth/2, point.y-grabHeight/2, grabWidth, grabHeight);\n\t}", "abstract int calculateMinimumSize(int axis);", "private void initSnapLimits() {\n int halfInterval = quarterHolderWidth / 2;\n snapLimit0 = halfInterval;\n snapLimit1 = lowerLimit1 + halfInterval;\n snapLimit2 = lowerLimit2 + halfInterval;\n snapLimit3 = lowerLimit3 + halfInterval;\n }", "private double checkBounds(double param, int i) {\n if (param < low[i]) {\n return low[i];\n } else if (param > high[i]) {\n return high[i];\n } else {\n return param;\n }\n }", "public int calcKernelSize() {\n\t\treturn 1+(int)Math.round(getStd()*3)*2;\n\t}", "public void computeCircleBound()\n {\n this.savedCircleBound = getCircleBound();\n }", "abstract int calculateMaximumSize(int axis);", "private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}", "public int getCapacity( )\n {\n // Implemented by student.\n }", "public int rangeSize() {\n return Math.abs(max - min);\n }", "public Dimension getSize() {\n\t\t\t\tfor(Rectangle rec : boxes){\r\n\t\t\t\t\tbounds.union(rec);\r\n\t\t\t\t}\r\n\t\t\t\treturn bounds.getSize();\r\n\t\t\t}", "private int computeSampleSizeLarger(double w, double h) {\n\t\tdouble initialSize = Math.max(w / UPPER_BOUND_WIDTH_PIX, h\n\t\t\t\t/ UPPER_BOUND_HEIGHT_PIX);\n\t\tif (initialSize <= 2.0f) {\n\t\t\treturn 1;\n\t\t} else if (initialSize < 3.0f) {\n\t\t\treturn 2;\n\t\t} else if (initialSize < 4.0f) {\n\t\t\treturn 3;\n\t\t} else if (initialSize < 5.0f) {\n\t\t\treturn 4;\n\t\t} else if (initialSize < 6.0f) {\n\t\t\treturn 5;\n\t\t} else if (initialSize < 7.0f) {\n\t\t\treturn 6;\n\t\t} else if (initialSize < 8.0f) {\n\t\t\treturn 7;\n\t\t} else {\n\t\t\treturn 8;\n\t\t}\n\t}", "double getLeftoverMemoryPercentile() {\n return MathUtils.toPercentile(getLeftoverMemory(), pm.getMemory());\n }", "public double getOccupiedHdGB () { return getHdBaseResource().getOccupiedCapacity(); }", "private void initGeneStatusDistributionRangeVector() {\n\t\tfor (int i = 0; i < GATracker.GENE_STATUS_DISTRIBUTION_SIZE; i++) {\n\t\t\t// Rounding the number off to the 4 significand digits\n\t\t\tgene_status_distribution_range[i] = Math.round(2*Math.abs(Math.sin(i*Math.PI/180)*10000))/10000.0;\n\t\t}\n\t}", "Integer backlogCapacity();", "public float[] getBounds() {\r\n\t\tfloat[] bounds = {x_ - width_/ 2, x_ + width_ / 2, y_ - height_ / 2, y_ + height_ / 2};\r\n\t\treturn bounds;\r\n\t}", "@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }", "public static int getCapacity () {\n\t\tcapacity = nbrOfHouses*Barn.getCapacity();\n\t\treturn capacity;\n\t}", "private int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n }", "public int getRangeWidth();", "public int getMinRangingReadings() {\n return getNumberOfDimensions() + 1;\n }", "float getCostScale();", "private int calcMaxSize(int capacity) {\n // Clip the upper bound so that there will always be at least one available slot.\n int upperBound = capacity - 1;\n return Math.min(upperBound, (int) (capacity * loadFactor));\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 int getUpperBound() {\r\n return upperBound;\r\n }", "private void countSizes() {\r\n Double pageWidth = Double.valueOf(pageWidthParameter.getType().getValue().replace(\",\", \".\"));\r\n double pageHeight = Double.valueOf(pageHeightParameter.getType().getValue().replace(\",\", \".\"));\r\n Double max = Math.max(pageWidth, pageHeight);\r\n max /= PAPER_SIZE;\r\n widthSize = (int) (pageWidth / max);\r\n heightSize = (int) (pageHeight / max);\r\n }", "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "Range controlLimits();", "public int getReservoirAmountScaled(int scale)\n {\n\n return this.getReservoirAmount() * scale / TOTAL_RESERVOIR_SPACE;\n }", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n return inSampleSize;\n }", "private static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {\n\t\tfinal int height = options.outHeight;\r\n\t\tfinal int width = options.outWidth;\r\n\t\tint inSampleSize = 1;\r\n\r\n\t\tif (height > reqHeight || width > reqWidth) {\r\n\t\t\tfinal int halfHeight = height / 2;\r\n\t\t\tfinal int halfWidth = width / 2;\r\n\r\n\t\t\t// Calculate the largest inSampleSize value that is a power of 2 and\r\n\t\t\t// keeps both\r\n\t\t\t// height and width larger than the requested height and width.\r\n\t\t\twhile ((halfHeight / inSampleSize) > reqHeight && (halfWidth / inSampleSize) > reqWidth) {\r\n\t\t\t\tinSampleSize *= 2;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn inSampleSize;\r\n\t}", "double getUpperThreshold();", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n }", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n }", "abstract protected int getCapacity();", "@Test\n public void computeResult_resultAlwaysInsideProvidedBoundaries() {\n int datasetSize = 10;\n for (int i = 0; i < 100; ++i) {\n Random random = new Random();\n double lower = random.nextDouble() * 100;\n double upper = lower + random.nextDouble() * 100;\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .noise(new LaplaceNoise())\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(lower)\n .upper(upper)\n .build();\n\n List<Double> dataset =\n random\n .doubles()\n .map(x -> x * 300 * getRandomSign(random))\n .limit(datasetSize)\n .boxed()\n .collect(toImmutableList());\n\n variance.addEntries(dataset);\n\n assertWithMessage(\n \"lower = %s\\nupper = %s\\ndataset = [%s]\",\n lower, upper, dataset.stream().map(x -> Double.toString(x)).collect(joining(\",\\n\")))\n .that(variance.computeResult())\n .isIn(Range.closed(0.0, (upper - lower) * (upper - lower) / 4.0));\n }\n }", "private int calculateInSampleSize(Options options, int reqWidth,\n\t\t\t\tint reqHeight) {\n\t\t\tfinal int height = options.outHeight;\n\t\t\tfinal int width = options.outWidth;\n\t\t\tint inSampleSize = 1;\n\t\t\t\n\t\t\tif (height > reqHeight || width > reqWidth){\n\t\t\t\tif(width > height){ // 작은 크기에 맞춰서 줄이는데 왜? // 큰키게에 맞춰서 줄여야지 여백이 생기더라도 이미지가 잘리지 않을 텐데\n\t\t\t\t\t//600,800경우와 300, 80 경우를 생각을 해보면 req100,100일때... 맞는거 같은데 궁금\n\t\t\t\t\t//그래서 내 생각대로 바꿈\n\t\t\t\t\tinSampleSize = Math.round((float)width / (float)reqWidth);\t\t\t\t\t\n\t\t\t\t} else{\n\t\t\t\t\tinSampleSize = Math.round((float)height / (float)reqHeight);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn inSampleSize;\n\t\t}", "public int[] askNewSizes(int min, int max, String titel);", "public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n Log.i(\"sampleImage\", \"Displaying img at \" + reqWidth + \"px x \" + reqHeight + \"px (\" + inSampleSize + \" SampleSize)\");\n\n return inSampleSize;\n }" ]
[ "0.6760521", "0.58950394", "0.5714966", "0.5691172", "0.5670741", "0.56518334", "0.5645671", "0.5583628", "0.5524957", "0.5488191", "0.54866993", "0.5477864", "0.5449217", "0.5446475", "0.54075974", "0.53964907", "0.53919816", "0.53756034", "0.5350795", "0.5341858", "0.53254145", "0.53120565", "0.5295233", "0.5254429", "0.5253849", "0.5253038", "0.5252615", "0.52482265", "0.5233134", "0.5227206", "0.5215471", "0.5200374", "0.51946247", "0.5181886", "0.5177976", "0.5163534", "0.5154035", "0.5150175", "0.51493454", "0.5139829", "0.5128664", "0.51250505", "0.5124785", "0.5121055", "0.51168674", "0.51085913", "0.5104292", "0.50875074", "0.5075901", "0.5071354", "0.50707823", "0.5069483", "0.5059792", "0.50579935", "0.5057133", "0.50554734", "0.50543875", "0.5032442", "0.50291985", "0.5017311", "0.50050396", "0.49995333", "0.49954018", "0.49926206", "0.49898958", "0.49841985", "0.49837896", "0.49802577", "0.49734128", "0.49731773", "0.49677023", "0.4963333", "0.49567005", "0.49562296", "0.49528238", "0.49430737", "0.49426413", "0.49424046", "0.49397618", "0.49346352", "0.4929856", "0.49296936", "0.49291733", "0.49282217", "0.492441", "0.49225932", "0.4914094", "0.49106872", "0.49062774", "0.49050397", "0.4902329", "0.489445", "0.48920453", "0.48920453", "0.48878407", "0.48803604", "0.48799655", "0.48767886", "0.48694703", "0.48690927" ]
0.5121394
43
data service common repository =CrudRepository(ginaric type) contain the logic of any entity class
public interface RelationshipRepository extends JpaRepository<Relationship,Integer>{ @Transactional List<Relationship> removeByOuseridAndUserid(Integer ouserid,Integer userid); @Transactional List<Relationship> removeByOuserid(Integer id); @Transactional List<Relationship> removeByUserid(Integer id); public List<Relationship> findByOuserid(Integer ouserid); public List<Relationship> findByUserid(Integer userid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface BaseRepository {\n /**\n * Stores given entity to database\n *\n * @param entity Some entity object to save\n */\n void save(Object entity);\n\n /**\n * Stores collection of entities to database\n *\n * @param entities Some entities objects to save\n */\n void saveAll(Collection<?> entities);\n\n\n /**\n * Removes given entity from database\n *\n * @param entity Some entity object to delete\n */\n void delete(Object entity);\n\n /**\n * Removed collection of entities from database\n *\n * @param entities Some entities objects to delete\n */\n void deleteAll(Collection<?> entities);\n\n /**\n * Load entity from database by it's ID\n *\n * @param clazz Class of an entity object\n * @param id Entity unique id\n * @return entity object or null if object is not found\n */\n <T> T get(Class<T> clazz, Serializable id);\n\n /**\n * Load all data by class\n */\n <T> List<T> getAll(Class<T> clazz);\n\n public void merge(Object entity);\n}", "@org.springframework.stereotype.Repository\npublic interface EntityRepository<R> {\n\n /* public R get(R entity);*/\n\n public List<R> getAll();\n\n public List<R> getAll(int limit);\n\n public List<R> getAll(Integer firstResult, Integer maxResults);\n\n public List<R> getByExample(final R example);\n\n public R getUniqueByExample(final R example);\n\n public void put(final R record) throws DuplicateKeyException;\n\n public void put(final Collection<R> records);\n\n public Entity getEntity(Entity entity);\n\n public Entity getEntityById(Entity entity);\n\n public Entity getEntityByName(Entity entity);\n\n public void insert(final R record);\n\n public void insertAll(final Collection<R> items);\n\n public void update(final R record);\n\n public void updateAll(final Collection<R> items);\n\n public void remove(final R entity);\n\n public Entity getByColumnName(String columnName, Object columnValue);\n\n public Collection<R> getByEntities(String columnName, Object columnValue);\n\n public void clear();\n\n public void refresh(final R entity);\n\n public Long size();\n}", "@org.springframework.stereotype.Repository\npublic interface Repository<R> {\n\n List<R> getAll();\n\n List<R> getAll(Integer firstResult, Integer maxResults);\n\n List<R> getByExample(R example);\n\n R getUniqueByExample(R example);\n\n Long size();\n\n void insert(R record);\n\n void put(R record) throws DuplicateKeyException;\n\n void put(Collection<R> records);\n\n void insertAll(Collection<R> items);\n\n void update(R record);\n\n void updateAll(Collection<R> items);\n\n void remove(R entity);\n\n void refresh(R entity);\n\n void clear();\n\n void updateNow(R entity);\n\n /**\n * Generic Criteria builder for v2 REST endpoints\n * @param criteria - Criteria object\n * @param filter - Various Filters that need to be applied.\n */\n void applyGenericCriteria(Criteria criteria, ServiceFilterBean filter);\n\n}", "public interface DailyPatrolInspectionRepository {\n /**\n * 按项目判断是否有数据更新\n */\n boolean checkInspectionByApp(String id, String timeStamp, String projectId, String creaBy, String type);\n\n /**\n * 查询所有日常巡检的整改单\n */\n List<Object[]> getInspectionListByApp(String id, String timeStamp, String projectId, String creaid, String type);\n\n /**\n * 查询所有日常巡检的整改单\n */\n List<Object[]> getInspectionList(Map map, WebPage webPage);\n\n /**\n * 导出所有日常巡检的整改单\n */\n List<Object[]> getexportExcelList(Map map);\n\n DailyPatrolInspectionEntity getInspectionEntityById(String id);\n\n /**\n * 根据appid存入\n */\n DailyPatrolInspectionEntity getInspectionEntityByAppId(String id);\n\n /**\n * 保存日常巡检的整改单\n */\n void saveInspection(DailyPatrolInspectionEntity dailyPatrolInspection);\n\n /**\n * 保存日常巡检的整改单\n */\n void updateInspection(DailyPatrolInspectionEntity dailyPatrolInspection);\n\n /**\n * 保存图片\n */\n void saveProjectImages(ProjectImagesEntity projectImages);\n\n\n /**\n * 删除不包含的图片\n */\n void deleteByNotIds(List<String> id);\n\n /**\n * 保存图片\n */\n List<ProjectImagesEntity> getProjectImages(String id);\n\n /**\n * 删除图片\n * *id: 外键id\n * type:模块\n */\n void deleteProjectImages(String id, String type);\n\n /**\n * 保存抄送\n */\n void saveProjectCopy(ProjectCopyEntity projectCopy);\n\n /**\n * 删除抄送\n * id: 外键id\n * type:模块\n */\n void deleteProjectCopy(String id, String type);\n\n /**\n * 保存抄送人员\n */\n void saveProjectCopyDetails(ProjectCopyDetailsEntity ProjectCopyDetails);\n\n /**\n * 删除抄送人员\n * id: 外键id\n * type:模块\n */\n void deleteProjectCopyDetails(String id);\n\n /**\n * 查询抄送人员\n * id: 外键id\n * type:模块\n */\n List<Object[]> getProjectCopy(String id);\n\n /**\n * 查询整改记录\n */\n\n List<DailyPatrolInspectionDetailsEntity> getDailyPatrolInspectionDetails(String id);\n\n /**\n * 按项目查询统计信息\n */\n List<Object[]> searchInspection(String projectId);\n\n\n /**\n * 查询日常巡检代办理事项\n */\n List<Object[]> getInspectionListByAppTodo(String id, String timeStamp, String creaid);\n\n\n /**\n * 查询日常巡检待办事项是否有新数据更心\n */\n boolean checkInspectionTodo(String id, String timeStamp, String creaBy);\n\n /**\n * 保存巡检详情\n *\n * @param dailyPatrolInspectionDetailsEntity\n */\n void saveInspectionDetais(DailyPatrolInspectionDetailsEntity dailyPatrolInspectionDetailsEntity);\n\n\n /**\n * 批量删除图片\n * *id: 外键id\n * type:模块\n */\n void deleteProjectImagesList(List id, String type);\n\n /**\n * 日常巡检统计列表(后端)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计列表(后端)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionCount(Map map);\n\n int searchDailyPatrolInspectionCount(Map map);\n\n int getCount(Map map);\n\n /**\n * 统计项目\n */\n int getProjectCount(Map map);\n\n /**\n * 统计区域\n */\n int getOperatCount(Map map);\n\n /**\n * 查询日常巡检详情\n */\n Object[] getInspectionListByAdmin(String id);\n\n\n DailyPatrolInspectionEntity getDailyPatrolInspection(String id);\n\n /**\n * 日常巡检 按照当前登录人的员工id 查询整改中本人所负责人数据\n */\n int inspectionCount(String userId);\n\n\n List<DailyPatrolInspectionEntity> getDailyPatrolInspectionByInspectionId(String inspectionId);\n\n\n /**\n * 日常巡检统计(项目)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionProjecrCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计(区域)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionOperaCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计(项目)去掉分页\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionProjecrCount(Map map);\n\n /**\n * 日常巡检统计(区域)去掉分页\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionOperaCount(Map map);\n}", "public interface TodoRepository extends JpaRepository<Todo,Integer> {\n\t//Service.retrieveTodos(Name). we have to create this \n\tList<Todo> findByUser(String user);\n\t\n\t\n\t\n\t//jpaRepository include these service but not the name above \n\t//Service.deleteTodo(id)\n\t//Service.retrieveTodo(id)\n\t//Service.updateTodo(todo)\n\t//Sevice.addTodo()\n\n}", "public interface IRepositoryModelService<Model, Criteria> {\n\n// void create(Map<String, Object> mapModel) throws Exception;\n// void update(Map<String, Object> mapModel) throws Exception;\n// void destroy(Map<String, Object> mapModel) throws Exception;\n// List<Map<String, Object>> list(Map<String, Object> mapCriteria) throws Exception;\n// int countRecords(Map<String, Object> mapCriteria) throws Exception;\n\n\n void create(Model model) throws Exception;\n void update(Model model) throws Exception;\n void destroy(Model model) throws Exception;\n List<Model> query(Criteria criteria) throws Exception;\n List<Model> query(Criteria criteria, Integer start, Integer limit) throws Exception;\n Model recordQuery(Criteria criteria) throws Exception;\n Integer countRecords(Criteria criteria) throws Exception;\n\n void setRepository();\n\n}", "public interface CommonService<CE extends CommonEntity, ID extends Serializable> {\n /**\n * Create in database\n *\n * @param entity\n */\n void create(CE entity);\n\n /**\n * Update entity in database\n *\n * @param entity entity to update\n */\n void update(CE entity);\n\n /**\n * Delete from database by id\n *\n * @param id entity's id to delete\n */\n void delete(ID id);\n\n /**\n * Find from database by id\n *\n * @param id\n * @return entity\n */\n CE findById(ID id);\n\n /**\n * Find all entries from database\n *\n * @return\n */\n List<CE> findAll();\n}", "public interface BaseService<T extends BaseModel,R extends BaseRepository,ID extends Serializable> {\n\n T getById(ID id);\n\n void deleteById(ID id);\n\n void deleteByIds(ID[] ids);\n\n void update(T t) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;\n\n void save(T t);\n\n\n List<T> findAll();\n\n Page<T> findAll(Pageable p);\n\n List<T> findALL(Specification<T> s);\n\n Page<T> findAll(Specification<T> s, Pageable p);\n\n}", "@Repository\npublic interface RepositoryMain extends CrudRepository<Roulette, Long>{\n\n}", "public interface ManualRepository extends BaseRepository<ManualBo, Long>, ManualRepositoryCustom{\n}", "public interface IGenericService<T extends BaseEntity, ID extends Serializable, T_REPOSITIRY extends IGenericRepository<T, ID>> {\r\n\r\n public void save(T entity);\r\n\r\n public void delete(T entity);\r\n\r\n public T update(T entity);\r\n\r\n public T find(ID entityId);\r\n\r\n public List<T> findAll();\r\n}", "@Repository\npublic interface TransactionCrudRepository extends CrudRepository<Transaction , Long> {\n\n public List<Transaction> findAll();\n public List<Transaction> findAllByUserId(Long userId);\n}", "public interface CommonDataService {\n /**\n * 添加\n * @param o ObjectType\n * @return boolean\n */\n boolean addObject(Object o);\n\n /**\n * 批量添加\n * @param o List<Object>\n * @return boolean\n */\n boolean batchAddObject(List o);\n\n /**\n * 根据id查找\n * @param id Long\n * @param clazz User.class\n * @return null or object\n */\n Object findById(Long id, Class clazz);\n\n /**\n * 根据一个条件查找出一个对象\n * @param columnName attr like: \"loginNamej\"\n * @param value value like: \"admin\" 类型一定要与columnName类型相同\n * @param clazz like: User.class\n * @return null or object\n */\n Object findOneByOneParam(String columnName, Object value, Class clazz);\n\n /**\n * 删除实体\n * @param o\n * @return boolean;\n */\n boolean delObject(Object o);\n\n /**\n * 根据id删除\n * @param id LongType\n * @param clazz User.class\n * @return\n */\n boolean delObjectById(Long id, Class clazz);\n\n /**\n * 根据查询条件删除实体,可用做批量删除\n * @param parsms List<param>\n * @param clazz\n * @return\n */\n boolean delObjectByParam(List<Param> parsms, Class clazz);\n\n /**\n * 更新实体,只更新更改属性,不需更新属性请设置为null\n * @param o\n * @param clazz\n * @return\n */\n boolean updateObject(Object o, Class clazz);\n\n /**\n * 批量更新 同updateObject,批量操作,保证objs的长度与clazzes的长度相等。\n * @param objs new Object[]{user,userInfo}\n * @param clazzes like: User.class,UserInfo.class\n * @return boolean\n */\n boolean batchUpdateObject(Object[] objs, Class... clazzes);\n\n /**\n * 获取所有实体 排序。无查询条件\n * @param clazz\n * @param orderBy\n * @param orderFlag\n * @return\n */\n List getAll(Class clazz, String orderBy, Integer orderFlag);\n\n /**\n * 根据查询条件查询数据并排序\n * @param params List<Param>\n * @param clazz\n * @param orderBy 排序字段\n * @param orderFlag 排序方式 Integer\n * @return\n */\n List getList(List<Param> params, Class clazz, String orderBy, Integer orderFlag);\n\n /**\n * 根据查询条件查找一个实体\n * @param params List<Param>\n * @param clazz\n * @return\n */\n Object findByParams(List<Param> params, Class clazz);\n\n /**\n * 分页查找\n * @param params 查询条件\n * @param clazz\n * @param orderBy 排序\n * @param orderFlag 排序方式\n * @param page 分页信息\n * @return Page\n */\n Page queryPage(List<Param> params, Class clazz, String orderBy, Integer orderFlag, Page page);\n\n /**\n * 根据条件用hql排序\n * @param hql\n * @param params\n * @param page\n * @return\n */\n Page queryPage(String hql, List<Param> params, Page page);\n\n /**\n * 根据hql获得一个实体\n * @param hql\n * @param values\n * @return\n */\n Object getByHql(String hql, Object... values);\n\n /**\n * 执行hql,返回影响行数\n * @param hql\n * @param objects\n * @return int or 0\n */\n int executeUpdateHql(String hql, Object... objects);\n\n /**\n * 根据hql查询list\n * @param hql\n * @param objects\n * @return list\n */\n List queryListByHql(String hql, Object... objects);\n\n /**\n * 根据sql查询获得list\n * @param sql\n * @param objects\n * @return list\n */\n List queryListBySql(String sql, Object... objects);\n}", "public interface TdHtFuncroleRelRepository {\n\n /**\n * @Purpose 根据id查找角色id和功能id\n * @version 4.0\n * @author lizhun\n * @param map\n * @return TdHtFuncroleRelDto\n */\n public TdHtFuncroleRelDto findFuncroleRelByRoleIdAndFuncId(Map<String,Integer> map);\n\n /**\n * @Purpose 根据权限id查找角色权限关联信息\n * @version 4.0\n * @author lizhun\n * @param role_id\n * @return List<TdHtFuncroleRelDto>\n */\n public List<TdHtFuncroleRelDto> findFuncroleRelsByRoleId(int role_id);\n /**\n * @Purpose 添加角色权限关联信息\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void insertFuncroleRel(TdHtFuncroleRelDto TdHtFuncroleRelDto);\n /**\n * @Purpose 修改角色限关联信息\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void updateFuncroleRel(TdHtFuncroleRelDto TdHtFuncroleRelDto);\n /**\n * @Purpose 修改角色所有功能不可用\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void updateFuncroleRelByRoleId(int role_id);\n}", "@Repository\n//JpaRepository<obj do tipo categoria, tipo do atributo identificador>--tipo especial do spring para acessar os dados\npublic interface PedidoRepository extends JpaRepository<Pedido, Integer> {\n\t\n\t@Transactional(readOnly=true)\n\tPage<Pedido> findByCliente(Cliente cliente, Pageable pageRequest);\n}", "public interface CustomerRepository extends JpaRepository<Customer,Long> {\r\n public Customer findByNumberID(String numberID);\r\n public List<Customer> findByLastName(String lastName);\r\n public List<Customer> findByRegion(Region region);\r\n}", "@SuppressWarnings(\"unused\")\n@Repository\n@JaversSpringDataAuditable\n\npublic interface SellContractCustomerRepository extends JpaRepository<SellContractCustomer, Long> {\n\n SellContractCustomer findByCustomer_Id(Long customerId);\n\n List<SellContractCustomer> findAllBySellContract_Id(Long sellContractId);\n\n}", "public interface DbRepository<TEntity, TId> {\n\n DbClient getClient();\n String tableName();\n void create(TEntity entity);\n TEntity get(TId id);\n void save(TEntity entity);\n List<TEntity> find(String searchString);\n void remove(TEntity entity);\n List<TEntity> executeQuery(String query, Function<ResultSet, List<TEntity>> handler);\n int executeUpdate(String query);\n}", "public interface DataProviderRepository<T> {\n\n /**\n * find all entities with limits and query params\n *\n * @param clazz Class to search\n * @param sortParam sort parameter\n * @param ascending ascending\n * @param first first row\n * @param count number of results\n * @param beanQuery bean with criterias (use BeanQuery and BeanJoin annonation)\n * @return list with results\n */\n List<T> findAllWithQuery(Class<T> clazz, String sortParam, boolean ascending, int first, int count, Serializable beanQuery, List<String> prefetch);\n\n /**\n * find by Id\n *\n * @param clazz entity class\n * @param id id of entity\n * @return entity\n */\n T findById(Class<T> clazz, Serializable id);\n\n /**\n * finds everything\n *\n * @param clazz entity class\n * @return list with all entities\n */\n List<T> findAll(Class<T> clazz);\n\n /**\n * find all entities with limits\n *\n * @param clazz entity class\n * @param first first row\n * @param count number of following rows\n * @return all entites limitated by first and count\n */\n List<T> findAll(Class<T> clazz, int first, int count);\n\n /**\n * Returns the number of rows\n *\n * @param clazz entity clas\n * @param beanQuery bean with criterias (use BeanQuery and BeanJoin annonation)\n * @return number of results\n */\n int getSize(Class<T> clazz, Serializable beanQuery);\n\n /**\n * Returns the number of rows\n *\n * @param clazz entity clas\n * @param beanQuery bean with criterias (use BeanQuery and BeanJoin annonation)\n * @param countQuery specific count query e.g. \"count(distinct e.name)\"\n * @return number of results\n */\n int getSize(Class<T> clazz, String countQuery, Serializable beanQuery);\n}", "public interface ISpreadProfitRepository<T, ID extends Serializable> extends IHibernateGenericRepository<T, ID> {\r\n\r\n int total(String userId);\r\n\r\n int effective(String userId);\r\n\r\n List<SpreadProfitCommand> vote(Date date);\r\n\r\n Object[] todaySUm(String dateStr, String username);\r\n\r\n Object[] todayProfit(String id);\r\n\r\n Object[] yesterdayProfit(String id);\r\n\r\n Object[] weekProfit(String id);\r\n\r\n Object[] lastWeekProfit(String id);\r\n\r\n Object[] monthProfit(String id);\r\n\r\n List<ProfitDetailedCommand> profitDetailed(String id);\r\n}", "public interface CrudService<E extends AbstractEntity> {\n\n /**\n * Saves a given entity. Use the returned instance for further operations as the save operation might have changed the\n * entity instance completely.\n *\n * @param entity\n * @return the saved entity\n */\n E save(E entity);\n\n /**\n * Saves all the entities that are given\n *\n * @param entities\n * @return saved instances\n */\n Collection<E> save(Iterable<E> entities);\n\n /**\n * Retrieves an entity by its id.\n *\n * @param id must not be {@literal null}.\n * @return the entity with the given id or {@literal null} if none found\n * @throws IllegalArgumentException if {@code id} is {@literal null}\n */\n E findOne(Long id) throws DataNotFoundException;\n\n /**\n * Returns all of the entities\n *\n * @return a List of entities\n */\n List<E> findAll();\n\n /**\n * Returns a {@link Page} of entities meeting the paging restriction provided in the {@code Pageable} object.\n *\n * @param index page index\n * @return a page of entities\n */\n List<E> findAll(int index);\n\n /**\n * Deletes the entity with the given id.\n *\n * @param id must not be {@literal null}.\n * @throws IllegalArgumentException in case the given {@code id} is {@literal null}\n */\n void delete(Long id);\n\n /**\n * Deletes a given entity.\n *\n * @param entity\n * @throws IllegalArgumentException in case the given entity is {@literal null}.\n */\n void delete(E entity);\n}", "public interface CustomerCrudRepository extends CrudRepository<Customer,Long> {\n}", "public interface ContactRepository extends CrudRepository<Contact, Integer>{\n\n\n Iterable<Contact> findAll();\n\n List<Contact> findByNameContaining(String s);\n\n void delete(Contact c);\n\n <T extends Contact>T save(T c);\n\n\n\n\n}", "public interface UserBaseService {\n Boolean regeist(UserBaseDO userBaseDO);\n UserBaseDO findByPhone(String phone);\n}", "@Repository\npublic interface PersonDao {\n public List<Person> findPersonByName(Person person);\n public List<Person> findPersonNull(Person person);\n public List<Person> findPersonBySta1(Person person);\n public List<Person> findPersonBySta2(Person person);\n public List<Person> findPerson(Person person);\n public void addDangan(Person person);\n public void editDangan(Person person);\n public void removeDanganId(@RequestBody ArrayList<Integer> data);\n}", "@Repository\npublic interface UserRepository extends JpaRepository<User,Integer> {\n //implementation will be provided to run time\n}", "public interface IdentityComponentsPersonRepository extends GenericRepository<IdentityComponentsPerson, Long>{\n}", "public interface TestEntityBaseRepository extends JpaRepository<TestEntityBase,Integer>,JpaSpecificationExecutor<TestEntityBase> {\n}", "@Repository\npublic interface UserRepository extends BaseRepository<User,Long> {\n\n User findByAccount(String account);\n}", "@Repository\npublic interface BaseRepository {\n}", "public interface ModeloRepository extends CrudRepository<Modelo, Long> {\n}", "public interface DistributeBookRepository extends CrudRepository<DistributeBook, Integer>,DistributeBookRepositoryCustom {\n}", "public interface IBaseService {\n\n\n /**\n * 根据id获取\n * @param tableName 表名\n * @param id\n */\n Map<String,Object> findById(String tableName, Integer id);\n\n /**\n * 修改状态\n * @param tableName 表名\n * @param status 状态\n * @param id\n */\n int updateStatus(String tableName, Integer status, Integer id);\n\n /**\n * 修改\n * @param tableName 表名\n * @param params 要修改的字段\n */\n int update(String tableName, Map<String, Object> params);\n /**\n * 根据sql删除或更改\n * @param sql 表名\n */\n int deleteOrUpdate(String sql);\n /**\n * 根据id删除\n * @param tableName 表名\n * @param id\n */\n int delete(String tableName, Integer id);\n /**\n * 插入一条数据,返回主键\n * @Date 2016/7/20 15:20\n * @author linyb\n */\n int save(String tableName, Map<String, Object> params);\n /**\n * 获取分页信息\n * @Date 2016/7/21 16:15\n * @param coloumSql 要查询的列的信息\n * @param fromSql 从哪些表查询\n * @param pageNum 第几页\n * @param pageSize 查询多少条\n */\n PageModel findPage(String coloumSql, String fromSql, Integer pageNum, Integer pageSize);\n /**\n * 获取分页信息\n * @Date 2016/7/21 16:15\n * @param offset 偏移\n * @param pageSize 查询多少条\n * @param coloumSql 要查询的列的信息\n * @param fromSql 从哪些表查询\n */\n PageModel findPage(Integer offset, Integer pageSize, String coloumSql, String fromSql);\n\n /**\n * 不分页获取列表信息\n * @Date 2016/7/26 08:46\n * @author linyb\n * @param coloumSql 列信息\n * @param fromSql 从哪里查询\n */\n List findList(String coloumSql, String fromSql);\n /**\n * 根据sql获取符合条件的第一条数据\n * @Date 2016/7/28 16:24\n * @author linyb\n */\n Map<String,Object> findFirstBySql(String sql);\n\n}", "public interface ShopperPersonRepository extends CrudRepository<ShopperPerson, Long> {\n}", "public interface EntityRepository<T extends GenericEntity, ID extends Serializable> {\n\n T findOne(ID id);\n\n List<T> findAll();\n\n T save(T entity);\n\n void delete(ID id);\n}", "public interface TaskReporitory extends JpaRepository<Task, Integer>, JpaSpecificationExecutor<Task>, CrudRepository<Task, Integer> {\n}", "public interface BaseService<T> {\n\n\n int deleteByStr(String code);\n\n int deleteByInt(int id);\n\n Map selectPageUseDyc(Page<T> page);\n\n\n //添加对象\n int insert(T entity);\n\n //修改对象\n int update(T entity);\n\n\n //查询对象\n SimpleResult<Map> select(T entity);\n\n //通过主键查找对象\n T select(int id);\n\n\n //动态查询\n int selectTotal(T entity);\n\n List<T> selectList(T entity);\n}", "public interface ProductoRepository \n\textends CrudRepository<Producto, Integer> \n{\n\n}", "public interface UserDao extends CrudRepository<User,Long>{\r\n\r\n\t//017 mappers; retreive uName or Email to retrieve inst of user Entity; the naming 'findBy' helps sBt retrieve user because it assume that the user class has userNm and email fields and it ignore the UserNm case in the dao, and it will gen mappers during initialization to be used for retrieving the user obj\r\n\tUser findByUsername(String username);\r\n\tUser findByEmail(String email);\r\n}", "public interface CommonService<T> {\n //頁面查詢\n public R<T> page(Map<String,Object> params);\n //查询id\n R<T> getById(Serializable id);\n //编辑\n R updateById(T entity);\n //增加\n R save(T entity);\n //删除\n R removeById(Serializable id);\n\n}", "public interface LiquorRepo extends CrudRepository<Liquor, Integer>, LiquorRepoCustom {\n Liquor findByName(String name);\n Liquor findByItemCode(String itemCode);\n ArrayList findAllByNameContaining(String name);\n ArrayList findAllByNameLikeIgnoreCase(String name);\n ArrayList findAllByItemCodeLikeIgnoreCase(String itemCode);\n ArrayList findAllByDistilleryLikeIgnoreCase(String distillery);\n}", "public interface UserRepository extends CrudRepository<User, Long> {\r\n\t\r\n\tUser findByUsername(String username);\r\n\r\n\tUser findByActivationCode(String code);\r\n\t\r\n\tList<User> findAllByRoles(Role role);\r\n\r\n\tUser findById(long id);\r\n\r\n\r\n\r\n\t\r\n\r\n}", "public interface DoctorService extends CrudRepository<Doctor, Integer>{\r\n\t\r\n\tIterable<Doctor> findByDocFirstName(String docFirstName);\r\n\tIterable<Doctor> findByDocLastName(String docLastName);\r\n\tIterable<Doctor> findByDocFirstNameAndDocLastName(String docFirstName,String docLastName);\r\n\r\n}", "public interface BookRepository extends CrudRepository<Book,String>{\n}", "public interface AppService<T extends Entity, R extends AppRepository<T>>\n{\n Class<T> getDomainType();\n R getRepository();\n T save( T entity );\n Iterable<T> saveAll(Iterable<T> entities) ;\n void deleteAll();\n}", "@RooJpaRepositoryCustom(entity = Pedido.class)\npublic interface PedidoRepositoryCustom {\n}", "public interface EmployeeRepository extends CrudRepository<Employee, Long>{\n}", "public interface PetRepository extends CrudRepository<Pet, Long> {\n}", "@Repository\npublic interface AlliesRepository extends CrudRepository<AlliesDO, Long> {\n\n}", "public interface Repository {\n\n /**\n * Return a helper utility to provide the access to an infrastructure layer component in the domain layer.\n */\n DomainHelper dh();\n\n <T extends Entity> Optional<T> get(final Class<T> clazz, final Serializable id);\n\n <T extends Entity> T load(final Class<T> clazz, final Serializable id);\n\n /**\n * Please be conscious of deadlock avoidance to perform the (for update) acquisition working under Lock.\n */\n <T extends Entity> T loadForUpdate(final Class<T> clazz, final Serializable id);\n\n <T extends Entity> boolean exists(final Class<T> clazz, final Serializable id);\n\n <T extends Entity> List<T> findAll(final Class<T> clazz);\n\n <T extends Entity> T save(final T entity);\n\n <T extends Entity> T saveOrUpdate(final T entity);\n\n <T extends Entity> T update(final T entity);\n\n <T extends Entity> T delete(final T entity);\n\n}", "@Repository\npublic interface BaseUserRepository extends JpaRepository<BaseUser,String> {\n\n}", "public interface SavingsRepository extends Repository<Savings,Long>{\n}", "@Repository\r\npublic interface UserRepository extends CrudRepository<User,Long>{\r\n User findByUsername(String username);\r\n}", "public interface TypeRepositoryCustom extends JpaRepository<Type, Long> {\n\n}", "@RooJpaRepositoryCustom(entity = LoanItem.class)\npublic interface LoanItemRepositoryCustom {\n}", "public interface UsuarioCrud extends CrudRepository<Usuario, Long> {\r\n\r\n\t}", "public interface InspectAcceptanceRepository {\n /**\n * 按条件检索工程检查列表\n *\n * @param map\n * @param webPage\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceList(Map map, WebPage webPage,String staffId);\n /**\n * 按条件检索工程检查列表\n *\n * @param map\n * @param webPage\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceList(Map map, WebPage webPage);\n /**\n * 工程检查列表\n *\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceAllList();\n\n /**\n * 按条件检索工程检查列表(不带分页)\n *\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceAllList(Map map);\n\n /**\n * 新增工程检查信息\n *\n * @param inspectAcceptanceEntity\n * @return\n */\n boolean addProjectExamineInfo(ProjectExamineEntity inspectAcceptanceEntity);\n\n /**\n * 检索已进行的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchHasBeenGetOnByProjectNum(String projectNum);\n\n /**\n * 检索合格的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchQualifiedByProjectNum(String projectNum);\n\n /**\n * 检索不合格的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchUnqualifiedByProjectNum(String projectNum);\n\n /**\n * 检索不合格的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchOnePassByProjectNum(String projectNum);\n\n /**\n * 统计工程检查信息(前台)\n *\n * @param projectNum\n * @return\n */\n List<Object[]> searchAcceptanceListByProjectNum(String projectNum);\n\n /**\n * 根据楼栋检索工程检查批次列表\n *\n * @param buildingId\n * @param projectCategoryName\n * @return\n */\n List<Object[]> searchAcceptanceBatchList(String buildingId, String projectCategoryName);\n\n /**\n * 检索工程检查批次详情\n *\n * @param batchId\n * @return\n */\n ProjectExamineEntity searchAcceptanceBatchInfo(String batchId);\n\n /**\n * 修改工程检查批次\n *\n * @param projectExamineEntity\n * @return\n */\n boolean modifyAcceptanceBatchInfo(ProjectExamineEntity projectExamineEntity);\n\n /**\n * 检查工程验收是否有更新\n *\n * @param id\n * @param beginDateNew\n * @param projectNum\n * @return\n */\n boolean searchToUpdateForAcceptance(String id, String beginDateNew, String projectNum,String creatBy,String type,String day7Ago);\n\n /**\n * 下载更新数据\n *\n * @param id\n * @param timeStamp\n * @param projectNum\n * @return\n */\n List<ProjectExamineEntity> getAllProjectAcceptanceQuestion(String id, String timeStamp, String projectNum,String day7Ago);\n\n /**\n * 查询工程抄送人\n *\n * @param batchId\n * @return\n */\n List<ProjectCopyEntity> getProjectCopyList(String batchId);\n\n /**\n * 查询工程抄送详情\n *\n * @param copyId\n * @return\n */\n List<ProjectCopyDetailsEntity> getProjectCopyDetailsList(String copyId);\n\n /**\n * 保存抄送\n */\n boolean saveProjectCopy(ProjectCopyEntity projectCopy);\n\n /**\n * 删除抄送\n * id: 外键id\n */\n boolean deleteProjectCopy(String id);\n\n /**\n * 保存抄送人员\n */\n boolean saveProjectCopyDetails(ProjectCopyDetailsEntity projectCopyDetails);\n\n /**\n * 删除抄送人员\n * id: 外键id\n * type:模块\n */\n boolean deleteProjectCopyDetails(String id);\n\n /**\n * 统计\n *\n * @param map\n * @param webPage\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceCountList(Map map, WebPage webPage);\n\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map, WebPage webPage,String staffId);\n\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map, WebPage webPage);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map,String staffId);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n int searchInspectAcceptanceCount(Map map);\n\n /**\n * 统计\n *\n * @param map\n * @return\n */\n int getCount(Map map,String staffId);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n int getCount(Map map);\n /**\n * 查询自己的批次\n *\n * @param batchId\n * @param staffId\n * @return\n */\n ProjectExamineEntity searchAcceptanceBatchInfoByStaffId(String batchId, String staffId);\n\n /**\n * 根据APPID检索批次信息\n *\n * @param id\n * @return\n */\n ProjectExamineEntity getProjectExamineByAppId(String id);\n\n /**\n * 整改中的总数(当前登录人)\n *\n * @param staffId\n * @return\n */\n int getRectificationCount(String staffId);\n\n List<Object[]> getAllProjectAcceptanceQuestion(String id, String timeStamp, String projectNum, String day7Ago, String staffId, String type);\n\n List<Object[]> getAllProjectAcceptanceQuestion(String id, String timeStamp, String projectNum, String staffId, String type);\n}", "public interface CustomerRepository extends CrudRepository<Customer, Long> {\n}", "@Repository\npublic interface BrandDao extends BaseRepository<TBrand, Long> {\n}", "public interface PersonRepository extends CrudRepository<Person, Long>{\n List<Person> findByFirstName(String firstName);\n}", "@Repository\npublic interface UserRepository extends CrudRepository<User, Integer>{\n User findByUserName(String userName);\n User findByToken(String token);\n User findByPartnerId(int id);\n User findByStudentId(int id);\n User findByStudentIdAndStatus(int id, String status);\n List<User> findByRole(Role role);\n}", "public interface AuditingRepository extends CrudRepository<AuditingEntity, Long>, JpaSpecificationExecutor<AuditingEntity> {\n}", "public interface AdditionRepository extends CrudRepository<Addition, String> {\r\n\r\n}", "public interface UserCrudService {\n\n /** Get all User entity (paginate).<br>\n * Must be redefined in implemented class.<br>\n * @param pageable : @see Pageable.\n * @param search : the string to process search.\n * @return List of all User.\n * @see fr.dta.ovg.services.user.UserCrudServiceImpl*/\n Page<User> getAll(Pageable pageable, String search);\n\n /** Get one User entity by ID.<br>\n * Must be redefined in implemented class.<br>\n * @param id : the user id to find.\n * @return User : entity.\n * @see fr.dta.ovg.services.user.UserCrudServiceImpl\n * @throws NotFoundException : User not found.*/\n User getOne(long id) throws NotFoundException;\n\n /** Get one user by Username function.\n * @param username : the user name.\n * @return the user with the username.\n * @throws NotFoundException : User entity not found.*/\n User getOne(String username) throws NotFoundException;\n\n /** Create one User entity.<br>\n * Must be redefined in implemented class.<br>\n * @return Created User : entity.\n * @param user : User entity.\n * @see fr.dta.ovg.services.user.UserCreateService*/\n User create(User user);\n\n /** Delete one User entity by ID.<br>\n * Must be redefined in implemented class.<br>\n * @param id : User id to process delete.\n * @throws NotFoundException : User not found.\n * @see fr.dta.ovg.services.user.UserDeleteService*/\n void delete(long id) throws NotFoundException;\n\n /** existsByUsernameIgnoreCaseAndIdNot function.\n * @param username of the user.\n * @param id of the user.\n * @return true if user existing by username and id not.*/\n boolean existsByUsernameIgnoreCaseAndIdNot(String username, Long id);\n\n /** existsByUsername function.\n * @param user : @see User entity.\n * @return true if the username exists.*/\n boolean existsByUsername(User user);\n}", "@RooJpaRepositoryCustom(entity = Customer.class)\npublic interface CustomerRepositoryCustom {\n\n /**\n * TODO Auto-generated method documentation\n *\n * @param globalSearch\n * @param pageable\n * @return Page\n */\n public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);\n\n /**\n * TODO Auto-generated method documentation\n *\n * @param ids\n * @param globalSearch\n * @param pageable\n * @return Page\n */\n public abstract Page<CustomerInfo> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);\n}", "public interface BACSSettlementDataService extends BaseDataService<BACSSettlement, BACSSettlementDTO> {\r\n\r\n List<BACSSettlementDTO> findByStatus(String status);\r\n\r\n BACSSettlementDTO findBySettlementNumber(Long settlementNumber);\r\n \r\n BACSSettlementDTO findByFinancialServicesReference(Long financialServicesReferenceNumber); \r\n \r\n List<BACSSettlementDTO> findByOrderNumber(Long orderNumber);\r\n \r\n}", "public interface BankRepository extends CrudRepository<Bank, Long> {\n}", "public interface StudentCrudRepository extends CrudRepository<Student,Integer> {\r\n}", "public interface IRepository<T> {\n Enumeration<T> findAll(Predicate<T> exp);\n T find(Predicate<T> exp);\n void add(T entity);\n void delete(T entity);\n void update(T entity);\n void saveChanges();\n}", "public interface UserRespository extends JpaRepository<User,Long>{\n}", "public interface IDataBaseRepository {\r\n\r\n /**\r\n * Get DataBase object\r\n *\r\n * @return obj\r\n */\r\n //DataBase getDataBase();\r\n\r\n /**\r\n * Save new clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void save(Clothes clothes);\r\n\r\n /**\r\n * Delete clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void delete(Clothes clothes);\r\n\r\n /**\r\n * Update clothes\r\n *\r\n * @param oldClothes obj\r\n * @param newClothes ojb\r\n */\r\n void update(Clothes oldClothes, Clothes newClothes);\r\n\r\n /**\r\n * Get all clothes\r\n *\r\n * @return list\r\n */\r\n List<Clothes> getAll();\r\n\r\n /**\r\n * Get all clothes by type of the office\r\n *\r\n * @param officeType obj\r\n * @return list\r\n */\r\n List<Clothes> getByOffice(OfficeType officeType);\r\n\r\n /**\r\n * Get clothes by ID\r\n *\r\n * @param id int\r\n * @return clothes obj\r\n */\r\n Clothes getById(int id);\r\n\r\n}", "public interface BusinessDao extends JpaRepository<Business, Long> {\r\n}", "@Repository\npublic interface VehicleRepository extends CrudRepository<Vehicle,Long>{\n}", "@Repository\npublic interface ModelRepository extends JpaRepository<Citire, Long>{\n}", "public interface UserCustomRepository {\n\n}", "@Repository\npublic interface OwnerRepository extends BaseRepository<EOwner,UUID> {\n}", "public interface IGestionarBoletaService extends IRepositoryModelService<DocumentoBoletaQuery,DocumentoBoletaQueryCriteria,DocumentoBoletaQueryMapper> {\n}", "public interface UserDataRepository extends JpaRepository<UserData, Long> {\n //Object save(UserDataVO userData);\n UserData findById(long id);\n}", "public interface UserDao extends JpaRepository<UserEntity,String> {\n\n default UserEntity findByAccount(String account)throws Exception{\n UserEntity exp=new UserEntity();\n exp.setAccount(account);\n return this.findOne(Example.of(exp)).orElse(null);\n }\n}", "public interface UserRepository extends CrudRepository<User, Long> {\n\n public User findAllByName(String name);\n\n}", "@Repository\npublic interface ClienteRepository extends JpaRepository<Cliente, String>{\n\n}", "@Repository\npublic interface CustomerRepository extends CrudRepository<Customer, Long> {\n\n}", "public interface ISingleMenuRepository extends JpaRepository<SingleMenu, Long>, JpaSpecificationExecutor<SingleMenu> {\n}", "public interface MetaRepository extends CrudRepository<Meta,Long> {\n}", "public interface TransactionRepository extends CrudRepository<Transaction> {\r\n\r\n}", "public interface FeedBackRepositoryCustom extends JpaRepository<FeedBack, Long> {\n\n}", "public interface PersonRepository extends JpaRepository<Person, Long>, PersonRepositoryQuery {\n}", "@Repository\npublic interface UserRepository extends CrudRepository<UserDao,Long> {\n\n UserDao findByName(String username);\n}", "@Repository\npublic interface FeeBaseService {\n List<FeeBase> selectList(Integer roleId);\n}", "public interface PeopleRepository extends CrudRepository<People,Long> {\n\n People findPeopleByUserId(Long userId);\n\n @Override\n People findOne(Long aLong);\n}", "@Repository\npublic interface FooRepository extends CrudRepository<Foo, Long>, EntityRepository<Foo> {\n List<Foo> findAll();\n}", "public interface TemporaryTableUpdateRepository {\n /**\n * 查询项目人员权限变信息\n * */\n PersonnelAuthorityTimeEntity queryPersonnel(String id);\n /**\n * 查询楼栋临时表数据 id\n * **/\n BuildingMappingTimeEntity queryBuild(String id);\n /**\n * 增加楼栋临时表信息\n */\n void createBuild(BuildingMappingTimeEntity BuildingMappingTime);\n /**\n * 增加项目人员权限临时表信息\n */\n void createPersonnel(PersonnelAuthorityTimeEntity PersonnelAuthorityTime);\n /**\n * 修改楼栋临时表信息\n * */\n void updateBuild(BuildingMappingTimeEntity BuildingMappingTime);\n /**\n * 更新项目人员权限临时表信息\n * */\n void updatePersonnel(PersonnelAuthorityTimeEntity PersonnelAuthorityTime);\n /**\n * 获取所有房屋数据\n */\n List<BuildingMappingTimeEntity> getBuildingList();\n\n /**\n * 查询活动临时表数据 id\n * **/\n ActiveTemporaryTimeEntity queryActive(String id);\n\n\n /**\n * 查询活动临时表数据 id\n * **/\n ActiveTemporaryTimeEntity queryActiveBUild(String id,String PlanId);\n /**\n * 增加活动临时表信息\n */\n void createActive(ActiveTemporaryTimeEntity ActiveTemporaryTime);\n /**\n * 修改活动临时表信息\n * */\n void updateActive(ActiveTemporaryTimeEntity ActiveTemporaryTime);\n\n /**\n * 修改活动临时表信息 关闭计划\n * */\n void updateActiveStateById(String planId);\n\n /**\n * 修改活动临时表信息 关闭计划(批量)\n * */\n void updateActiveStateByIdList(List<String> idList);\n\n /**\n * 获取所有计划数据\n */\n List<ActiveTemporaryTimeEntity> getActiveList();\n\n /**\n * 查询活动临时表数据 id\n * **/\n ClassificationTemporaryTimeEntity queryClass(String id);\n\n /**\n * 查询活动临时表数据 id\n * **/\n ClassificationTemporaryTimeEntity queryClassforgradle(String id,String grad);\n\n /**\n * 查询活动临时表数据 id\n * **/\n ClassificationTemporaryTimeEntity queryClassfour(String id,String type);\n\n /**\n * 查询临时表数据\n * **/\n ClassificationTemporaryTimeEntity queryByParentId(String parentId);\n\n /**\n * 增加三级分类临时表信息\n */\n void createClass(ClassificationTemporaryTimeEntity ClassificationTemporaryTime);\n\n /**\n * 修改三级分类临时表信息\n * */\n void updateClass(ClassificationTemporaryTimeEntity ClassificationTemporaryTime);\n\n /**\n * 获取所有三级分类数据\n */\n List<ClassificationTemporaryTimeEntity> getClassList();\n}", "public interface QueryContactRepository extends JpaBaseRepository<QueryContact,Integer>\n{\n}", "@Repository\npublic interface CustomerRepository extends CrudRepository<Customer, Long> {\n}", "@Transactional\n@Component\npublic interface UserRepository extends CrudRepository<User,Integer> {\n List<User> findByName(String name);\n User findByPseudo(String pseudo);\n}", "public interface HomeworkService extends CRUDService<Homework>{\n\n List<Homework> findByTitle(String title);\n List<Homework> findByLesson(Lesson lesson);\n List<Homework> findByLesson_Subject_User(User user);\n}", "public interface ICommunityBaseDataHisService extends IBaseService<CommunityBaseDataHisDto,CommunityBaseDataHisCond> {\n PageVo<CommunityBaseDataHisDto> findByPaging(int start, int length, int draw, Long id);\n}", "public interface BaseRepository<T, PK extends Serializable> {\n PK save(T newInstance) throws DataAccessException;\n\n void update(T transientObject) throws DataAccessException;\n\n void saveOrUpdate(T transientObject) throws DataAccessException;\n\n void saveOrUpdateAll(List<T> transientObjects) throws DataAccessException;\n\n void delete(T persistentObject) throws DataAccessException;\n\n void delete(PK... id) throws DataAccessException;\n\n T findById(PK id) throws DataAccessException;\n\n List<T> findAll() throws DataAccessException;\n}", "public interface ParametrageAppliRepository extends CrudRepository<ParametresAppliDTO, Integer> {\n /**\n * This method will find an User instance in the database by its email.\n * Note that this method is not implemented and its working code will be\n * automatically generated from its signature by Spring Data JPA.\n */\n\n public ParametresAppliDTO findByTypeEnvironnement(int idTypeEnvironement);\n\n\n}", "@Repository\r\npublic interface DepartmentRepository extends JpaRepository<Department, Integer>\r\n{\r\n\t\r\n\t/**\r\n\t * utilise la methode findById du CrudRepository en utilisant le nom du service comme parametre\r\n\t * \r\n\t * @param nameDepartment\r\n\t * @return une service\r\n\t */\r\n\t\r\n\tpublic Department findByNameDepartment(String nameDepartment);\r\n\r\n\tpublic Department findByIdDepartment(Integer idDepartment);\r\n\t\r\n}", "public interface SavingsRepository extends Repository<Savings, Long> {\n}" ]
[ "0.7750534", "0.7459393", "0.73562646", "0.730699", "0.730081", "0.72709715", "0.724902", "0.7208426", "0.7142261", "0.71038705", "0.7100001", "0.7091276", "0.70893055", "0.7053461", "0.70519346", "0.7013521", "0.69866747", "0.6966198", "0.69661766", "0.6959226", "0.695545", "0.69520885", "0.6950522", "0.6949612", "0.6946785", "0.69452316", "0.69443077", "0.6940022", "0.69304097", "0.6922337", "0.69190097", "0.69177777", "0.69157743", "0.6910436", "0.6908349", "0.6899107", "0.6887712", "0.6875783", "0.6873781", "0.6872562", "0.6866985", "0.68664527", "0.6862478", "0.6861994", "0.68565583", "0.6855976", "0.68539745", "0.6846095", "0.6841745", "0.6839363", "0.6829449", "0.68219805", "0.6807978", "0.6806308", "0.680485", "0.67988694", "0.67963016", "0.6796276", "0.6795542", "0.67864287", "0.67798", "0.67792356", "0.6772013", "0.67712307", "0.67671573", "0.6765896", "0.6764636", "0.67619306", "0.6759414", "0.67569107", "0.6756256", "0.6754876", "0.6752731", "0.67488253", "0.6748009", "0.6747415", "0.6746653", "0.6746096", "0.674352", "0.67429805", "0.6742523", "0.67383826", "0.6734878", "0.6732469", "0.6731886", "0.67289877", "0.67278284", "0.6726686", "0.67237765", "0.67233586", "0.6721209", "0.67206854", "0.6718082", "0.6717926", "0.67146796", "0.67125845", "0.6708432", "0.67074054", "0.67073596", "0.6705958", "0.67057306" ]
0.0
-1
id ID yes no CCS identifier of the judgement submission_id ID yes no CCS identifier of the submission judged judgement_type_id ID yes yes CCS the verdict of this judgement start_time TIME yes no CCS absolute time when judgement started start_contest_time RELTIME yes no CCS contest relative time when judgement started end_time TIME yes yes CCS absolute time when judgement completed end_contest_time RELTIME yes yes CCS contest relative time when judgement completed id submission_id judgement_type_id
public String createJSON(IInternalContest contest, Run run) { StringBuilder stringBuilder = new StringBuilder(); appendPair(stringBuilder, "id", run.getNumber()); stringBuilder.append(", "); appendPair(stringBuilder, "submission_id", run.getNumber()); stringBuilder.append(", "); if (run.isJudged()) { ElementId judgementId = run.getJudgementRecord().getJudgementId(); Judgement judgement = contest.getJudgement(judgementId); appendPair(stringBuilder, "judgement_type_id", judgement.getAcronym()); } else { appendPairNullValue(stringBuilder, "judgement_type_id"); } // start_time TIME yes no provided by CCS absolute time when judgement started // start_contest_time RELTIME yes no provided by CCS contest relative time when judgement started // end_time TIME yes yes provided by CCS absolute time when judgement completed // end_contest_time RELTIME yes yes provided by CCS contest relative time when judgement completed // [{"id":"189549","submission_id":"wf2017-32163123xz3132yy","judgement_type_id":"CE","start_time":"2014-06-25T11:22:48.427+01", // "start_contest_time":"1:22:48.427","end_time":"2014-06-25T11:23:32.481+01","end_contest_time":"1:23:32.481"}, // {"id":"189550","submission_id":"wf2017-32163123xz3133ub","judgement_type_id":null,"start_time":"2014-06-25T11:24:03.921+01", // "start_contest_time":"1:24:03.921","end_time":null,"end_contest_time":null} // ] Calendar wallElapsed = calculateElapsedWalltime(contest, run.getElapsedMS()); stringBuilder.append(", "); appendPair(stringBuilder, "start_time", wallElapsed); // absolute time when judgement started ex. 2014-06-25T11:24:03.921+01 stringBuilder.append(", "); appendPair(stringBuilder, "start_contest_time", XMLUtilities.formatSeconds(run.getElapsedMS())); // contest relative time when judgement started. ex. 1:24:03.921 stringBuilder.append(", "); appendPairNullValue(stringBuilder, "end_time"); // TODO CLICS DATA ADD - add code to save in JudgementRecord in Executable stringBuilder.append(", "); appendPairNullValue(stringBuilder, "end_contest_time"); // TODO CLICS DATA ADD add code to save in JudgementRecord - in Executable return stringBuilder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void makeJudgement (Player player) {\r\n judgement.countTurn();\r\n judgement.setPlayer(player);\r\n boolean victoryFlag;\r\n String playerMarker = player.getPlayerMarker();\r\n int playerRow = player.getPlayerRow();\r\n int playerColumn = player.getPlayerColumn();\r\n\r\n victoryFlag = horizontalJudge(playerMarker, playerRow, playerColumn);\r\n\r\n if (!victoryFlag) {\r\n victoryFlag = verticalJudge(playerMarker, playerRow, playerColumn);\r\n }\r\n\r\n if (!victoryFlag) {\r\n victoryFlag = diagonalJudge(playerMarker, playerRow, playerColumn);\r\n }\r\n\r\n if (victoryFlag) {\r\n judgement.markGameTime();\r\n // Make/update leader board\r\n leaderboard.setWinner(player.getPlayerName());\r\n\r\n // Update leader board file\r\n }\r\n\r\n leaderboard.setGameTime(judgement.getGameTime());\r\n\r\n }", "public void approach(contestant c) throws InterruptedException {\n\n int rand1 = ThreadLocalRandom.current().nextInt(1500, 5000);\n int rand2 = ThreadLocalRandom.current().nextInt(1, 3);\n\n setPriority(10); //raise thread priority to make decision\n\n //System.out.println(this.getName() + \" is now talking to \" + c.getName());\n sleep(rand1); // simulate 'talking phase'\n\n visit[c.getID()] = true; // record contestant attempt\n\n if (rand2 == 2) { // if roll is successful (contestant gets number) (33.3% chance of success)\n\n msg(\"has given their number to \" + c.getName());\n //System.out.println(this.getName() + \" has given their number to \" + c.getName());\n c.datenums.add(this); // record successful match inside contestant\n\n } else\n\n msg(\"has rejected \" + c.getName());\n //System.out.println(this.getName() + \" has rejected \" + c.getName());\n\n sem.release();\n\n setPriority(5); //reset thread priority to default\n\n increaseRound(c); // increase round total\n\n }", "DateTime getSubmissionTime();", "private void caculateJudgeResult(Map<String, Long> timeMap, Map<String, Object> judgeResult, Slice slice,\n Expression expr, ConditionResult cr) {\n if (judgeResult.get(\"time_to\") != null && judgeResult.get(\"time_to\")\n .equals(DateTimeHelper.toFormat(\"yyyy-MM-dd HH:mm\", timeMap.get(\"time_to\")))) {\n return;\n }\n\n Double currentValue = queryValue(slice, expr, timeMap.get(\"time_from\"),\n timeMap.get(\"time_to\"));\n Double lastValue = 0.0;\n\n if ((expr.getLowerLimit().contains(\"#\") || expr.getLowerLimit().contains(\"*\"))\n && (expr.getUpperLimit().contains(\"#\") || expr.getUpperLimit().contains(\"*\"))) {\n // do nothing\n }\n // if the last judgeResult is really the last judgeTime's result, use it's currentValue as lastValue.\n else if (judgeResult.get(\"time_to\") != null\n && judgeResult.get(\"time_to\")\n .equals(DateTimeHelper.toFormat(\"yyyy-MM-dd HH:mm\", timeMap.get(\"last_time_to\")))\n && judgeResult.get(\"currentValue\") != null) {\n lastValue = Double.parseDouble(String.valueOf(judgeResult.get(\"currentValue\")));\n }\n else {\n lastValue = queryValue(slice, expr, timeMap.get(\"last_time_from\"),\n timeMap.get(\"last_time_to\"));\n }\n\n judgeResult.put(\"instance\", slice.getKey());\n\n for (String key : timeMap.keySet()) {\n judgeResult.put(key, DateTimeHelper.dateFormat(new Date(timeMap.get(key)), \"yyyy-MM-dd HH:mm\"));\n\n }\n judgeResult.put(\"currentValue\", currentValue);\n judgeResult.put(\"lastValue\", lastValue);\n\n if (currentValue == null || lastValue == null) {\n judgeResult.put(\"fire\", false);\n }\n else {\n judgeResult.put(\"fire\", caculate(currentValue, lastValue, expr, judgeResult));\n }\n\n // cache the judgeResult\n cm.putHash(RuntimeNotifyCatcher.UAV_CACHE_REGION, TIMER_JUDGE_RESULT, slice.getKey() + expr.getHashCode(),\n JSONHelper.toString(judgeResult));\n\n // set there is a judge event\n cr.setIsJudgeTime(true);\n\n }", "public parmLottC () {\r\n \r\n course = \"\"; // name of this course\r\n\r\n idA = new long [100]; // request id array\r\n wghtA = new int [100]; // weight of this request\r\n\r\n id2A = new long [100]; // request id array\r\n wght2A = new int [100]; // weight of this request\r\n players2A = new int [100]; // # of players in the request\r\n\r\n timeA = new int [100]; // tee time\r\n fbA = new short [100]; // f/b for the tee time\r\n busyA = new boolean [100]; // tee time busy flag\r\n\r\n atimeA = new int [5]; // assigned tee time array per req (save area)\r\n }", "@Query(\"\"\"\n SELECT COUNT (DISTINCT p) FROM ProgrammingExerciseStudentParticipation p\n JOIN p.submissions s\n WHERE p.exercise.assessmentType <> 'AUTOMATIC'\n AND p.exercise.course.id = :#{#courseId}\n AND s.submitted = TRUE\n AND (s.type <> 'ILLEGAL' OR s.type IS NULL)\n \"\"\")\n long countLegalSubmissionsByCourseIdSubmitted(@Param(\"courseId\") Long courseId);", "public long getCompletionTime(Tab patchType)\n\t{\n\t\tLong completionTime = completionTimes.get(patchType);\n\t\treturn completionTime == null ? -1 : completionTime;\n\t}", "private String proposeTime(Conversation conv, boolean correction)\n throws IOException {\n // propose a time block\n Calendar appt = scheduleManager.getApptSlot();\n conv.setAppointmentTime(appt);\n // transition to a the message proposed state\n conv.setState(Conversation.STATE_APPT_PROPOSED);\n\n // generate the message\n if (correction) {\n return WordLattice.fromFile(\"correction.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n } else {\n return WordLattice.fromFile(\"propose.lat\")\n .generate(conv.getAppointmentTime(), conv.getName());\n }\n }", "public JSONObject dealWithAskTeacher(BigDecimal viewId, String content,BigDecimal questionType);", "public void testTieBreakerSubmissionTime() throws Exception{\n\n // Sort order:\n // Primary Sort = number of solved problems (high to low)\n // Secondary Sort = score (low to high)\n // Tertiary Sort = earliest submittal of last submission (low to high)\n // Forth Sort = teamName (low to high)\n // Fifth Sort = clientId (low to high)\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,5,A,12,No\",\n \"6,5,A,12,Yes\", \n \n \"7,6,A,12,No\",\n \"8,6,A,12,Yes\",\n \n // Both solve 1 score 32 (no for 20, 12 min)\n\n \"15,5,B,21,No\",\n \"16,5,B,22,Yes\", \n \n \"25,6,B,21,No\",\n \"26,6,B,22,Yes\", \n \n // Both solve 2 score 42 (no for 20 and 22 min)\n // total 74 each\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n // must identical score, sort by team display name, identical ranks.\n \"1,team5,2,74\",\n \"1,team6,2,74\",\n \"3,team1,0,0\",\n \"3,team2,0,0\",\n \"3,team3,0,0\",\n \"3,team4,0,0\",\n };\n \n scoreboardTest (6, runsData, rankData);\n }", "private Date getLatestPermanencyHearingCourtOrderDateByIdCaseByIdPerson(int idCase, int idPerson){\r\n LegalAction legalAction = null;\r\n Collection<LegalActionCrtLang> cdLegalActionCrtLangs = null;\r\n \r\n legalAction = legalActionDAO.findLatestPrmncyHrgWithReasonbleEffByIdCaseByIdPerson(\r\n idCase,\r\n idPerson);\r\n \r\n if( legalAction != null ){\r\n Date dtCourtOrder = legalAction.getDtCrtOrdDate();\r\n \r\n if( dtCourtOrder != null ){\r\n // court language contains reason effort made to finalized permanency plan\r\n Calendar calToday = Calendar.getInstance();\r\n \r\n // year from court order date minus 1 day\r\n Calendar calYearFromCourtOrder = Calendar.getInstance();\r\n calYearFromCourtOrder.setTime(dtCourtOrder);\r\n calYearFromCourtOrder.add(Calendar.YEAR, 1);\r\n calYearFromCourtOrder.add(Calendar.DAY_OF_MONTH, -1);\r\n \r\n // Annual Permanency Plan expires during or after \r\n // current month of reimbursability determination\r\n // therefore may still be IV-E Reimbursable until end of current month and after.\r\n if((calYearFromCourtOrder.get(Calendar.YEAR) > calToday.get(Calendar.YEAR))){\r\n // regardless if permanency plan expiration year is greater, return date\r\n return dtCourtOrder;\r\n } else if( (calYearFromCourtOrder.get(Calendar.MONTH) >= calToday.get(Calendar.MONTH)) \r\n & (calYearFromCourtOrder.get(Calendar.YEAR) >= calToday.get(Calendar.YEAR)) ){\r\n // since year is the same, we check the month Permanency plan expires\r\n return dtCourtOrder;\r\n }\r\n }\r\n }\r\n // no legal action with court language of reasonable effort made to \r\n // finalize permanency plan within period\r\n return null;\r\n }", "public void submitToIacucForReview(IacucProtocol protocol, IacucProtocolSubmitAction submitAction) throws Exception {\n \n /*\n * The submission is saved first so that its new primary key can be added\n * to the protocol action entry.\n */\n String prevSubmissionStatus = protocol.getProtocolSubmission().getSubmissionStatusCode();\n String submissionTypeCode = protocol.getProtocolSubmission().getSubmissionTypeCode();\n IacucProtocolSubmission submission = createProtocolSubmission(protocol, submitAction);\n \n /*\n * If this is an initial submission, then set the initial submission date.\n */\n if (protocol.getInitialSubmissionDate() == null) {\n protocol.setInitialSubmissionDate(new Date(submission.getSubmissionDate().getTime()));\n }\n \n getIacucProtocolAssignReviewersService().assignReviewers(submission, submitAction.getReviewers());\n \n IacucProtocolAction protocolAction = new IacucProtocolAction(protocol, submission, IacucProtocolActionType.SUBMITTED_TO_IACUC);\n protocolAction.setComments(SUBMITTED_TO_IACUC);\n //For the purpose of audit trail\n protocolAction.setPrevProtocolStatusCode(protocol.getProtocolStatusCode());\n protocolAction.setPrevSubmissionStatusCode(prevSubmissionStatus);\n protocolAction.setSubmissionTypeCode(submissionTypeCode);\n protocolAction.setCreatedSubmission(true);\n protocol.getProtocolActions().add(protocolAction);\n \n IacucProtocolStatus protocolStatus = new IacucProtocolStatus();\n protocolStatus.setProtocolStatusCode(IacucProtocolActionType.SUBMITTED_TO_IACUC);\n protocolStatus.setDescription(SUBMITTED_TO_IACUC);\n protocol.setProtocolStatus(protocolStatus);\n protocol.setProtocolStatusCode(IacucProtocolActionType.SUBMITTED_TO_IACUC);\n \n protocolActionService.updateProtocolStatus(protocolAction, protocol);\n \n if (submission.getScheduleIdFk() != null) {\n updateDefaultSchedule(submission);\n }\n businessObjectService.delete(protocol.getProtocolDocument().getPessimisticLocks());\n protocol.getProtocolDocument().getPessimisticLocks().clear();\n documentService.saveDocument(protocol.getProtocolDocument());\n\n protocol.refresh();\n }", "Calendar getSubmissionDeadline(ReportingPeriod period, Long transmissionType);", "public void setSubmissionId(long submissionId) {\r\n this.submissionId = submissionId;\r\n }", "public long getSubmissionId() {\r\n return submissionId;\r\n }", "public boolean checkShowSubmitPolicy(Integer ctId,Integer snId){\n\n //check if participator first\n String handle = (String)httpSession.getAttribute(Constants.CURRENT_LOGIN_USER_HANDLE);\n boolean flag = false;\n List<AuthorityDTO> lstAuthority = authorityMapper.getContestAuthority(ctId, handle);\n for (AuthorityDTO curAuth : lstAuthority) {\n if (curAuth.getId().equals(Constants.AUTH_VIEW_CONTEST_ID)) {\n return true;\n }\n if (curAuth.getId().equals(Constants.AUTH_PARTICIPATE_CONTEST_ID)) {\n flag = true;\n }\n }\n if (!flag){\n return false;\n }\n\n //then check policy\n ContestEntity contestEntity = getContestById(ctId);\n if (contestEntity.getShowSubmit().equals(Constants.SHOW_SUBMIT_ALL)){\n return true;\n }\n\n SubmissionEntity submissionEntity = new SubmissionEntity();\n submissionEntity.setId(snId);\n List<SubmissionEntity> lstSubmission = submissionMapper.selectWithExample(submissionEntity);\n if (lstSubmission.size() != 1){\n throw new NoSuchPageException(\"Submission not found!\");\n }\n\n //check if submission is from current user\n submissionEntity = lstSubmission.get(0);\n Integer currentUserId = (Integer)httpSession.getAttribute(Constants.CURRENT_LOGIN_USER_ID);\n if (submissionEntity.getUrId().equals(currentUserId)){\n return true;\n }\n\n //else check current user has solved this problem and this contests allow to view solved problem's solutions\n if (contestEntity.getShowSubmit().equals(Constants.SHOW_SUBMIT_SOLVED)){\n Integer solveCnt = submissionMapper.checkSolvedStatusInContest(ctId,submissionEntity.getPmId(),submissionEntity.getUrId());\n return solveCnt > 0;\n }\n return false;\n }", "public static int checkDeadline(int userid) {\n try {\n Statement st = conn.createStatement();\n //get all tasks of the user\n String getTasksCommand = \"SELECT mytask FROM users WHERE userid = \" + userid;\n ResultSet taskIdResult = st.executeQuery(getTasksCommand);\n if(taskIdResult.next()) {\n\n Long[] taskIds = (Long[]) taskIdResult.getArray(1).getArray();\n\n for (Long taskId : taskIds) {\n //get task info from group task table\n String getTaskInfoCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskId;\n ResultSet taskInfo = st.executeQuery(getTaskInfoCommand);\n if (taskInfo.next()) {\n LocalDate startdate = taskInfo.getDate(STARTDATE_COLUMN).toLocalDate();\n LocalDate deadlineDate = taskInfo.getDate(DEADLINE_COLUMN).toLocalDate();\n String repetition = taskInfo.getString(REPETITION_COLUMN);\n String members = taskInfo.getString(\"member\");\n int deadlineStatus = meetRecentDeadline(startdate, deadlineDate, repetition);\n if (deadlineStatus == NO_RECENT_DEADLINE) {\n //do nothing\n } else { //check progress and frequency\n String getProgressCommand = \"SELECT * FROM progresstrack WHERE memberid = \"\n + userid + \" AND taskid = \" + taskId;\n ResultSet progressInfo = st.executeQuery(getProgressCommand);\n if (progressInfo.next()) {\n int progress = progressInfo.getInt(TRACK_PROGRESS_COLUMN);\n int frequency = progressInfo.getInt(TRACK_FREQUENCY_COLUMN);\n if (progress < frequency) {\n\n String recordPenaltyCommand = String.format(\"INSERT INTO penalty(userid, taskid, members) VALUES(%d, %d, '%s')\", userid, taskId, members);\n st.executeUpdate(recordPenaltyCommand);\n String removeMyselfCommand = String.format(\"UPDATE penalty SET members = array_remove(members, '%d') WHERE userid = %d AND taskid = %d\", userid, userid, taskId);\n st.executeUpdate(removeMyselfCommand);\n String addPenaltyCountCommand = String.format(\"UPDATE progresstrack SET penaltycount = penaltycount+1 WHERE taskid = %d AND memberid = %d\", taskId, userid);\n st.executeUpdate(addPenaltyCountCommand);\n }\n }\n if (deadlineStatus == MEET_RECENT_DEADLINE) {\n String clearProgressCommand = String.format(\"UPDATE progresstrack SET progress = 0 WHERE memberid = %d AND taskid = %d\", userid, taskId);\n st.executeUpdate(clearProgressCommand);\n } else {\n String setTaskInvalid = String.format(\"UPDATE grouptask SET valid = false WHERE taskid = %d\", taskId);\n st.executeUpdate(setTaskInvalid);\n String removeFromTask = String.format(\"UPDATE users SET mytask = array_remove(mytask, '%d') WHERE userid = %d\", taskId, userid);\n st.executeUpdate(removeFromTask);\n String addToCompleteTask = String.format(\"UPDATE users SET completetask = array_append(completetask, '%d') WHERE userid = %d\", taskId, userid);\n st.executeUpdate(addToCompleteTask);\n }\n\n }\n }\n }\n }\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }", "com.google.protobuf.TimestampOrBuilder getVotingStartTimeOrBuilder();", "public parmLottC (int req_size, int tee_size) {\r\n \r\n if (tee_size < req_size) tee_size = req_size; // must be at least as many entries for tee times as there are requests\r\n \r\n tee_size++; // must add one entry for 'end of entries' marker (0)\r\n \r\n course = \"\"; // name of the course specified in Lottery (or -ALL-)\r\n\r\n idA = new long [req_size]; // request id array\r\n wghtA = new int [req_size]; // weight of this request\r\n\r\n id2A = new long [tee_size]; // request id array (one entry for each tee time so they match by index)\r\n wght2A = new int [tee_size]; // weight of this request\r\n players2A = new int [tee_size]; // # of players in the request\r\n\r\n timeA = new int [tee_size]; // tee time\r\n fbA = new short [tee_size]; // f/b for the tee time\r\n courseA = new String [tee_size]; // course for the tee time (required for new processing - make time the priority)\r\n busyA = new boolean [tee_size]; // tee time busy flag\r\n\r\n atimeA = new int [5]; // assigned tee time array per req (save area)\r\n afbA = new short [5]; // assigned f/b array per req (save area)\r\n \r\n req_count = req_size; // save array lengths\r\n tee_count = tee_size;\r\n \r\n courseA[(tee_size-1)] = \"\"; // remove null value of last tee marker entery\r\n }", "protected void setSubmissionStatus(IacucProtocolSubmissionBuilder submissionBuilder, IacucProtocolSubmitAction submitAction) {\n // not setting committee during submit in iacuc so need not check that like in irb.\n submissionBuilder.setSubmissionStatus(IacucProtocolSubmissionStatus.PENDING);\n }", "public void process_request_message(int their_sn,int j, String filename)\n {\n // boolean flag to identify if our request has higher priority than other requests\n boolean our_priority;\n\n synchronized(cnode.r_list)\n {\n // update the highest sequence number from this received message\n cnode.r_list.get(filename).cword.high_sn = Math.max(cnode.r_list.get(filename).cword.high_sn,their_sn);\n // set the priority flag\n // our timestamp is earlier or if timestamps are equal and our ID is lower : higher priority\n our_priority = (their_sn > cnode.r_list.get(filename).cword.our_sn) || ( (their_sn == cnode.r_list.get(filename).cword.our_sn) & ( j > cnode.r_list.get(filename).cword.ME ) );\n \n System.out.println(\"check if need to send reply\");\n // if in critical section or we have issued a request with higher priority\n if ( cnode.r_list.get(filename).cword.using || ( cnode.r_list.get(filename).cword.waiting & our_priority) )\n {\n cnode.r_list.get(filename).cword.reply_deferred[j] = true;\n System.out.println(\"DEFERRING REPLY to \"+j+ \"for now\");\n }\n \n // not in critical section or have no request pending\n if ( !(cnode.r_list.get(filename).cword.using || cnode.r_list.get(filename).cword.waiting) || ( cnode.r_list.get(filename).cword.waiting & !cnode.r_list.get(filename).cword.A[j] & !our_priority ) )\n {\n System.out.println(\"REPLY to \"+ j+\";neither in crit nor requesting\");\n cnode.r_list.get(filename).cword.A[j] = false;\n crit_reply(filename);\n }\n \n // got a higher priority request\n if ( cnode.r_list.get(filename).cword.waiting & cnode.r_list.get(filename).cword.A[j] & !our_priority )\n {\n System.out.println(\"REPLY to \"+ j+\";optimization+received higher priority request\");\n // since we are sending a reply, need to unset authorized flag\n cnode.r_list.get(filename).cword.A[j] = false;\n crit_reply(filename);\n crit_request(cnode.r_list.get(filename).cword.our_sn,filename);\n }\n }\n }", "public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }", "@Override\n\tpublic long getSubmissionId() {\n\t\treturn model.getSubmissionId();\n\t}", "private static void createSubmission(String[] attributes, int docuID, int orgID) {\n\t\tint actID = ActivityDetailsService.getActivityDetailsByDocuID(docuID).getId();\n\t\tint submissionID = SubmissionDetailsService.getSubmissionIDByDateSubmittedAndActID(toDateTime(attributes[0]), actID);\n\t\t//System.out.println(\"docuID: \" + docuID);\n\t\tif(submissionID == 0){\n\t\t\t//create submission details\n\t\t\tSubmissionDetails subDet = new SubmissionDetails();\n\t\t\tsubDet.setActID(actID);\n\t\t\tsubDet.setSubmittedBy(attributes[16]);\n\t\t\tsubDet.setContactNo(attributes[17]);\n\t\t\tsubDet.setEmailAddress(attributes[18]);\n\t\t\tsubDet.setDateSubmitted(toDateTime(attributes[0]));\n\t\t\tsubDet.setSubmissionType(attributes[4]);\n\t\t\t\n\t\t\tif(subDet.getSubmissionType().equalsIgnoreCase(\"Special Approval Slip\"))\n\t\t\t\tsubDet.setSasType(attributes[19]);\n\t\t\telse subDet.setSasType(\"-\");\n\t\t\tSubmissionDetailsService.addSubmissionDetails(subDet);\n\t\t\tif(attributes.length >= 21) {\n\t\t\t\tsubmissionID = SubmissionDetailsService.getSubmissionIDByDateSubmittedAndActID(toDateTime(attributes[0]), actID);\n\t\t\t\tcreateCheckingDetails(attributes, submissionID);\n\t\t\t}\n\t\t} else {\n\t\t\tif(attributes.length >= 21) {\n\t\t\t\tsubmissionID = SubmissionDetailsService.getSubmissionIDByDateSubmittedAndActID(toDateTime(attributes[0]), actID);\n\t\t\t\tcreateCheckingDetails(attributes, submissionID);\n\t\t\t}\n\t\t}\n\t\n\t}", "com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();", "public void addContingencyHandlingAttempt(long time) {\n\t\t// add contingency time\n\t\tthis.contingencyAttempts.add(time);\n\t}", "@ResponseBody\n @RequestMapping(value=\"/course/fillclassroom\")\n public HashMap<Integer, String> fillClassroom(@RequestParam(\"startTime\") String STARTtime, @RequestParam(\"endTime\") String ENDtime, @RequestParam(\"id\") String id){\n\n //parse the time into Timestamps\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n try{\n int courseid=Integer.parseInt(id);\n Timestamp startTime=new Timestamp(formatter.parse(STARTtime).getTime());\n Timestamp endTime=new Timestamp(formatter.parse(ENDtime).getTime());\n //get the non taken classrooms and store them in a hashmap\n dbManager.initializeDatabase();\n HashMap< Integer, String > classroomList = new HashMap<>();\n LinkedList<Classroom> classrooms=dbManager.getValidClassrooms(startTime,endTime,courseid);\n dbManager.closeDatabase();\n for(Classroom classroomInList:classrooms){\n classroomList.put(classroomInList.getId(),classroomInList.getName());\n }\n return classroomList;\n }\n catch (ParseException e){\n System.err.println(\"Parse Fail\");\n }\n return new HashMap<>();\n }", "private void updateCompletionTime()\n\t{\n\t\tfor (Map.Entry<Tab, Set<FarmingPatch>> tab : farmingWorld.getTabs().entrySet())\n\t\t{\n\t\t\tlong extremumCompletionTime = config.preferSoonest() ? Long.MAX_VALUE : 0;\n\t\t\tboolean allUnknown = true;\n\t\t\tboolean allEmpty = true;\n\n\t\t\tfor (FarmingPatch patch : tab.getValue())\n\t\t\t{\n\t\t\t\tPatchPrediction prediction = predictPatch(patch);\n\t\t\t\tif (prediction == null || prediction.getProduce().getItemID() < 0)\n\t\t\t\t{\n\t\t\t\t\tcontinue; // unknown state\n\t\t\t\t}\n\n\t\t\t\tallUnknown = false;\n\n\t\t\t\tif (prediction.getProduce() != Produce.WEEDS && prediction.getProduce() != Produce.SCARECROW)\n\t\t\t\t{\n\t\t\t\t\tallEmpty = false;\n\n\t\t\t\t\t// update max duration if this patch takes longer to grow\n\t\t\t\t\tif (config.preferSoonest())\n\t\t\t\t\t{\n\t\t\t\t\t\textremumCompletionTime = Math.min(extremumCompletionTime, prediction.getDoneEstimate());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\textremumCompletionTime = Math.max(extremumCompletionTime, prediction.getDoneEstimate());\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfinal SummaryState state;\n\t\t\tfinal long completionTime;\n\n\t\t\tif (allUnknown)\n\t\t\t{\n\t\t\t\tstate = SummaryState.UNKNOWN;\n\t\t\t\tcompletionTime = -1L;\n\t\t\t}\n\t\t\telse if (allEmpty)\n\t\t\t{\n\t\t\t\tstate = SummaryState.EMPTY;\n\t\t\t\tcompletionTime = -1L;\n\t\t\t}\n\t\t\telse if (extremumCompletionTime <= Instant.now().getEpochSecond())\n\t\t\t{\n\t\t\t\tstate = SummaryState.COMPLETED;\n\t\t\t\tcompletionTime = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate = SummaryState.IN_PROGRESS;\n\t\t\t\tcompletionTime = extremumCompletionTime;\n\t\t\t}\n\t\t\tsummaries.put(tab.getKey(), state);\n\t\t\tcompletionTimes.put(tab.getKey(), completionTime);\n\t\t}\n\t}", "private void appendFinishTime(StringBuilder sb, Competitor c) {\n\t\tif (!c.getFinishTimes().isEmpty()) {\n\t\t\tsb.append(Formater.formatColumns(c.getFinishTimes().get(\n\t\t\t\t\tc.getFinishTimes().size() - 1)));\n\t\t}\n\t\tif (c.getStartTimes().size() > 1) {\n\t\t\tsb.append(\"; \" + MULTIPLE_STARTS + \" \");\n\t\t\tfor (int i = 1; i < c.getStartTimes().size(); i++) {\n\t\t\t\tsb.append(c.getStartTimes().get(i));\n\t\t\t}\n\t\t}\n\t\tappendCheckImpossibleLapTime(sb, c);\n\n\t}", "public static JSONObject submitfeedback( String taste, String portion, String hotness,\n\t\t\tString packing, String timelydelivered,String overallRating, String foodcomment, String userMailId) throws JSONException{\n\t\tJSONObject submitfeedbackObject = new JSONObject();\n\t\tBoolean submitsuccess = false;\n\n\t\ttry {\n\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t/***SQL BLOCK STARTS HERE***/\n\t\t\tSQL:{\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\t/*String sql = \"UPDATE fapp_order_feedback SET overeall_rating=?, \"\n\t \t\t\t \t\t\t +\" warm_food=?,on_time=?,behaviour=?,comment=?\"\n\t \t\t\t\t\t +\" WHERE user_mail_id = ? and order_id=?\";*/\n\n\t\t\t\tString sql =\"UPDATE fapp_order_feedback \"\n\t\t\t\t\t\t+\" SET overeall_rating=?, \"\n\t\t\t\t\t\t+\" taste=?, timely_delivered=?, \"\n\t\t\t\t\t\t+\" hotness=?,comment=?,\" \n\t\t\t\t\t\t+\" portion =?, packing=? \"\n\t\t\t\t\t\t+\" WHERE user_mail_id=? AND order_id=?;\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tfor(Integer orderid : getUnfeedBackedOrderIds(userMailId)){\n\t\t\t\t\t\tpreparedStatement.setString(1, overallRating);\n\t\t\t\t\t\tif(taste.equals(\"true\")){\n\t\t\t\t\t\t\tpreparedStatement.setString(2,\"NOT OK\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpreparedStatement.setString(2, \"OK\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(timelydelivered.equals(\"true\")){\n\t\t\t\t\t\t\tpreparedStatement.setString(3,\"NOT OK\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpreparedStatement.setString(3, \"OK\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(hotness.equals(\"true\")){\n\t\t\t\t\t\t\tpreparedStatement.setString(4,\"NOT OK\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpreparedStatement.setString(4, \"OK\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(foodcomment!=null){\n\t\t\t\t\t\t\tpreparedStatement.setString(5,foodcomment);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpreparedStatement.setString(5, \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(portion.equals(\"true\")){\n\t\t\t\t\t\t\tpreparedStatement.setString(6,\"NOT OK\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpreparedStatement.setString(6, \"OK\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(packing.equals(\"true\")){\n\t\t\t\t\t\t\tpreparedStatement.setString(7,\"NOT OK\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpreparedStatement.setString(7, \"OK\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpreparedStatement.setString(8, userMailId);\n\t\t\t\t\t\tpreparedStatement.setInt(9, orderid);\n\t\t\t\t\t\tpreparedStatement.addBatch();\n\t\t\t\t\t} \n\t\t\t\t\tint [] count = preparedStatement.executeBatch();\n\t\t\t\t\tfor(Integer integer : count){\n\t\t\t\t\t\tSystem.out.println(\"feedback submitted_\");\n\t\t\t\t\t\tsubmitsuccess = true;\n\t\t\t\t\t}\n\t\t\t\t\tsubmitfeedbackObject.put(\"status\", submitsuccess);\n\t\t\t\t\t/*if(count>0){\n\t\t\t\t\t\t\t System.out.println(\"feedback submitted!\");\n\t\t\t\t\t\t\t submitfeedbackObject.put(\"status\", true);\n\t\t\t\t\t\t }*/ \n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally{\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t/***SQL BLOCK ENDS HERE***/\n\t\t} catch (Exception e) {\n\t\t}\n\t\treturn submitfeedbackObject;\t\n\t}", "com.google.protobuf.Timestamp getSubmitTime();", "BigInteger getResponse_time();", "public void testScoreboardForBeingJudgedState () throws Exception {\n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20 (a No before first yes)\n \"2,1,A,3,Yes\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"3,1,A,5,No\", // zero -- after Yes\n \"4,1,A,7,Yes\", // zero -- after Yes\n \"5,1,A,9,No\", // zero -- after Yes\n \"6,1,B,11,No\", // zero -- not solved\n \"7,1,B,13,No\", // zero -- not solved\n \"8,2,A,30,Yes\", // 30 (minute points; no Run points on first Yes)\n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n// startExplorer(getOutputDataDirectory());\n \n InternalContest contest = new InternalContest();\n \n int numTeams = 2;\n\n initData(contest, numTeams, 5);\n \n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Run [] runs = contest.getRuns();\n \n for (Run run : runs){\n run.setStatus(RunStates.BEING_JUDGED);\n }\n\n checkOutputXML(contest);\n\n confirmRanks(contest, rankData);\n }", "public static void m33071jC(long j) {\n AppMethodBeat.m2504i(135620);\n C34832a.aUq().mo48328lY(j);\n C30065b c30065b = new C30065b();\n C34832a.aUq().mo16761b(j, (C4925c) c30065b);\n if (c30065b.field_msgInfoId <= 0) {\n AppMethodBeat.m2505o(135620);\n return;\n }\n C7620bi jf = ((C6982j) C1720g.m3528K(C6982j.class)).bOr().mo15340jf(c30065b.field_msgInfoId);\n if (jf.field_msgId != c30065b.field_msgInfoId) {\n AppMethodBeat.m2505o(135620);\n return;\n }\n jf.setStatus(5);\n ((C6982j) C1720g.m3528K(C6982j.class)).bOr().mo15284a(jf.field_msgId, jf);\n AppMethodBeat.m2505o(135620);\n }", "@Query(\"\"\"\n SELECT COUNT (DISTINCT p) FROM ProgrammingExerciseStudentParticipation p\n JOIN p.submissions s\n WHERE p.exercise.assessmentType <> 'AUTOMATIC'\n AND p.exercise.exerciseGroup.exam.id = :#{#examId}\n AND s IS NOT EMPTY\n AND (s.type <> 'ILLEGAL' OR s.type is null)\n \"\"\")\n long countLegalSubmissionsByExamIdSubmitted(@Param(\"examId\") Long examId);", "private static void createCheckingDetails(String[] attributes, int submissionID) {\n\t\tif(!CheckingDetailsService.findSubmissionByID(submissionID) \n\t\t\t\t&& !attributes[20].equals(\"\")) {\n\t\t\t//create checking details\n\t\t\t//System.out.println(submissionID+\"\");\n\t\t\tCheckingDetails checkDet = new CheckingDetails();\n\t\t\ttry{\n\t\t\t\tcheckDet.setCheckerName(attributes[21]);\n\t\t\t} catch(Exception e){\n\t\t\t\tcheckDet.setCheckerName(\"N/A\");\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tcheckDet.setDateChecked(attributes[22]);\n\t\t\t} catch(Exception e){\n\t\t\t\tcheckDet.setDateChecked(\"N/A\");\n\t\t\t}\n\t\t\t\n\t\t\tString remark = \"\";\n\t\t\t\n\t\t\tif(attributes.length >= 24){\n\t\t\t\tcheckDet.setRemarks(attributes[23]);\n\t\t\t\tremark = attributes[23];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcheckDet.setRemarks(\"N/A\");\n\t\t\t\tremark = \"N/A\";\n\t\t\t}\n\t\t\t\n\t\t\tcheckDet.setStatusID(Status.getStatusByName(attributes[20].toUpperCase()));\n\t\t\tcheckDet.setSubID(submissionID);\n\t\t\t\n\t\t\tCheckingDetailsService.addCheckingDetails(checkDet);\n\t\t\tint subID = SubmissionDetailsService.getSubmissionIDByDateSubmittedAndSubmittedBy(toDateTime(attributes[0]), \n\t\t\t\t\tattributes[16]);\n\t\t\tCheckingDetails cd = CheckingDetailsService.getCheckingDetailsOfSubmission(subID);\n\t\t\tif(cd == null || \n\t\t\t\t\t(Status.getStatusByName(attributes[20].toUpperCase()) != cd.getStatusID()) ||\n\t\t\t\t\t!cd.getRemarks().equals(remark)) {\n\t\t\t\tNotification n = new Notification(attributes[2], \n\t\t\t\t\t\tSystem.currentTimeMillis(), \n\t\t\t\t\t\tattributes[5] + \" - \" + attributes[20].toUpperCase());\n\t\t\t\tNotificationService.notify(n);\n\t\t\t} \n\t\t}\n\t}", "public int getPreparationTime()\n\t{\n\t\tswitch(this.course)\n\t\t{\n\t\t\tcase STARTER:\n\t\t\t\treturn Constants.STARTER_PREP_TIME;\n\t\t\tcase MAIN:\n\t\t\t\treturn Constants.MAIN_PREP_TIME;\n\t\t\tcase DESSERT:\n\t\t\t\treturn Constants.DESSERT_PREP_TIME;\n\t\t\tdefault:\n\t\t\t\treturn 0;\n\t\t}\n\t}", "@Query(\"\"\"\n SELECT COUNT (DISTINCT p) FROM ProgrammingExerciseStudentParticipation p\n JOIN p.submissions s\n WHERE p.exercise.id = :#{#exerciseId}\n AND s.submitted = TRUE\n AND (s.type <> 'ILLEGAL' OR s.type IS NULL)\n \"\"\")\n long countSubmissionsByExerciseIdSubmitted(@Param(\"exerciseId\") Long exerciseId);", "com.google.protobuf.Timestamp getVotingStartTime();", "private int computeExaminationTime(short type) {\n\t\treturn (int)\n\t\t\t(_examinationMins[type]\n\t\t\t\t+ (_examinationMaxs[type] - _examinationMins[type])\n\t\t\t\t\t* Math.random());\n\t}", "public void testDeletedProblem() throws Exception {\n \n InternalContest contest = new InternalContest();\n\n int numTeams = 2;\n initData(contest, numTeams , 5);\n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,0,0\",\n \"1,team2,0,0\"\n };\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem probA = contest.getProblems()[0];\n probA.setActive(false);\n contest.updateProblem(probA);\n Problem probA1 = contest.getProblem(probA.getElementId());\n assertEquals(\"probA1 setup\", false, probA1.isActive());\n Problem probA2 = contest.getProblems()[0];\n assertEquals(\"probA2 setup\", false, probA2.isActive());\n confirmRanks(contest, rankData);\n Document document = null;\n\n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, null, log);\n if (debugMode) {\n System.out.println(xmlString);\n }\n // getStandings should always return a well-formed xml\n assertFalse(\"getStandings returned null \", xmlString == null);\n assertFalse(\"getStandings returned empty string \", xmlString.trim().length() == 0);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n document = documentBuilder.parse(new InputSource(new StringReader(xmlString)));\n\n } catch (Exception e) {\n assertTrue(\"Error in XML output \" + e.getMessage(), true);\n e.printStackTrace();\n }\n \n // skip past nodes to find teamStanding node\n NodeList list = document.getDocumentElement().getChildNodes();\n \n int rankIndex = 0;\n \n for(int i=0; i<list.getLength(); i++) {\n Node node = (Node)list.item(i);\n String name = node.getNodeName();\n if (name.equals(\"teamStanding\")){\n String [] standingsRow = fetchStanding (node);\n// Object[] cols = { \"Rank\", \"Name\", \"Solved\", \"Points\" };\n String [] cols = rankData[rankIndex].split(\",\");\n\n if (debugMode) {\n System.out.println(\"SA rank=\"+standingsRow[0]+\" solved=\"+standingsRow[2]+\" points=\"+standingsRow[3]+\" name=\"+standingsRow[1]);\n System.out.println(\" rank=\"+cols[0]+\" solved=\"+cols[2]+\" points=\"+cols[3]+\" name=\"+cols[1]);\n System.out.println();\n System.out.flush();\n }\n \n compareRanking (rankIndex+1, standingsRow, cols);\n rankIndex++;\n } else if(name.equals(\"standingsHeader\")) {\n String problemCount = node.getAttributes().getNamedItem(\"problemCount\").getNodeValue();\n int problemCountInt = Integer.valueOf(problemCount);\n NodeList list2 = node.getChildNodes();\n int foundProblemCount = -1;\n for(int j=0; j<list2.getLength(); j++) {\n Node node2 = (Node)list2.item(j);\n String name2 = node2.getNodeName();\n if (name2.equals(\"problem\")){\n int id = Integer.valueOf(node2.getAttributes().getNamedItem(\"id\").getNodeValue());\n if (id > foundProblemCount) {\n foundProblemCount = id;\n }\n }\n }\n assertEquals(\"problem list max id\",problemCountInt, foundProblemCount);\n assertEquals(\"problemCount\",\"4\", problemCount);\n }\n }\n\n }", "public int updateSubmissionLockingInfo(String submissionId, int userId) {\n\t\tParamQuery parQ = DBUpdateSQL.getParamQuery(\"UPDATE_SUBMISSION_LOCKING_INFO\");\n PreparedStatement prepStmt = null;\n String queryString = parQ.getQuerySQL();\n int updatedRecordNumber = 0;\n try {\n \tconn = DBHelper.reconnect2DB(conn);\n \tprepStmt = conn.prepareStatement(queryString);\n \tprepStmt.setInt(1, userId);\n \tprepStmt.setString(2, submissionId);\n \tupdatedRecordNumber = prepStmt.executeUpdate();\n \t\n \t\treturn updatedRecordNumber;\n } catch (SQLException se) {\n \tse.printStackTrace();\n \t\treturn 0;\n }\n finally{\n \tDBHelper.closePreparedStatement(prepStmt); \t\n }\n\t}", "public long submitComment(Long playerId, String text) {\r\n\t\tPlayer player = lookupPlayer(playerId);\r\n\t\tlong id;\r\n\t\tif (player.getGame().getStatus() == STATUS.COMPLETE) {\r\n\t\t\tid = commentService.submitGameOverComment(player, text);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tid = commentService.submitCommentToAnswered(playerId, text);\r\n\t\t}\r\n\t\treturn id;\r\n\t}", "String clientResidenceTime(final int index);", "boolean hasVotingStartTime();", "public Notifications(Integer postID, Integer requesterID, Integer providerID,\n String locationOfRequester, String type){\n //PostID, requesterID, providerID,locationOfRequester need to create variable?\n this.postID = postID;\n this.requesterID = requesterID;\n this.userId = providerID;\n\n this.type = type;\n this.setActiveStatus(true);\n //idk if we want to add this or not\n this.beginTime = \"N/A\";\n this.endTime = \"N/A\";\n this.category = null;\n this.tags = null;\n this.location = locationOfRequester;\n\n\n }", "Collaboration getType();", "public void commissionRunway(String id);", "int findDedicationForVehicleType(Long course_id, Long vehicleType_Id);", "public void setStart_time(long start_time) {\n this.start_time = start_time;\n }", "@Query(\"\"\"\n SELECT COUNT (DISTINCT p) FROM ProgrammingExerciseStudentParticipation p\n JOIN p.submissions s\n WHERE p.exercise.id = :#{#exerciseId}\n AND p.testRun = FALSE\n AND s.submitted = TRUE\n AND (s.type <> 'ILLEGAL' OR s.type IS NULL)\n \"\"\")\n long countLegalSubmissionsByExerciseIdSubmittedIgnoreTestRunSubmissions(@Param(\"exerciseId\") Long exerciseId);", "Expression getReaction_time_parm();", "private AppoinmentCompleteRequest appoinmentCompleteRequest() {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy hh:mm aa\", Locale.getDefault());\n String currentDateandTime = sdf.format(new Date());\n\n AppoinmentCompleteRequest appoinmentCompleteRequest = new AppoinmentCompleteRequest();\n appoinmentCompleteRequest.set_id(appoinmentid);\n appoinmentCompleteRequest.setCompleted_at(currentDateandTime);\n appoinmentCompleteRequest.setAppoinment_status(\"Completed\");\n appoinmentCompleteRequest.setDiagnosis(DiagnosisType);\n appoinmentCompleteRequest.setSub_diagnosis(SubDiagnosisType);\n appoinmentCompleteRequest.setDoctor_comment(Doctor_Comments);\n Log.w(TAG,\"appoinmentCompleteRequest\"+ \"--->\" + new Gson().toJson(appoinmentCompleteRequest));\n return appoinmentCompleteRequest;\n }", "public void processSurveyAck( UserSurvey userSurvey,String status);", "public int approve_reject_Request(int approval_status, String approvedBy, String approverComment, Timestamp time_approved,String social_Email)\r\n\t{\r\n\t\tConnection conn=getConnection();\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tint result=0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"update SOCIAL_EAI_APPROVAL set (APPROVAL_STATUS,APPROVED_BY,APPROVER_COMMENT,TIME_APPROVED)=(?,?,?,?) where REQ_SOCIAL_EMAIL=?\";\r\n\t\t\tpstmt = conn.prepareStatement(query); \r\n\t\t\tpstmt.setInt(1,approval_status); \r\n\t\t\tpstmt.setString(2,approvedBy); \r\n\t\t\tpstmt.setString(3,approverComment);\r\n\t\t\tpstmt.setTimestamp(4,time_approved);\r\n\t\t\tpstmt.setString(5,social_Email);\r\n\r\n\t\t\tresult=pstmt.executeUpdate(); \r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\r\n\t\t\tSystem.out.println(\"EXception:\");\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\r\n\r\n\t\treturn result;\r\n\t}", "public DateTime getCtime() {\r\n return ctime;\r\n }", "private int compareTimeSpan(ProcessorDistributionKey key)\n {\n int result = 0;\n result = myTimeSpan.compareTo(key.myTimeSpan);\n\n if (result == 0)\n {\n if (myConstraintKey == null)\n {\n if (key.myConstraintKey != null)\n {\n result = 1;\n }\n }\n else if (key.myConstraintKey == null)\n {\n result = -1;\n }\n else if (!myConstraintKey.equals(key.myConstraintKey))\n {\n result = myConstraintKey.hashCode() - key.myConstraintKey.hashCode();\n\n // Just in case the hash codes are coincident.\n if (result == 0)\n {\n result = System.identityHashCode(myConstraintKey) - System.identityHashCode(key.myConstraintKey);\n }\n }\n }\n\n return result;\n }", "private void jComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox3ActionPerformed\r\n //Step1: Get the selected student and selected homework from the dropdown jComboBox2 and jComboBox3 resp\r\n String selectedStudentID = Students.get(jComboBox2.getSelectedIndex());\r\n String selectedHWForStudent = StudentHomework.get(jComboBox3.getSelectedIndex());\r\n \r\n //step2: Get the values of score selection method of homework, HW score, total number of attempts\r\n try\r\n { \r\n \r\n // To find score selection method and hw score according to score selection method.\r\n query = \"select a.assignment_id, a.assignment_name, \" +\r\n \" CASE \" +\r\n \"\tWHEN a.score_selection_method = 1 THEN 'Latest Attempt' \" +\r\n \"\tWHEN a.score_selection_method = 2 THEN 'Maximum Score' \" +\r\n \"\tWHEN a.score_selection_method = 3 THEN 'Average Score' \" +\r\n \"END as score_selection_method, \" +\r\n \"CASE \" +\r\n \"\tWHEN a.score_selection_method = 1 THEN \" +\r\n \"\t\t(select a1.atmpt_score \" +\r\n \"\t\tfrom attempt a1 where \" +\r\n \"\t\ta.assignment_id = a1.assignment_id \" +\r\n \"\t\tand a1.atmpt_dt = \" +\r\n \"\t\t(select max(atmpt_dt) from attempt a2 \" +\r\n \"\t\twhere a1.student_id = a2.student_id \" +\r\n \" \t\tand a1.assignment_id = a2.assignment_id \" +\r\n \"\t\tand a.assignment_id = a2.assignment_id \" +\r\n \"\t\tand a2.student_id = '\" + selectedStudentID + \"'\" +\r\n \"\t\tgroup by a2.student_id, a2.assignment_id)) \" +\r\n \r\n \"\tWHEN a.score_selection_method = 2 THEN \" +\r\n \"\t\t(select max(a3.atmpt_score) from attempt a3 \" +\r\n \"\t\twhere a.assignment_id = a3.assignment_id \" +\r\n \"\t\tand a3.student_id = '\" + selectedStudentID + \"'\" +\r\n \"\t\tgroup by a3.student_id, a3.assignment_id) \" +\r\n \r\n \"\tWHEN a.score_selection_method = 3 THEN \" +\r\n \"\t\t(select avg(a4.atmpt_score) from attempt a4 \" +\r\n \"\t\twhere a.assignment_id = a4.assignment_id \" +\r\n \"\t\tand a4.student_id = '\" + selectedStudentID + \"'\" +\r\n \"\t\tgroup by a4.student_id, a4.assignment_id) \" +\r\n \" End as homework_score \" +\r\n \" from assignment a where a.assignment_id = '\" + selectedHWForStudent + \"'\";\r\n rs = db.conn.createStatement().executeQuery(query);\r\n while (rs.next()) {\r\n jLabel21.setText(rs.getString(\"score_selection_method\"));\r\n jLabel14.setText(rs.getString(\"homework_score\"));\r\n }\r\n \r\n // To find total number of attempts by particular student for particular homework.\r\n query = \" select at.student_id, at.assignment_id , count(at.atmpt_dt) as totalAttempts from attempt at \" +\r\n \" where at.student_id = '\" + selectedStudentID + \"'\" +\r\n \" and at.assignment_id = '\" + selectedHWForStudent + \"'\" +\r\n \" group by at.student_id, at.assignment_id \"; \r\n rs = db.conn.createStatement().executeQuery(query);\r\n while (rs.next()) {\r\n jLabel19.setText(rs.getString(\"totalAttempts\"));\r\n }\r\n \r\n }\r\n catch (Exception oops) {\r\n System.out.println(\"Prof_Report.java:PopulateComboBoxData() \" + oops);\r\n }\r\n }", "@Override\n protected Void doInBackground(Object... params) {\n //Get parameters\n option = (String) params[0];\n title = (String) params[1];\n content = (String) params[2];\n type = (String) params[3];\n\n if(type.equals(COURSE_TYPE)) {\n\n if(option.equals(SUBMIT_OPERATION)) {\n //Construct Course Review\n CourseReview review = new CourseReview(\n id, uid, title,content,locationStr, null);\n //Insert into DB\n CourseReviewUtil courseReviewUtil =\n new CourseReviewUtil();\n result = courseReviewUtil.insertCourseReview(review);\n if(courseReviewDraft != null) {\n CourseReviewDraftUtil courseReviewDraftUtil = new CourseReviewDraftUtil();\n courseReviewDraftUtil.deleteDraft(courseReviewDraft.getId());\n }\n } else {\n if(courseReviewDraft == null) {\n //Construct Course Review Draft\n CourseReviewDraft review = new CourseReviewDraft(\n id, uid, title, content);\n //Insert into DB\n CourseReviewDraftUtil courseReviewDraftUtil =\n new CourseReviewDraftUtil();\n result = courseReviewDraftUtil.insertCourseReviewDraft(review);\n }else {\n courseReviewDraft.setTitle(title);\n Log.d(\"save and update\", title);\n courseReviewDraft.setContent(content);\n Log.d(\"save and update\", content);\n CourseReviewDraftUtil courseReviewDraftUtil = new CourseReviewDraftUtil();\n result = courseReviewDraftUtil.updateDraft(courseReviewDraft.getId(),courseReviewDraft);\n Log.d(\"save and update\", Boolean.toString(result));\n }\n }\n\n } else {\n\n if(option.equals(SUBMIT_OPERATION)) {\n //Construct Faculty Review\n FacultyReview review = new FacultyReview(\n uid, id, title, content, locationStr, null);\n //Insert into DB\n FacultyReviewUtil facultyReviewUtil =\n new FacultyReviewUtil();\n result = facultyReviewUtil.insertFacultyReview(review);\n if(facultyReviewDraft != null) {\n FacultyReviewDraftUtil facultyReviewDraftUtil = new FacultyReviewDraftUtil();\n facultyReviewDraftUtil.deleteDraft(facultyReviewDraft.getFid());\n }\n } else {\n if(facultyReviewDraft==null) {\n //Construct Faculty Review Draft\n FacultyReviewDraft facultyReviewDraft = new FacultyReviewDraft(\n id, uid, title, content);\n //Insert into DB\n FacultyReviewDraftUtil facultyReviewDraftUtil =\n new FacultyReviewDraftUtil();\n result = facultyReviewDraftUtil.insertFacultyReviewDraft(facultyReviewDraft);\n }else{\n facultyReviewDraft.setTitle(title);\n Log.d(\"save and update\", title);\n facultyReviewDraft.setContent(content);\n Log.d(\"save and update\", content);\n FacultyReviewDraftUtil facultyReviewDraftUtil = new FacultyReviewDraftUtil();\n result = facultyReviewDraftUtil.updateDraft(facultyReviewDraft.getFid(), facultyReviewDraft);\n Log.d(\"save and update\", Boolean.toString(result));\n }\n\n }\n }\n return null;\n }", "public void createJudgedRun (IInternalContest contest, int judgementIndex, boolean solved, int elapsedMinutes) throws IOException, ClassNotFoundException, FileSecurityException, RunUnavailableException{\n Run run = getARun(contest, elapsedMinutes);\n RunFiles runFiles = new RunFiles(run, loadData.getAbsolutePath());\n \n contest.addRun(run, runFiles, null);\n \n ClientId who = contest.getAccounts(ClientType.Type.JUDGE).firstElement().getClientId();\n assertFalse (\"Could not retrieve first judge \", who == null);\n \n SampleContest.checkOutRun(contest, run, who);\n \n Judgement judgement = contest.getJudgements()[judgementIndex]; // Judge as No\n \n JudgementRecord judgementRecord = new JudgementRecord(judgement.getElementId(), who, solved, false);\n contest.addRunJudgement(run, judgementRecord, null, who);\n \n }", "pb4server.CheckAllianceCompetitionAskReq getCheckAllianceCompetitionAskReq();", "@Query(\"\"\"\n SELECT COUNT (DISTINCT p) FROM ProgrammingExerciseStudentParticipation p\n LEFT JOIN p.results r\n WHERE p.exercise.id = :#{#exerciseId}\n AND r.submission.submitted = TRUE\n AND (r.submission.type <> 'ILLEGAL' OR r.submission.type IS NULL)\n AND r.assessor IS NOT NULL\n AND r.completionDate IS NOT NULL\n \"\"\")\n long countAssessmentsByExerciseIdSubmitted(@Param(\"exerciseId\") Long exerciseId);", "public CheckpointSubject getDecision(PBFTCheckpoint c){\n if(!(c != null && c.getSequenceNumber() != null && c.getDigest() != null)){\n return null;\n }\n\n Object lpid = getLocalServerID();\n\n long seqn = c.getSequenceNumber();\n long now = getClockValue();\n String qkey = String.valueOf(seqn);\n\n SoftQuorum q = (SoftQuorum)getStateLog().getQuorum(CHECKPOINTQUORUMSTORE, qkey);\n\n if(q == null){\n int f = getServiceBFTResilience();\n\n q = new SoftQuorum(2 * f + 1);\n\n getStateLog().getQuorumTable(CHECKPOINTQUORUMSTORE).put(qkey, q);\n \n }\n\n q.add(new Vote(c.getReplicaID(), new CheckpointSubject(c)));\n \n JDSUtility.debug(\"[getDecision(checkpoint)] s\" + lpid + \", at time \" + now + \", updated a entry in its log for \" + c);\n\n CheckpointSubject cs = (CheckpointSubject) q.decide();\n\n if(cs != null){ \n JDSUtility.debug(\"[getDecision(checkpoint)] s\" + lpid + \", at time \" + now + \", completed quorum for checkpoint (\" + seqn + \").\");\n }\n\n return cs;\n \n }", "public String getSubmissionType() {\n\t\tif (submissionType != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"submission_type\" + TAB + submissionType.toString();\n\t\treturn null;\n\t}", "public void explainConjecture(Conjecture conjecture, Theory theory, String timer_num)\n {\n logThis(conjecture.writeConjecture(\"tptp\"), theory);\n for (int i=0; i<explainers.size(); i++)\n {\n Explainer explainer = (Explainer)explainers.elementAt(i);\n explainer.use_entity_letter = use_entity_letter;\n theory.addToTimer(timer_num + \".\" + Integer.toString(i) + \" Trying \" + explainer.name + \" to solve conjecture\");\n\n if (explainer.condition_string.trim().equals(\"\") ||\n reflect.checkCondition(conjecture, explainer.condition_string))\n {\n if (explainer instanceof FileProver)\n {\n FileProver file_prover = (FileProver)explainer;\n boolean is_proved = file_prover.prove(conjecture, theory);\n logThis(explainer.name + \"(\" + explainer.setup_name + \") \" + conjecture.proof_status, theory);\n if (is_proved)\n {\n conjecture.proof_status = \"proved\";\n if (conjecture.is_trivially_true)\n conjecture.explained_by = \"being trivial\";\n else\n conjecture.explained_by = explainer.name + \"(\" + explainer.setup_name + \")\";\n if (!use_all_explainers)\n {\n logThis(\"-----------------\", theory);\n if (store_conjectures)\n storage_handler.handleStorageOf(conjecture);\n return;\n }\n }\n if (!conjecture.counterexamples.isEmpty() || file_prover.disprove(conjecture, theory))\n {\n conjecture.proof_status = \"disproved\";\n logThis(explainer.name + \"(\" + explainer.setup_name + \") \" + conjecture.proof_status, theory);\n conjecture.explained_by = explainer.name + \"(\" + explainer.setup_name + \")\";\n if (!use_all_explainers)\n {\n logThis(\"-----------------\", theory);\n if (store_conjectures)\n storage_handler.handleStorageOf(conjecture);\n return;\n }\n }\n if (conjecture.proof_status.equals(\"sos\") && !use_all_explainers)\n {\n logThis(\"-----------------\", theory);\n if (store_conjectures)\n storage_handler.handleStorageOf(conjecture);\n return;\n }\n }\n if (explainer instanceof DataGenerator)\n {\n DataGenerator data_generator = (DataGenerator)explainer;\n Vector counterexamples = data_generator.counterexamplesFor(conjecture, theory, 1);\n if (!counterexamples.isEmpty())\n {\n conjecture.proof_status = \"disproved\";\n logThis(explainer.name + \"(\" + explainer.setup_name + \") \" + conjecture.proof_status, theory);\n conjecture.counterexamples = counterexamples;\n conjecture.explained_by = explainer.name + \"(\" + explainer.setup_name + \")\";\n if (!use_all_explainers)\n {\n logThis(\"-----------------\", theory);\n if (store_conjectures)\n storage_handler.handleStorageOf(conjecture);\n return;\n }\n }\n }\n if (explainer instanceof Prover && !(explainer instanceof FileProver))\n {\n Prover prover = (Prover)explainers.elementAt(i);\n boolean is_proved = prover.prove(conjecture, theory);\n logThis(explainer.name + \"(\" + explainer.setup_name + \") \" + conjecture.proof_status, theory);\n if (is_proved)\n {\n conjecture.proof_status = \"proved\";\n if (conjecture.is_trivially_true)\n conjecture.explained_by = \"being trivial\";\n else\n conjecture.explained_by = explainer.name + \"(\" + explainer.setup_name + \")\";\n if (!use_all_explainers)\n {\n logThis(\"-----------------\", theory);\n if (store_conjectures)\n storage_handler.handleStorageOf(conjecture);\n return;\n }\n }\n else if (prover.disprove(conjecture, theory)) {\n conjecture.proof_status = \"disproved\";\n this.logThis(explainer.name + \"(\" + explainer.setup_name + \") \" + conjecture.proof_status, theory);\n conjecture.explained_by = explainer.name + \"(\" + explainer.setup_name + \")\";\n if (!this.use_all_explainers) {\n this.logThis(\"-----------------\", theory);\n if (this.store_conjectures) {\n this.storage_handler.handleStorageOf(conjecture);\n }\n return;\n }\n }\n }\n }\n else\n logThis(\"Failed conditions for \" + explainer.name + \"(\" + explainer.setup_name + \")\", theory);\n }\n if (store_conjectures)\n storage_handler.handleStorageOf(conjecture);\n logThis(\"-----------------\", theory);\n }", "public void setREQ_START_TIME(java.sql.Time value)\n {\n if ((__REQ_START_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_START_TIME)))\n {\n _isDirty = true;\n }\n __REQ_START_TIME = value;\n }", "private int showProblem(Connection conn, int classId, int probId, String testType,PrePostProblemDefn p) throws SQLException {\n String host= Settings.prePostProblemURI;\r\n String url = host + p.getUrl();\r\n if (url != null)\r\n this.src.append(\"<img src=\\\"\" + url +\"\\\" /><p/>\\n\");\r\n String descr = p.getDescr();\r\n this.src.append(descr + \"<p/>\\n\");\r\n int ansType = p.getAnsType();\r\n if (ansType == PrePostProblemDefn.MULTIPLE_CHOICE) {\r\n String ansA,ansB,ansC,ansD,ansE;\r\n String ansAURL,ansBURL,ansCURL,ansDURL,ansEURL;\r\n ansA= p.getaAns();\r\n if (ansA == null) {\r\n ansAURL = p.getaURL();\r\n if (ansAURL != null)\r\n this.src.append(\"a: <img src=\\\"\" + host +ansAURL + \"\\\"><br/>\\n\");\r\n }\r\n else this.src.append(\"a: \" + ansA + \"<br/>\\n\");\r\n ansB= p.getbAns();\r\n if (ansB == null) {\r\n ansBURL = p.getbURL();\r\n if (ansBURL != null)\r\n this.src.append(\"b: <img src=\\\"\" + host +ansBURL + \"\\\"><br/>\\n\");\r\n }\r\n else this.src.append(\"b: \" + ansB + \"<br/>\\n\");\r\n ansC= p.getcAns();\r\n if (ansC == null) {\r\n ansCURL = p.getcURL();\r\n if (ansCURL != null)\r\n this.src.append(\"c: <img src=\\\"\" + host +ansCURL + \"\\\"><br/>\\n\");\r\n }\r\n else this.src.append(\"c: \" + ansC + \"<br/>\\n\");\r\n ansD= p.getdAns();\r\n if (ansD == null) {\r\n ansDURL = p.getdURL();\r\n if (ansDURL != null)\r\n this.src.append(\"d: <img src=\\\"\" + host + ansDURL + \"\\\"><br/>\\n\");\r\n }\r\n else if (ansD != null) this.src.append(\"d: \" + ansD + \"<br/>\\n\");\r\n ansE= p.geteAns();\r\n if (ansE == null) {\r\n ansEURL = p.geteURL();\r\n if (ansEURL != null)\r\n this.src.append(\"e: <img src=\\\"\" + host +ansEURL + \"\\\"><br/>\\n\");\r\n }\r\n else if (ansE != null) this.src.append(\"e: \" + ansE + \"<br/>\\n\");\r\n\r\n }\r\n return ansType;\r\n }", "@Override\n\tpublic void submitRequest(int empid,int manid, int reqamt) {\n\t\tint id = getRequestCount()+1;\n\t\tString expdate = \"26-APR-19\";\n\t\tString status = \"pending\";\n\t\tString decision = \"\";\n\t\t \n\t\ttry {\n\t\t\tString sql =\"INSERT INTO requests (request_id, employee_id, manager_id, request_amount, expense_date, status, decision) \" +\n \"VALUES (\" + id +\", '\" + empid + \"', '\" + manid + \"', '\" + reqamt + \"', '\" + expdate + \"', '\" + status + \"', '\" + decision + \"')\"; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\n\t}", "String getInter_contestable();", "public Announcement getAnnouncement(int row_id, int type) {\n\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_TEACHER_ANNOUNCEMENT\n\t\t\t\t+ \" WHERE \" + KEY_TYPE + \"=\" + type + \" AND \" + KEY_ROW_ID\n\t\t\t\t+ \"=\" + row_id;\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\n\t\tif (cursor != null)\n\t\t\tcursor.moveToFirst();\n\t\tAnnouncement announcement = new Announcement();\n\t\tannouncement.row_id = Integer.parseInt(cursor.getString(0));\n\t\tannouncement.date = cursor.getString(1);\n\t\tannouncement.subject_relation_id = cursor.getString(2);\n\t\tannouncement.title = cursor.getString(4);\n\t\tannouncement.description = cursor.getString(5);\n\t\tannouncement.attachment = cursor.getString(6);\n\t\tannouncement.file_name = cursor.getString(7);\n\t\tcursor.close();\n\t\treturn announcement;\n\t}", "private void submit_attendance() {\n }", "@Override\n\tpublic void setSubmissionId(long submissionId) {\n\t\tmodel.setSubmissionId(submissionId);\n\t}", "public BctsJobHeader getJobHeaderDetails(String pmtFilePath) throws BctsXMLProcessException {\n\t\tBctsPermitType bctsPermitType =null;\n\t\tBctsJobHeader bctsJobHeader=null;\n\t\ttry {\n\t\t\tJAXBElement<TradenetResponseType> respObj = BctsXMLReader\n\t\t\t\t\t.unmarshalXML(pmtFilePath, BctsXMLReader.CONTEXT_TN41_RESPONSE, BctsXMLReader.JARXSD_TN41_RESPONSE);\n\t\t\tTradenetResponseType resType = null!=respObj?respObj.getValue():null;\n\t\t\tif(null!=resType) {\n\t\t\tList<OutboundMessageType> lst=resType.getOutboundMessage(); \n\t\t\tHeaderType hType=null;\n\t\t\tcrimsonlogic.tn41.schema.xsd.inpayment.HeaderType hInPayType=null;\n\t\t\tbctsPermitType = new BctsPermitType();\n\t\t\tbctsJobHeader=new BctsJobHeader();\n\t\t\tfor(OutboundMessageType mstType:lst) {\n\t\t\t\tOutwardPermitType outWPermit=mstType.getOutwardPermit();\n\t\t\t\tInPaymentPermitType inPaymtPermit=mstType.getInPaymentPermit();\n\t\t\t\t\n\t\t\t\tif(null!=outWPermit) {\n\t\t\t\t\thType=outWPermit.getDeclaration().getHeader();\n\t\t\t\t\tString uid=null!=hType && null!=hType.getUniqueReferenceNumber()?hType.getUniqueReferenceNumber().getID():null;\n\t\t\t\t\tString urnSeq=null!=hType && null!=hType.getUniqueReferenceNumber()?hType.getUniqueReferenceNumber().getSequenceNumeric().toString():null;\n\t\t\t\t\tString urnDate=null!=hType && null!=hType.getUniqueReferenceNumber()?hType.getUniqueReferenceNumber().getDate():null;\n\t\t\t\t\tString jobNo=urnSeq+urnDate;\n\t\t\t\t\tbctsJobHeader.setUenId(uid);\n\t\t\t\t\tbctsJobHeader.setUrnSeq(jobNo);\n\t\t\t\t\tbctsJobHeader.setJobDate(new BigDecimal(urnDate));\n\t\t\t\t\tbctsJobHeader.setJobSeq(urnSeq);//four digit job number\n\t\t\t\t\tbctsJobHeader.setCrUeiNo(uid);\n\t\t\t\t\tbctsJobHeader.setCarType(null!=hType?hType.getCommonAccessReference():null);\n\t\t\t\t\tbctsJobHeader=consructOutJobHeader(outWPermit,bctsJobHeader);\n\t\t\t\t\tbctsJobHeader=PermitXmlConstructor.consructCertificate(outWPermit, bctsJobHeader);\n\t\t\t\t\tbctsJobHeader=PermitXmlConstructor.constructSummary(null,outWPermit,bctsJobHeader);\n\t\t\t\t}else if(null!=inPaymtPermit) {\n\t\t\t\t\thInPayType=inPaymtPermit.getDeclaration().getHeader();\n\t\t\t\t\tString uid=null!=hInPayType && null!=hInPayType.getUniqueReferenceNumber()?hInPayType.getUniqueReferenceNumber().getID():null;\n\t\t\t\t\tString urnSeq=null!=hInPayType && null!=hInPayType.getUniqueReferenceNumber()?hInPayType.getUniqueReferenceNumber().getSequenceNumeric().toString():null;\n\t\t\t\t\tString urnDate=null!=hInPayType && null!=hInPayType.getUniqueReferenceNumber()?hInPayType.getUniqueReferenceNumber().getDate():null;\n\t\t\t\t\tString jobNo=urnSeq+urnDate;\n\t\t\t\t\tbctsJobHeader.setUenId(uid);\n\t\t\t\t\tbctsJobHeader.setUrnSeq(jobNo);\n\t\t\t\t\tbctsJobHeader.setJobDate(new BigDecimal(urnDate));\n\t\t\t\t\tbctsJobHeader.setJobSeq(urnSeq);//four digit job number\n\t\t\t\t\tbctsJobHeader.setCrUeiNo(uid);\n\t\t\t\t\tbctsJobHeader.setCarType(null!=hInPayType?hInPayType.getCommonAccessReference():null);\n\t\t\t\t\tbctsJobHeader=consructInJobHeader(inPaymtPermit,bctsJobHeader);\n\t\t\t\t\tbctsJobHeader=PermitXmlConstructor.constructSummary(inPaymtPermit,null,bctsJobHeader);\n\t\t\t\t\t//TODO item type\n\t\t\t\t\t/*List<ItemType> itemTypeLst=inPaymtPermit.getDeclaration().getItem();\n\t\t\t\t\tfor(ItemType itemType:itemTypeLst) {\n\t\t\t\t\t\titemType.getBrandName();\n\t\t\t\t\tList<CASCProductType> ceasProdTypeLst=itemType.getCASCProduct();\n\t\t\t\t\tfor(CASCProductType cascPr:ceasProdTypeLst) {\n\t\t\t\t\t\tcascPr.get\n\t\t\t\t\t}\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}\n\t\t\tSystem.out.println(\"getPermitXmlInfo() Model value:\"+bctsPermitType.toString());\n\t\t\tLOG.info(\"getPermitXmlInfo() Model value:{}\",bctsPermitType.toString());\n\t\t\t}\n\t\t}catch(BctsXMLProcessException e) {\n\t\t\tLOG.error(\"BctsXMLProcessException in getPermitXmlInfo():\",e);\n\t\t\tthrow new BctsXMLProcessException(e.getMessage());\n\t\t}\n\t\treturn bctsJobHeader;\n\t}", "protected abstract String getJobSubmitId();", "boolean hasVotingEndTime();", "public interface Participation {\n\n /** alternative owner, but as long as this person is not the owner. \n * This person is allowed to make comments, but nothing else. */\n String CANDIDATE = \"candidate\";\n\n /** the person with ultimate responsibility over a task. */\n String OWNER = \"owner\";\n\n /** person that will be using the result of this task. This person is \n * allowed to make comments, but nothing else. */\n String CLIENT = \"client\";\n\n /** person that is allowed to watch-but-not-touch this task */\n String VIEWER = \"viewer\";\n\n /** a person that was assigned to a task, but got replaced because of \n * absence or another reason. This way, a trace can be left in case \n * this person returns and wants to take back his tasks that got \n * reassigned. */\n String REPLACED_ASSIGNEE = \"replaced-assignee\";\n\n /** the unique id for this participation that is used as a reference in the service methods */\n String getId();\n\n /** userId for this participation. \n * null in case this is a {@link #getGroupId() group participation}. */\n String getUserId();\n\n /** groupId for this participation. \n * null in case this is a {@link #getUserId() user participation}. */\n String getGroupId();\n\n /** see constants for default participations */\n String getType();\n}", "public void createCIPsResponsesTable() {\n String createTableStatement = \"CREATE TABLE \" + CIPS_TABLE + \" (ID INTEGER PRIMARY KEY AUTOINCREMENT, DATE INTEGER, \" +\n \"RESPONSES_TYPE TEXT, \"+\n \"RESPONSE_0 INTEGER, RESPONSE_1 INTEGER, RESPONSE_2 INTEGER, \" +\n \"RESPONSE_3 INTEGER, RESPONSE_4 INTEGER, RESPONSE_5 INTEGER, \" +\n \"RESPONSE_6 INTEGER, RESPONSE_7 INTEGER, RESPONSE_8 INTEGER, \" +\n \"RESPONSE_9 INTEGER, RESPONSE_10 INTEGER, RESPONSE_11 INTEGER, \" +\n \"RESPONSE_12 INTEGER, RESPONSE_13 INTEGER, RESPONSE_14 INTEGER, \" +\n \"RESPONSE_15 INTEGER, RESPONSE_16 INTEGER, RESPONSE_17 INTEGER, \" +\n \"RESPONSE_18 INTEGER, RESPONSE_19 INTEGER, \" +\n \"TOTAL_CIPS_SCORE INTEGER, \" +\n \"ABILITY_SCORE INTEGER, ACHIEVEMENT_SCORE INTEGER, PERFECTIONISM_SCORE INTEGER)\";\n db.execSQL(createTableStatement);\n }", "lanyotech.cn.park.protoc.CommonProtoc.FEEDBACK4PARKING getFeedback();", "private void submit() throws SQLException, IllegalArgumentException {\r\n\t\t\r\n\t\t//Get all the values\r\n\t\tString fname = \"\", lname = \"\";\r\n\t\tint age = 0, workExp = 0;\r\n\t\tint selfProd = 0, selfQoS = 0, selfExp = 0;\t\t//selfrating values\r\n\t\t\r\n\t\t//Mandatory fields\r\n\t\tfname = tfFirstname.getText();\r\n\t\tlname = tfLastname.getText();\r\n\t\t\r\n\t\tif (fname.equals(\"\") || lname.equals(\"\"))\r\n\t\t\tthrow new IllegalArgumentException(\"Firstname and Lastname are\"\r\n\t\t\t\t\t+ \" mandatory fields!\");\r\n\t\t\r\n\t\t//Non-mandatory fields\r\n\t\ttry {\r\n\t\t\tage = Integer.parseInt(tfAge.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tage = -1;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tworkExp = Integer.parseInt(tfWorkExp.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tworkExp = -1;\r\n\t\t}\r\n\t\t\r\n\t\t//slider values are default value (3) if untouched\r\n\t\tselfProd = sliderProd.getValue();\r\n\t\tselfQoS = sliderQoS.getValue();\r\n\t\tselfExp = sliderExp.getValue();\r\n\t\t\r\n\t\t\r\n\t\t//Create insert query for the values which are definitely set\r\n\t\tString query = \"INSERT INTO surveyresults (candidate, lastname, firstname,\"\r\n\t\t\t\t+ \"productivity, quality_of_service, exceeding_expectations) \"\r\n\t\t\t\t+ \"VALUES (\" + this.candidateID + \", '\" + lname + \"', '\" + fname \r\n\t\t\t\t+ \"', \" + selfProd + \", \" + selfQoS + \", \" + selfExp + \");\";\r\n\t\tdbc.executeUpdate(query);\r\n\t\t\r\n\t\t\r\n\t\t//Check the other values: age, workExp\r\n\t\tif (age >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET age = \" + age + \" \"\r\n\t\t\t\t\t+ \"WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\r\n\t\tif (workExp >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET working_experience = \" + workExp\r\n\t\t\t\t\t+ \" WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\t//set invitation status to completed (link is invalid now)\r\n\t\tquery = \"UPDATE invitations SET status = 'Completed' WHERE \"\r\n\t\t\t\t+ \"candidate = \" + this.candidateID + \";\";\r\n\t\tdbc.executeUpdate(query);\r\n\t}", "public void updateLecture_Time(Class c) {\n\t\tSqlSession sqlSession = MyBatisUtil.getSqlSessionFactory()\n\t\t\t\t.openSession();\n\t\ttry {\n\t\t\tClassMapper classMapper = sqlSession.getMapper(ClassMapper.class);\n\t\t\tclassMapper.updateLecture_Time(c);\n\t\t\tsqlSession.commit();\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}", "public Project saveAssessmentData(ResponseAssessment response) {\n\t\tlong testId = assessmentDao.getTestId(response.getProjectId());\n\n\t\t// check whether the assessment of that project has been started, if\n\t\t// testId=0 start test for that project\n\t\tif (testId == 0) {\n\t\t\tassessmentDao.beginAssessment(response.getProjectId());\n\t\t\ttestId = assessmentDao.getTestId(response.getProjectId());\n\t\t}\n\n\t\t// Delete previous records of that assessment\n\t\tdeleteAssessmentData(testId);\n\n\t\t// Saving process begins per subcategory wise\n\n\t\tfor (SubCatAssessment subcat : response.getSubCat()) {\n\t\t\t// saving user comments of a subCategory for a respective assessment\n\n\t\t\tassessmentDao.saveComments(testId, subcat.getId(), subcat.getComments());\n\t\t\t// saving maturity_level of a subCategory for a respective\n\t\t\t// assessment\n\t\t\tassessmentDao.saveMaturityLevel(testId, subcat.getId(), subcat.getMaturityLevel());\n\n\t\t\t// saving the response details per subCategoty wise,\n\n\t\t\tfor (Long ques : subcat.getCheckedQuestion()) {\n\t\t\t\tassessmentDao.saveResponseDetails(testId, subcat.getId(), ques);\n\n\n\t\t\t}\n\n\t\t}\n\t\t// All the question id are now saved\n\n\t\tString projectName = projectDao.getProjectName(response.getProjectId());\n\t\tProject projectSaved = new Project(response.getProjectId(),testId,projectName);\n\t\treturn projectSaved;\n\n\n\t}", "public static List<String> findTime(String crn, String date, int priority) throws SQLException\n\t{\n\t\tString semester = test.getLatestSemester();\n\t\t//String[] parse = test.parseCourse(course);\n\t\tResultSet student_id;\n\t\t\n\t\tif(priority == 1)\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where Class_Desc = 'Senior' and CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\t\telse if(priority == 2)\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where Class_Desc = 'Junior' and CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\t\telse\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\n\t\tList<String> student = test.writeResultSet(student_id, \"Banner_id\");\n\t\tList<String> dist_time = new ArrayList<String>();\n\t\tfor(int x = 0; x < student.size(); x++)\n\t\t{\n\t\t\tResultSet class_t;\n\t\t\tif(date.charAt(0) == 'M')\n\t\t\t\tclass_t = test.readDatabase(\"select distinct Begin_Time from class_2016 where Banner_id = '\"+student.get(x)+\"' and Term_Code = '\"+semester+\"' and Monday_Ind1 = 'M' and Wednesday_Ind1 = 'W'and Friday_Ind1 = 'F' order by Begin_Time\");\n\t\t\telse\n\t\t\t\tclass_t = test.readDatabase(\"select distinct Begin_Time from class_2016 where Banner_id = '\"+student.get(x)+ \"' and Term_Code = '\"+semester+\"' and Tuesday_Ind1 = 'T' and Thursday_Ind1 = 'R' order by Begin_Time\");\n\t\t\tList<String> class_time = test.writeResultSet(class_t, \"Begin_Time\");\n\t\t\t//System.out.println(class_time);\n\t\t\tfor(int y = 0; y < class_time.size();y++)\n\t\t\t{\n\t\t\t\tif(dist_time.contains(class_time.get(y))==false)\n\t\t\t\t\tdist_time.add(class_time.get(y));\n\t\t\t}\n\n\t\t}\n\t\treturn dist_time;\n\t}", "@Override\n\tpublic String particularClass(String cid) throws SQLException {\n\t\tString sql = \"select DID,DQUEST,UID,DDT as pdt from doubts where CID=? order by DDT desc\";\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(sql);\n\t\tpreparedStatement.setString(1, cid);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\tJSONArray fa = new JSONArray();\n\t\twhile(resultSet.next()) {\n\t\t\tfa.add(\n\t\t\t\t\tgetDoubts(\n\t\t\t\t\t\t\tresultSet.getString(\"DID\"),\n\t\t\t\t\t\t\tresultSet.getString(\"DQUEST\"),\n\t\t\t\t\t\t\tresultSet.getString(\"UID\"),\n\t\t\t\t\t\t\tresultSet.getString(\"pdt\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\treturn fa.toJSONString();\n\t}", "@Override\n\tpublic void process(JCas jcas) throws AnalysisEngineProcessException {\n\t\t@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t\tAnnotationIndex<Annotation> sentIndex = jcas\n\t\t\t\t.getAnnotationIndex(Sentence.type);\n\t\tAnnotationIndex<Annotation> timeIndex = jcas\n\t\t\t\t.getAnnotationIndex(Timex3.type);\n\t\tAnnotationIndex<Annotation> tokenIndex = jcas\n\t\t\t\t.getAnnotationIndex(Token.type);\n\n\t\tboolean addTimespan = false;\n\n\t\t// for every sentence\n\t\tfor (Annotation an : sentIndex) {\n\t\t\tSentence sent = (Sentence) an;\n\t\t\tint sentBegin = sent.getBegin();\n\t\t\tint sentEnd = sent.getEnd();\n\n\t\t\tFSIterator<Annotation> timeIter = timeIndex.subiterator(sent);\n\t\t\t// save begins and ends of all timex tokens adjust index to sentence\n\t\t\tArrayList<Integer> begins = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> ends = new ArrayList<Integer>();\n\t\t\tArrayList<Timex3> timexs = new ArrayList<Timex3>();\n\t\t\t// get all timex annot. that are no durations like 6 minutes\n\t\t\twhile (timeIter.hasNext()) {\n\t\t\t\tTimex3 time = (Timex3) timeIter.next();\n\t\t\t\tif (!time.getTimexType().equals(\"DURATION\")) {\n\t\t\t\t\ttimexs.add(time);\n\t\t\t\t\t// begins.add(time.getBegin());// - sentBegin);\n\t\t\t\t\t// ends.add(time.getEnd());// - sentBegin);\n\n\t\t\t\t}\n\t\t\t\t// //System.out.println(sent.getCoveredText());\n\t\t\t}\n\n\t\t\t// if at least 2 found check text between timex expressions\n\t\t\tint timexCount = timexs.size();\n\t\t\tint interval;\n\t\t\tint begin1, end1, begin2, end2;\n\t\t\tif (timexCount >= 2) {\n\t\t\t\t// TODO change if direct access to sents of jcas per id is\n\t\t\t\t// possible\n\t\t\t\tString docText = jcas.getDocumentText(); // .getCoveredText();\n\t\t\t\tfor (int i = 0; i < timexCount - 1; i++) {\n\t\t\t\t\t// get postitons of timexs and scale to sentence\n\t\t\t\t\tbegin1 = timexs.get(i).getBegin() - sentBegin;\n\t\t\t\t\tbegin2 = timexs.get(i + 1).getBegin() - sentBegin;\n\t\t\t\t\t;\n\t\t\t\t\tend1 = timexs.get(i).getEnd() - sentBegin;\n\t\t\t\t\t;\n\t\t\t\t\tend2 = timexs.get(i + 1).getEnd() - sentBegin;\n\t\t\t\t\t;\n\t\t\t\t\t// //System.out.println(begins.get(i) + \" \" + ends.get(i +\n\t\t\t\t\t// 1) + \" \" +\n\t\t\t\t\t// sentBegin + \" \"+ sent.getEnd());\n\t\t\t\t\t// interval = begins.get(i + 1) - ends.get(i);\n\t\t\t\t\t// only cut text if interval under max length\n\t\t\t\t\tinterval = begin2 - end1;\n\t\t\t\t\tif (interval < 10 && interval > 0) {\n\t\t\t\t\t\tString sentText = sent.getCoveredText();\n\t\t\t\t\t\t// String betweenText = docText.substring(ends.get(i),\n\t\t\t\t\t\t// begins.get(i\n\t\t\t\t\t\t// + 1));\n\t\t\t\t\t\t// get text between timex expr. and removes surrounding\n\t\t\t\t\t\t// whitespace\n\t\t\t\t\t\t// String betweenText = docText.substring(end1,\n\t\t\t\t\t\t// begin2).trim();\n\t\t\t\t\t\tString betweenText = sentText.substring(end1, begin2)\n\t\t\t\t\t\t\t\t.trim();\n\n\t\t\t\t\t\t// System.out.println(betweenText);\n\t\t\t\t\t\t// String output = \"\";\n\t\t\t\t\t\t// output += \"|#\" + betweenText + \"#\" +\n\t\t\t\t\t\t// sentText.substring(begin1, end2) + \" ##\"\n\t\t\t\t\t\t// + sentText.substring(begin1, end1) + \"|\" +\n\t\t\t\t\t\t// sentText.substring(begin2, end2) + \"||\";\n\t\t\t\t\t\t// TODO make check nicer not or but set\n\t\t\t\t\t\tif (betweenText.equals(\"-\") || betweenText.equals(\"to\")\n\t\t\t\t\t\t\t\t|| betweenText.equals(\"through\")) {\n\t\t\t\t\t\t\taddTimespan = true;\n\t\t\t\t\t\t\t// System.out.println(\"Found to or - \");\n\t\t\t\t\t\t} else if (betweenText.equals(\"and\")) {\n\t\t\t\t\t\t\t// for 'and' check if 'between' is before first\n\t\t\t\t\t\t\t// timex\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// System.out.println((begin1 - 8));\n\t\t\t\t\t\t\t\tif (begin1 - 8 >= 0) {\n\t\t\t\t\t\t\t\t\tString preText = sentText\n\t\t\t\t\t\t\t\t\t\t\t.substring(begin1 - 8, begin1)\n\t\t\t\t\t\t\t\t\t\t\t.trim().toLowerCase();\n\t\t\t\t\t\t\t\t\t// System.out.println(\"Pre: \" + preText);\n\t\t\t\t\t\t\t\t\tif (preText.equals(\"between\")) {\n\t\t\t\t\t\t\t\t\t\taddTimespan = true;\n\t\t\t\t\t\t\t\t\t\t// System.out.println(\"Found between and\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// System.out.println(\"not Found and: \"\n\t\t\t\t\t\t\t\t\t\t// + preText);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// System.err.println(\"Cut error\" +\n\t\t\t\t\t\t\t\t// sent.getCoveredText());\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// add new annotation\n\t\t\t\t\t\tif (addTimespan) {\n\t\t\t\t\t\t\tTimespan timespan = new Timespan(jcas);\n\t\t\t\t\t\t\t// set text span\n\t\t\t\t\t\t\ttimespan.setBegin(timexs.get(i).getBegin());\n\t\t\t\t\t\t\ttimespan.setEnd(timexs.get(i + 1).getEnd());\n\t\t\t\t\t\t\t// set times\n\t\t\t\t\t\t\ttimespan.setStartTime(timexs.get(i));\n\t\t\t\t\t\t\ttimespan.setEndTime(timexs.get(i + 1));\n\t\t\t\t\t\t\t// System.out.println(\"ADDED\");\n\t\t\t\t\t\t\ttimespan.addToIndexes(jcas);\n\t\t\t\t\t\t\t// remove timex annotations form jcas\n\t\t\t\t\t\t\ttimexs.get(i).removeFromIndexes(jcas);\n\t\t\t\t\t\t\ttimexs.get(i + 1).removeFromIndexes(jcas);\n\t\t\t\t\t\t\taddTimespan = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// output += sentText;\n\t\t\t\t\t\t// System.out.println(output.replace(\"\\n\", \" \"));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "long getProposalId();", "public Date getCtime() {\r\n return ctime;\r\n }", "@Override\n\tpublic void updateTimeOfCancellation(Date timeCancellation,\n\t\t\tLong reservationId) {\n\t\tresTable.updateTimeOfCancellation(timeCancellation, reservationId);\n\t\t\n\t}", "public boolean addCourse(String user, String course){\n String[] tokens = usersRepository.getclassString(user).split(\" \");\r\n String[] courseids = new String[tokens.length];\r\n String courseid = classesRepository.getClassCourseid(course);\r\n for(int i =0; i < tokens.length; i++){\r\n courseids[i] = classesRepository.getClassCourseid(tokens[i]);\r\n }\r\n for(int f =0; f < tokens.length; f++) {\r\n if(courseids[f] == null){\r\n continue;\r\n }\r\n if(courseids[f].equals(courseid)){\r\n return false;\r\n }\r\n }\r\n //check for course space\r\n if(!classesRepository.checkCourseSpace(course)){\r\n return false;\r\n }\r\n\r\n //check here for prereqs\r\n //get student records\r\n String studentrecord = usersRepository.findUserRecords(user);\r\n String studentgrade = usersRepository.findUserGrades(user);\r\n String[] tokenrecords;\r\n String[] tokengrades;\r\n if(studentrecord==null){\r\n tokenrecords = new String[0];\r\n tokengrades = new String[0];\r\n }else{\r\n tokenrecords = studentrecord.split(\" \");\r\n tokengrades = studentgrade.split(\" \");\r\n }\r\n //get course prereq\r\n String[] prereqs = classesRepository.getCoursePrereqs(courseid);\r\n //compare all token records with course prereqs, must be in records without d or f\r\n boolean meetsreq1 = true, meetsreq2 = true;\r\n if(prereqs[0] != null){\r\n meetsreq1=false;\r\n }\r\n if(prereqs[1] != null){\r\n meetsreq2=false;\r\n }\r\n for(int s = 0; s < tokenrecords.length; s++){\r\n if(!tokengrades[s].equals(\"D\") && !tokengrades[s].equals(\"F\")){\r\n if(prereqs[0] != null){\r\n if(prereqs[0].equals(tokenrecords[s])){\r\n meetsreq1 = true;\r\n }\r\n }\r\n if(prereqs[1] != null){\r\n if(prereqs[1].equals(tokenrecords[s])){\r\n meetsreq2 = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n if(meetsreq1 && meetsreq2){\r\n usersRepository.addCourse(user, course);\r\n return true;\r\n }\r\n return false;\r\n }", "public void doBriefing() {\n // Get all class sessions\n List<Models.Session> sessions = em.createNativeQuery(\"select s.* from session s, classparticipant cpa, participant p where s.classid = cpa.classid and cpa.participantid = p.participantid and p.userid = ? and current_date = date(s.starttime) order by s.starttime asc\", Models.Session.class).setParameter(1, user.getUserid()).getResultList();\n\n // If no data\n if (sessions.isEmpty()) {\n replyChat(\"It seems that you're free today!\");\n }\n\n // To format dates\n DateTimeFormatter timeFmt = DateTimeFormat.forPattern(\"h:mm a'\");\n DateTimeFormatter dateFmt = DateTimeFormat.forPattern(\"MMM d', ' YYYY\");\n \n String output = addStats(new DateTime().toString(dateFmt), \"Currently \" + new DateTime().toString(timeFmt));\n\n output += addChat(\"Hey there! You have \" + sessions.size() + \" classes today\");\n\n // For each session\n for (Models.Session session : sessions) {\n\n Models.Class classroom = session.getClassid();\n\n String startTime = new DateTime(session.getStarttime()).toString(timeFmt);\n String endTime = new DateTime(session.getEndtime()).toString(timeFmt);\n\n String status = \"\";\n // If already started\n if (new DateTime().isAfter(new DateTime(session.getStarttime()))) {\n\n // If already ended\n if (new DateTime().isAfter(new DateTime(session.getEndtime()))) {\n status = \"PAST\";\n } // Havent ended\n else {\n status = \"ONGOING\";\n }\n } // Havent started\n else {\n status = \"UPCOMING\";\n }\n\n output += \"<div class='result display' onclick=\\\"window.location.href='SessionDetails?id=\" + classroom.getClassid() + \"&code=\" + session.getSessionid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>\" + status + \"</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + startTime + \" - \" + endTime + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n }", "public String getStatus(int time) {\r\n\t\tString str = time + \"::\" + totalVehicleCount + \"::\" + \"P:\"\r\n\t\t\t\t+ totalSpaces + \"::\" + \"C:\" + getNumCars() + \"::S:\"\r\n\t\t\t\t+ getNumSmallCars() + \"::M:\" + getNumMotorCycles() + \"::D:\"\r\n\t\t\t\t+ dissatifiedVehicles.size() + \"::A:\"\r\n\t\t\t\t+ satisfiedVehicles.size() + \"::Q:\" + vehiclesInQueue.size();\r\n\t\tfor (Vehicle v : this.vehiclesInQueue) {\r\n\t\t\tif (v instanceof Car) {\r\n\t\t\t\tif (((Car) v).isSmall()) {\r\n\t\t\t\t\tstr += \"S\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstr += \"C\";\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tstr += \"M\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tstr += this.setVehicleMsg(null, str, str);\r\n\t\treturn str + \"\\n\";\r\n\t}", "ChallengeTo findChallengeById(int id);", "public java.lang.Long getTiag_id();", "public Notifications(Integer postID, Integer requesterID, Integer providerID,\n Boolean accepted, String type){\n //PostID, requesterID, providerID,locationOfRequester need to create variable?\n status = accepted;\n this.type = type;\n this.requestID = Integer.toString(requesterID);\n this.setProvider(providerID);\n this.type = type;\n this.postID = postID;\n\n }", "public static void main(String[] args) throws ParseException {\n String beginWorkDate = \"8:00:00\";//上班时间\n String endWorkDate = \"12:00:00\";//下班时间\n SimpleDateFormat sdf = new SimpleDateFormat(TimeUtil.DF_ZH_HMS);\n long a = TimeUtil.countMinutes(sdf.parse(beginWorkDate),sdf.parse(endWorkDate));\n System.out.println(a/30);\n\n String beginRestDate = \"8:30:00\";//休息时间\n String endRestDate = \"9:00:00\";\n long e = TimeUtil.countMinutes(sdf.parse(beginWorkDate),sdf.parse(beginRestDate));\n long f = TimeUtil.countMinutes(sdf.parse(beginWorkDate),sdf.parse(endRestDate));\n\n String beginVactionDate = \"10:00:00\";//请假时间\n String endVactionDate = \"11:00:00\";\n long b= TimeUtil.countMinutes(sdf.parse(beginWorkDate),sdf.parse(beginVactionDate));\n long c= TimeUtil.countMinutes(sdf.parse(beginWorkDate),sdf.parse(endVactionDate));\n\n String time = \"9:00:00\";//被别人预约的\n long d = TimeUtil.countMinutes(sdf.parse(beginWorkDate),sdf.parse(time));\n List<Integer> num = new ArrayList<>();\n num.add((int) (d/30));\n\n String myTime = \"11:30:00\";//我约的\n long g = TimeUtil.countMinutes(sdf.parse(beginWorkDate),sdf.parse(myTime));\n List<Integer> mynum = new ArrayList<>();\n mynum.add((int) (g/30));\n\n\n List<Date> yes = new ArrayList<>();//能约\n List<Date> no = new ArrayList<>();//不能约\n List<Date> my = new ArrayList<>();//我约的\n for (int i = 0; i < a/30; i ++) {\n Date times = TimeUtil.movDateForMinute(sdf.parse(beginWorkDate), i * 30);\n System.out.println(sdf.format(times));\n yes.add(times);\n if ((i >= e / 30 && i < f / 30) || (i >= b / 30 && i < c / 30)) {\n //休息时间,请假时间\n no.add(times);\n yes.remove(times);\n continue;\n }\n for (Integer n : num) {\n if (i == n) {\n //被预约时间\n no.add(times);\n yes.remove(times);\n }\n }\n for (Integer n : mynum) {\n if (i == n) {\n //被预约时间\n my.add(times);\n }\n }\n }\n }", "public ArrayList<String> predictAttributeValueFromComment(Person p){\n ArrayList<String> messages = new ArrayList<String>() {{\n add(\"head\");\n }};\n String msg = \"\";\n //case1: dk = age visibility = 0\n //text in the comment: keyword = birthday, pronoun = your\n //date of post = april 13\n //if the year is hidden, do more analysis on other attributes e.g., what year they joined college or attended high school\n\n //case2: dk=political view with visibility =0\n // from text in comments in group discussions\n //relate teh name of the group (political)\n //relate negative vs. positive sentiment\n //names of politicians mentioned\n\n //case3: dk = location/address visibility 0\n //text in POST : keword= Detroit, pronoun I am in\n //text in comment : keword= Detroit, pronoun you are in, day: today\n //date : over a time frame (you are visiting in summer vs. you live here)\n\n p = service.getPerson(p.getNodeID());\n String predictMsg = \"\";\n\n // we need to get a collection of attributes that have visibility set to 0\n ArrayList<Attribute> invisibleAtts = new ArrayList<Attribute>();\n Collection<HasRelationship> hasRels = p.getAttributeRelationships();\n for(HasRelationship h : hasRels){\n h = service.getHasRelationship(h.getId());\n if(h.getVv()==0){\n invisibleAtts.add(service.getAttributeWithId(h.getEnd().getNodeID()));\n }\n }\n\n // if the user has no invisible attributes, the next part can be skipped\n if(!invisibleAtts.isEmpty()){\n\n // the users own comments are already checked for sensitive information, so in this case\n // we need to iterate through all comments and replies that are NOT the owners.\n Collection<Comment> allComments = service.getAllComments();\n //Collection<Comment> ownersComments = p.getComments();\n\n for(Comment c : allComments){\n // skip the owners comments and don't check root posts\n c = service.getComment(c.getNodeID());\n if((!c.getOwnerID().equals(p.getNodeID()))&&(!c.isRoot())){\n //the comment's parent comment must have the owner of the root user\n Comment parentC = service.getComment(c.getParentID());\n if(parentC.getOwnerID().equals(p.getNodeID())){\n // iterate through invisible attributes\n for(Attribute a : invisibleAtts){\n a = service.getAttributeWithId(a.getNodeID());\n String label = a.getLabel().toLowerCase();\n String value = a.getValue().toLowerCase();\n String commentText = c.getText();\n String normalized = commentText.replaceAll(\"[!?,{}()_+-=]\", \"\");\n normalized = normalized.toLowerCase();\n String[] words = normalized.split(\"\\\\s+\");\n boolean lfound= false;\n boolean vfound= false;\n for(String w : words){\n if(w.equals(label)){\n lfound = true;\n }\n if(w.equals(value)){\n vfound = true;\n }\n }\n System.out.println(vfound + \" \" + lfound);\n if(lfound){\n msg = service.getPerson(c.getOwnerID()).getName() + \"'s reply to one of your comments: \\\"\" + c.getText() +\n \"\\\" indirectly mentions the attribute \\\"\" + a.getLabel() + \"\\\" that you set as invisible to others.\";\n messages.add(msg);\n }\n if(vfound){\n String type = \"\";\n if (label.equals(\"interest\")) {\n type = \"interest\";\n } else {\n type = \"attribute\";\n }\n msg = service.getPerson(c.getOwnerID()).getName() + \"'s reply to one of your comments: \\\"\" + c.getText() +\n \"\\\" directly mentions the \"+type+\" \\\"\" + a.getLabel() + \"\\\" that you set as invisible to others.\";\n messages.add(msg);\n }\n predictMsg = predictContext(c.getText(), a.getLabel(), service.getPerson(c.getOwnerID()).getName());\n if(!predictMsg.equals(\"\")){\n messages.add(predictMsg);\n }\n predictMsg = predictContext(c.getText(), a.getValue(), service.getPerson(c.getOwnerID()).getName());\n if(!predictMsg.equals(\"\")){\n messages.add(predictMsg);\n }\n\n }\n }\n }\n }\n }\n\n return messages;\n }", "public long constrainStartTime(long proposed, long length) {\n Alloc pred = getPredecessor();\n Alloc succ = getSuccessor();\n if (pred != null) proposed = Math.max(pred.getEnd(), proposed);\n if (succ != null) proposed = Math.min(proposed, succ.getStart() - length);\n return proposed;\n }", "protected void processJobSubmissionResponse(JobSubmissionResponseTO result) {\n\t\tList<Integer> jobID = result.getJobIDs();\n\t\tUserModel userModel = OurGridPortal.getUserModel();\n\t\tfor (Integer integer : jobID) {\n\t\t\tuserModel.addJobId(getJobViewId(), integer);\n\t\t}\n\t\t\n\t}", "public void setREQ_END_TIME(java.sql.Time value)\n {\n if ((__REQ_END_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_END_TIME)))\n {\n _isDirty = true;\n }\n __REQ_END_TIME = value;\n }", "@Column(name = \"D_CTIME\", nullable = false)\n public Date getCtime() {\n return this.ctime;\n }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;" ]
[ "0.50229913", "0.48233506", "0.47333443", "0.46141723", "0.4560348", "0.45380726", "0.4534027", "0.44996816", "0.44859132", "0.4471004", "0.44703427", "0.44435784", "0.4434395", "0.4393131", "0.43822148", "0.43811777", "0.4378737", "0.43736264", "0.4357337", "0.43505627", "0.42983133", "0.42938712", "0.42933282", "0.42890406", "0.42870548", "0.42787707", "0.4265757", "0.42610458", "0.4249833", "0.42494074", "0.42278785", "0.42125574", "0.42107514", "0.42054164", "0.4181929", "0.4181633", "0.4170937", "0.41623017", "0.41540468", "0.41527706", "0.4152577", "0.41507402", "0.41413882", "0.41394022", "0.41264966", "0.41170636", "0.41144222", "0.41050616", "0.40986046", "0.40964925", "0.4094297", "0.4071316", "0.4065835", "0.4054137", "0.4050361", "0.40441334", "0.40435869", "0.4040173", "0.4032008", "0.40289965", "0.40278795", "0.4027181", "0.40258428", "0.40201727", "0.40192115", "0.40178323", "0.401195", "0.40095383", "0.40089497", "0.40079057", "0.40054202", "0.39917156", "0.39900613", "0.39808935", "0.39770707", "0.39751688", "0.39689192", "0.3963787", "0.396294", "0.39629048", "0.3960732", "0.3958902", "0.39571103", "0.39568397", "0.39560875", "0.395447", "0.39457595", "0.39442095", "0.39434537", "0.3942039", "0.39411855", "0.39396507", "0.393781", "0.39359057", "0.39356205", "0.39320624", "0.3931099", "0.39278972", "0.3921361", "0.39204663" ]
0.5619726
0
An Entity represents a node in the graph. It could be a single person, or a collection of people, or so forth.
public interface Entity extends Immunizable { /** * Counts the total number of people in a certain state. An entity may be in multiple states if there are * multiple spreadables in play. * * @param state Which state to count * @return The number of entities in that state */ int count(State state); /** * Counts the total number of people in a certain state for a given Spreadable. An entity will only ever be * in one state per spreadable. * * @param state Which state to count * @param spreadable Which spreadable to consider * @return The number of entities in that state for the given spreadable */ int count(State state, Spreadable spreadable); /** * @return The total number of individuals that this Entity represents */ int population(); /** * Try to change entities from one state to another. If there aren't enough entities with the old state, * then only that many will be changed to the new state. * * @param spreadable * @param from * @param to * @param count */ void changeState(Spreadable spreadable, State from, State to, int count); /** * Try to infect one or more entities with a specific Spreadable. This will not infect more people than are * susceptible, and may also be affected by rules for coexistence of spreadables. * * @param spreadable * @param count */ default void infect(Spreadable spreadable, int count) { changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count); } /** * Try to recover one or more entities with a specific Spreadable. This will not recover more entities than are * infected. * * @param spreadable * @param count */ default void recover(Spreadable spreadable, int count) { changeState(spreadable, State.INFECTED, State.RECOVERED, count); } /** * Try to return one or more entities from the infected state to the susceptible state for a given Spreadable. * This will not affect more entities than are infected. * * @param spreadable * @param count */ default void suscept(Spreadable spreadable, int count) { changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count); } String getName(); Collection<String> getLabels(); Collection<Spreadable> getSpreadables(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Entity\n\textends Node\n{\n\n\tpublic abstract String getPublicId();\n\n\tpublic abstract String getSystemId();\n\n\tpublic abstract String getNotationName();\n}", "public E getEntity();", "@Override\n\tpublic Entity getEntity() {\n\t\treturn entity;\n\t}", "void visit(Entity node);", "public interface Entity {\n}", "EntityType getEntity();", "public Entity getEntity() {\n\t\treturn entity;\n\t}", "public E getEntity() {\n return this.entity;\n }", "public DefaultEntity(Node<A> node) {\r\n\t\tsuper(node);\r\n\t\tevents = new Vector<Event<A>>();\r\n\t}", "public interface Entity {\n\n\tpublic abstract Point getCenterPosition();\n\n\tpublic abstract float getHeight();\n\n\tpublic abstract Colliding getHitbox();\n\n\tpublic abstract float getLifetime();\n\n\tpublic abstract String getName();\n\n\tpublic abstract Point getPosition();\n\n\tpublic abstract Team getTeam();\n\n\tpublic abstract float getWidth();\n\n\tpublic abstract boolean hit(Bullet bullet);\n\n\tpublic abstract void render();\n\n\tpublic abstract void renderShapes();\n\n\tpublic abstract void renderText();\n\n\tpublic abstract boolean update();\n}", "void addNode(Entity entity) {\n\t\tProcessing.nodeSet.add(entity);\n\t\tSystem.out.println(\"the entity was successfully added to the network.\");\n\t}", "public ZEntity getEntity() {\r\n return entity;\r\n }", "public void addEntity(Entity e)\r\n\t{\r\n\t\tentities.add(e);\r\n\t}", "public interface Entity {\n\n\t/**\n\t * Returns a {@code Long} representing the unique ID of this entity.\n\t *\n\t * @return Returns the unique ID of this Entity as {@code Long}, or {@code null} if this Entity doesn't\n\t * have ID.\n\t */\n\tpublic Long getEntityId();\n\n\t/**\n\t * Change the unique ID of this Entity.\n\t *\n\t * @param id a {@code Long} on {@code null} if doesn't have ID\n\t * @see #getEntityId()\n\t */\n\tpublic void setEntityId(Long id);\n\n}", "public abstract V getEntity();", "@Override\n public Entity getEntity() {\n return super.getEntity();\n }", "@POST\n\t@Consumes(\"application/json\")\n\t@Produces(\"application/json\")\n\tpublic Response addNode(Entity entity) {\n\t\tif(currentGraph != null) {\n\t\t\tcurrentGraph.agregarNodo(entity);\n\t\t\treturn Response.status(200)\n\t\t\t\t\t.entity(currentGraph)\n\t\t\t\t\t.build();\n\t\t}else {\n\t\t\treturn Response.status(400)\n\t\t\t\t\t.build();\n\t\t}\n\n\t}", "public interface GearyEntity {\n\n /**\n * Get the underlying data holder for this entity.\n */\n PersistentDataHolder getDataHolder();\n\n /**\n * Gets the contained component of type {@code T} or null if this entity does not contain {@code\n * T}\n */\n <T extends Component> T getComponent(Class<T> componentClass);\n\n /**\n * Adds the provided component to this entity. Adding the same type of component a second time\n * overwrites the first one.\n */\n void addComponent(Component component);\n\n /**\n * Removes the component with this type from this entity. Noop if the component is not contained.\n */\n void removeComponent(Class<? extends Component> componentClass);\n\n /**\n * Returns true if this entity has a component with this type.\n */\n boolean hasComponent(Class<? extends Component> componentClass);\n\n /**\n * Gets the ItemStack this entity is attached to, if it exists.\n */\n Optional<ItemStack> getItemStack();\n\n /**\n * Gets this entities UUID.\n */\n UUID getUUID();\n\n /**\n * Gets the entity version this entity was created using.\n */\n long getVersion();\n\n /**\n * Gets the Player this entity is held by, if it exists.\n */\n Optional<Player> getHoldingPlayer();\n\n /**\n * Gets all components within this entity.\n */\n Set<Component> getComponents();\n}", "com.google.cloud.videointelligence.v1p2beta1.Entity getEntity();", "void create(E entity);", "public interface Entity {\n\n // ===================================================================================\n // Display String\n // ==============\n /**\n * @return The display string of basic informations with one-nested relation values. (NotNull)\n */\n public String toStringWithRelation();\n\n /**\n * @param name The name for display. (NullAllowed: If it's null, it does not have a name)\n * @param column Does it contains column values or not?\n * @param relation Does it contains relation existences or not?\n * @return The display string for this entity. (NotNull)\n */\n public String buildDisplayString(String name, boolean column, boolean relation);\n}", "public void add(E entity);", "public final String getEntity() {\n\t\treturn entity;\n\t}", "public Entity(String name)\n {\n super(name);\n isAs = Lists.newArrayList();\n }", "public EntityBase getEntity() {\n return entity;\n }", "Entity createEntity();", "public void insert(Entity entity){\n\n //Find the correct node for that object\n int index = this.getIndex(entity);\n if(index != -1){\n // Recursively insert\n this.getNodes().get(index).insert(entity);\n }\n\n //There is no subnode fit for this lets add it to the current node\n this.entities.add(entity);\n\n\n //Now that we have a new node, is the node ok with it?\n if(this.entities.size()> MAX_OBJECTS && this.level < MAX_LEVELS){\n // Nah... We need to split!\n this.split();\n\n // Let's reinsert all the objets in the current node into the right place\n int i = 0;\n while (i < this.entities.size()){\n Entity gObj = this.entities.get(i);\n index = this.getIndex(gObj);\n if(index != -1){\n //WE need to reinsert it in the correct place\n this.entities.remove(gObj);\n this.nodes.get(index).insert(gObj);\n }else{\n i += 1; //To the next gameObject\n }\n }\n }\n }", "E create(E entity);", "E create(E entity);", "protected T getEntity() {\r\n\t\treturn entity;\r\n\t}", "public void addEntity(final Entity aEntity)\r\n\t{\r\n\t\tif ( !aEntity.isParticle() && mEntities.containsKey(aEntity.getId()))\r\n\t\t{\r\n\t\t\taEntity.init(this, aEntity.getId());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\taEntity.init(this, generateId());\r\n\t\tmAddEntities.put(aEntity.getId(), aEntity);\r\n\t}", "public interface Entity {\n\n /**\n * Returns the position of this entity in the simulation system.\n *\n * @return the position of this entity.\n * @see Pasture\n * @see Point\n */\n public Point getPosition();\n\n /**\n * Sets the position of this entity.\n *\n * @param newPosition the new position of this entity.\n * @see Point\n */\n public void setPosition(Point newPosition);\n\n /**\n * Performs the relevant actions of this entity, depending on what kind of\n * entity it is.\n */\n public void tick();\n\n /**\n * Returns the icon of this entity, to be displayed by the pasture gui.\n *\n * @see PastureGUI\n */\n public ImageIcon getImage();\n\n /**\n * Returns the name of the entity\n */\n public String type();\n}", "public void addEntity(Entity entity) {\n\t\tthis.entities.add(entity);\n\t}", "@Override\n\tprotected Class<FriendCircle> getEntityClass() {\n\t\treturn FriendCircle.class;\n\t}", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }", "String getEntity();", "String getEntity();", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }", "public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }", "public Entity getEntity() {\n\t\treturn DodgeBlawk.getDataManager().getEntity(getId());\n\t}", "public Entity(Entity entity) {\n this(entity.getCoordinates(), entity.getIcon(), entity.canChangeRooms());\n }", "public Entity( int x, int y){\n this.x = x;\n this.y = y;\n }", "public int addAsEntity(Entity e, int x, int y) {\n e.setMapRelation(new MapEntity_Relation(this, e, x, y));\n System.out.println(e.name_);\n int error_code = this.map_grid_[y][x].addEntity(e);\n System.out.println(e.name_ + \"2\");\n if (error_code == 0) {\n this.entity_list_.put(e.name_, e);\n } else {\n e.setMapRelation(null);\n System.err.println(\"Error in entity list\");\n }\n return error_code;\n }", "public String getEntity()\n\t\t{\n\t\t\treturn endpointElement.getAttribute(ENTITY_ATTR_NAME);\n\t\t}", "public Tuple addEntity(Entity entity){\n\t\tsynchronized(m_viz){\n\t\t\treturn m_entities.addTuple(entity);\n\t\t}\n\t}", "public interface Entity {\n /**\n * check whether a collision with another entity happened\n * and perform the relevant action.\n * @param e the other entity\n * @return whether the collision happened\n */\n boolean collidedWith(Entity e);\n\n void draw(Graphics g, DisplayWriter d);\n\n void doLogic(long delta);\n\n void move(long delta);\n\n /**\n * whether or not the entity is out of the currently displayed area.\n * @return true if not visible\n */\n boolean outOfSight();\n}", "protected abstract ENTITY createEntity();", "Entity(Vector3f position) {\n this.position = position;\n }", "@Override\n\tpublic void entityAdded(Entity entity)\n\t{\n\t\t\n\t}", "public MapEntity getEntity() {\n\t\treturn _entity;\n\t}", "@Test\n\tpublic void testConvertToEntity() throws Exception {\n\t\tODocument document = new ODocument(\"Source\")\n\t\t\t\t.field(\"shortTitle\", \"shortTitle\")\n\t\t\t\t.field(\"shortTitleasc\", \"shortTitle\")\n\t\t\t\t.field(\"shortRef\", \"shortRef\")\n\t\t\t\t.field(\"sourceType\", \"sourceType\")\n\t\t\t\t.field(\"url\", \"url\")\n\t\t\t\t.field(\"productCode\", \"productCode\")\n\t\t\t\t.field(\"author\", \"author\")\n\t\t\t\t.field(\"citation\", \"citation\")\n\t\t\t\t.field(\"longTitle\", \"longTitle\")\n\t\t\t\t.field(\"copyright\", \"copyright\")\n\t\t\t\t.field(\"description\", \"Description\")\n\t\t\t\t.field(\"descriptionMarkup\", \"default\")\n\t\t\t\t.field(\"color\", 0x123456)\n\t\t\t\t.field(\"created\", 1L)\n\t\t\t\t.field(\"modified\", 2L);\n\t\t// persist to database to create id\n\t\tdocument.save();\n\n\t\tISource node = repository.convertToEntity(document);\n\n\t\tassertEquals(\"shortTitle\", node.getShortTitle());\n\t\tassertEquals(\"sourceType\", node.getSourceType());\n\t\tassertEquals(\"shortRef\", node.getShortRef());\n\t\tassertEquals(\"url\", node.getUrl());\n\t\tassertEquals(\"productCode\", node.getProductCode());\n\t\tassertEquals(\"author\", node.getAuthor());\n\t\tassertEquals(\"citation\", node.getCitation());\n\t\tassertEquals(\"longTitle\", node.getTitle());\n\t\tassertEquals(\"copyright\", node.getCopyright());\n\t\tassertEquals(\"Description\", node.getDescription());\n\t\tassertEquals(\"default\", node.getDescriptionMarkup());\n\t\tassertEquals(new Integer(0x123456), node.getColor());\n\t\tassertEquals(new Long(1L), node.getCreated());\n\t\tassertEquals(new Long(2L), node.getModified());\n\n\t\tassertEquals(document.getIdentity().toString(), node.getId());\n\t}", "public void setEntity(org.openejb.config.ejb11.Entity entity) {\n this._entity = entity;\n }", "public interface Entity {\r\n\r\n /**\r\n * Gets the initial (relative, map) position of the entity.\r\n * \r\n * @return the initial position of the player\r\n */\r\n Pair<Integer, Integer> getInitialPosition();\r\n\r\n /**\r\n * Gets the position of the entity on screen (absolute, pixel).\r\n * \r\n * @return entity current position on screen\r\n */\r\n Pair<Integer, Integer> getPosition();\r\n\r\n /**\r\n * Sets the position of the entity on screen.\r\n * Can be used to change an absolute position (that is grid locked because they're a multiple of a value) \r\n * to a specific position and place an object everywhere you want\r\n * \r\n * Please check {@link TestEntity} for an in-depth explanation of how this works.\r\n * \r\n * @param position defines the entity position on screen\r\n */\r\n void setPosition(Pair<Integer, Integer> position);\r\n\r\n /**\r\n * Gets the hitbox of the entity (a Rectangle if it's solid, null otherwise).\r\n * \r\n * @return the collision box of the entity.\r\n */\r\n Rectangle getCollisionBox();\r\n\r\n /**\r\n * Gets the path of the image that will be used by the view. \r\n * \r\n * @return the path where the image of the entity is located\r\n */\r\n String getImagePath();\r\n\r\n /**\r\n * Sets the path of the image that will be used by the view.\r\n * \r\n * @param path the path where the image of the entity is located\r\n */\r\n void setImagePath(String path);\r\n\r\n /**\r\n * Method that defines if the entity is destroyed or not.\r\n * \r\n * @return true if destroyed, false otherwise\r\n */\r\n boolean isDestroyed();\r\n\r\n /**\r\n * Sets the status of the entity (true if destroyed, false otherwise).\r\n * \r\n * @param destroyed defines if the entity has been destroyed or not\r\n */\r\n void setStatus(boolean destroyed);\r\n\r\n /**\r\n * Gets the entity width.\r\n * \r\n * @return entity width\r\n */\r\n int getWidth();\r\n\r\n /**\r\n * Sets the new entity width.\r\n * \r\n * @param width defines the new entity width\r\n */\r\n void setWidth(int width);\r\n\r\n /**\r\n * Gets the entity height.\r\n * \r\n * @return entity height\r\n */\r\n int getHeight();\r\n\r\n /**\r\n * Sets the new entity height.\r\n * \r\n * @param height defines the new entity width\r\n */\r\n void setHeight(int height);\r\n\r\n /**\r\n * Return the state of the block, if it is solid or not.\r\n * @return true if entity is solid, false otherwise.\r\n */\r\n boolean isSolid();\r\n\r\n /**\r\n * Sets the score value of the entity.\r\n * \r\n * @param scoreValue defines the value that will be given (added) to players score when the entity is destroyed\r\n */\r\n void setScoreValue(int scoreValue);\r\n\r\n /**\r\n * Gets the score value of the entity.\r\n * \r\n * @return a score value that defines the value of the entity\r\n */\r\n int getScoreValue();\r\n}", "public final void mT__174() throws RecognitionException {\n try {\n int _type = T__174;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:172:8: ( 'Entity' )\n // InternalMyDsl.g:172:10: 'Entity'\n {\n match(\"Entity\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public String toString() {\n return \"Entity(coordinates: \" + this.coordinates + \", icon: \" + this.icon\n + \")\";\n }", "public void sendEntity(Entity entity);", "public String getEntityName() {\n return entityName;\n }", "public INamedReference<IEntity> getEntityRef();", "public final EObject ruleEEntity() throws RecognitionException {\n EObject current = null;\n\n Token lv_entity_0_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:9295:2: ( ( (lv_entity_0_0= RULE_ENTITY ) ) )\n // InternalRMParser.g:9296:2: ( (lv_entity_0_0= RULE_ENTITY ) )\n {\n // InternalRMParser.g:9296:2: ( (lv_entity_0_0= RULE_ENTITY ) )\n // InternalRMParser.g:9297:3: (lv_entity_0_0= RULE_ENTITY )\n {\n // InternalRMParser.g:9297:3: (lv_entity_0_0= RULE_ENTITY )\n // InternalRMParser.g:9298:4: lv_entity_0_0= RULE_ENTITY\n {\n lv_entity_0_0=(Token)match(input,RULE_ENTITY,FOLLOW_2); \n\n \t\t\t\tnewLeafNode(lv_entity_0_0, grammarAccess.getEEntityAccess().getEntityENTITYTerminalRuleCall_0());\n \t\t\t\n\n \t\t\t\tif (current==null) {\n \t\t\t\t\tcurrent = createModelElement(grammarAccess.getEEntityRule());\n \t\t\t\t}\n \t\t\t\tsetWithLastConsumed(\n \t\t\t\t\tcurrent,\n \t\t\t\t\t\"entity\",\n \t\t\t\t\tlv_entity_0_0,\n \t\t\t\t\t\"org.sodalite.dsl.RM.ENTITY\");\n \t\t\t\n\n }\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 }", "public ClassName entity() {\n return ClassName.get(this.getEntityPack(), this.getClassName());\n }", "public AddEntityCommand(SceneBase scene, Entity entity) {\n\t\tthis(scene, entity, null);\n\t}", "public void setEntity(Entity entity) {\n\t\tthis.entity = entity;\n\t\tString s = entity.getClass().toString();\n\t\t// trim \"Class \" from the above String\n\t\tentityType = s.substring(s.lastIndexOf(\" \") + 1);\n\t}", "@Override\n\tpublic void addEntity( final Entity _entity )\n\t{\n\t\tif( _entity == null )\n\t\t{\n\t\t\tLogger.println( \"Attempting to add null entity.\", Logger.Verbosity.MAJOR ) ;\n\t\t\treturn ;\n\t\t}\n\n\t\tentitiesToAdd.add( _entity ) ;\n\t}", "public String getEntity()\n\t\t{\n\t\t\treturn userElement.getAttribute(ENTITY_ATTR_NAME);\n\t\t}", "public void addEntity(T entity) {\n\t\t// Remove from needed\n\t\tidTracker.unset(entity.getId());\n\n\t\t// Add to entities\n\t\tentityMap.add(entity);\n\t}", "public void addEntity(Entity entity)\n\t{\n\t\t\n\t\tif (entity.getClass() == PlayerMP.class)\n\t\t{\n\t\t\t//System.out.println(\"ADDING PLAYER TO PLAYER LIST\");\n\t\t\tplayers.add((PlayerMP)entity);\n\t\t\t//System.out.println(\"World Player Count: \" + players.size());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tentities.add(entity);\n\t\t}\n\t}", "@Override\n\tpublic Class<E> getEntityClass() {\n\t\treturn null;\n\t}", "public void entityReference(String name);", "T createEntity();", "public ClientEntity(final Entity e) {\r\n\t\tsuper(e);\r\n\t}", "public final void mT__113() throws RecognitionException {\n try {\n int _type = T__113;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalEsm.g:107:8: ( 'entity' )\n // InternalEsm.g:107:10: 'entity'\n {\n match(\"entity\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void add(E e) {\n\t\tentities.add(e);\n\t}", "public final void mT__65() throws RecognitionException {\n try {\n int _type = T__65;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:63:7: ( 'entity' )\n // InternalMyDsl.g:63:9: 'entity'\n {\n match(\"entity\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void addEntity(Entity entity)\n {\n if (withinBounds(entity.getPosition()))\n {\n setOccupancyCell(entity.getPosition(), entity);\n this.entities.add(entity);\n }\n }", "public void addEntity(Entity entity)\n {\n if (this.withinBounds(entity.getPosition()))\n {\n this.setOccupancyCell(entity.getPosition(), entity);\n this.entities.add(entity);\n }\n }", "@XmlElement(name = \"entity\")\n public String getEntityId() {\n return entityId;\n }", "@Override\n\tpublic EntityGraph<?> createEntityGraph(String graphName) {\n\t\treturn null;\n\t}", "public final void mT__17() throws RecognitionException {\n try {\n int _type = T__17;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:15:7: ( 'entity' )\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:15:9: 'entity'\n {\n match(\"entity\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setEntityId(String entityId) {\n this.entityId = entityId;\n }", "public interface ObjectGraph {\n\n\t\n\t/**\n\t * As in neo4j, starts a new transaction and associates it with the current thread.\n\t * @return a transaction from NeoService.\n\t */\n\tTransaction beginTx();\n\n\t/**\n\t * Mirror a java object within the neo4j graph. Only fields annotated with {@code}neo\n\t * will be considered.\n\t * @param o\n\t */\n\t<A> void persist(A... o);\n\n\t/**\n\t * removes all data representing an object from the graph.\n\t * \n\t * @param o an object retrieved from this {@link ObjectGraph}\n\t */\n\tvoid delete(Object... o);\n\t\n\t\n\t/**\n\t * Looks up a neo4j graph node using it's java object\n\t * mirror. \n\t * @param o an object retrieved from this {@link ObjectGraph}\n\t * @return neo4j node represented by o\n\t */\n\tNode get(Object o);\n\t\n\t/**\n\t * Looks up all instances of {@code}type in the graph.\n\t * \n\t * @param type a type previously stored in the graph\n\t * @return a Collection of {@code}type instances.\n\t */\n\t<T> Collection<T> get(Class<T> type);\n\n\t/**\n\t * Type safe lookup of object given it's neo4j nodeid.\n\t * Your domain classes may use {@link Nodeid#id()} to discover\n\t * their neo4j nodeid. \n\t * \n\t * @param t\n\t * @param key neo4j node id.\n\t * @return\n\t */\n\t<T> T get(Class<T> t, long key);\n\n\t\n\t/**\n\t * Return an object represented by <code>node</code> provided\n\t * the node was created by jo4neo.\n\t * \n\t * @param node\n\t * @return an object that mirrors node.\n\t */\n\tObject get(Node node);\n\t\n\t/**\n\t * Looks up the node representation of a given \n\t * uri. This method may update your graph if no node\n\t * was previously allocated for the uri.\n\t * \n\t * @return the node representation of uri.\n\t */\n\tNode get(URI uri);\n\n\n\t/**\n\t * Unmarshal a collections of nodes into objects.\n\t * \n\t */\n\t<T> Collection<T> get(Class<T> type, Iterable<Node> nodes);\n\n\t/**\n\t * Closes this ObjectGraph after which it will be unavailable \n\t * for use. Calling close is necessary, and should be called even\n\t * if the application is halted suddenly. ObjectGraph's maintain \n\t * a lucene index which may become corrupt without proper shutdown.\n\t * \n\t */\n\tvoid close();\n\n\t/**\n\t * Begin fluent interface find. <code>a</code> should be \n\t * a newly constructed instance as it's contents will be modified/initialized\n\t * by this call.\n\t * <pre>\n\t * <code>\n\t * Customer customer = new Customer();\n\t * customer = graph.find(customer).where(customer.id).is(123).result();\n\t * </code>\n\t * </pre>\n\t * \n\t * @param a\n\t * @return\n\t */\n\t<A> Where<A> find(A a);\n\n\t/**\n\t * Counts child entities without loading objects into memory. This is preferable to \n\t * using Collection.size(), which would load the full collection into memory.\n\t * <pre>\n\t * <code>\n\t * Customer customer = new Customer();\n\t * customer = graph.find(customer).where(customer.id).is(123).result();\n\t * long numOrders = graph.count(customer.orders);\n\t * </code>\n\t * </pre>\n\t * \n\t * @param values a collection value from a jo4neo annotated field.\n\t * @return\n\t */\n\tlong count(Collection<? extends Object> values);\n\n\t/**\n\t * Returns a collection of entities added since <code>d</code>.\n\t * Type <code>t</code> must be annotated with {@link Timeline}\n\t * \n\t * @see Timeline\n\t * \n\t */\n\t<T> Collection<T> getAddedSince(Class<T> t, Date d);\n\n\t/**\n\t * Returns a collection of entities added bewteen dates from and to.\n\t * Type <code>t</code> must be annotated with {@link Timeline}.\n\t * \n\t * @see Timeline\n\t */\n\t<T> Collection<T> getAddedBetween(Class<T> t, Date from,\n\t\t\tDate to);\n\n\t\n\t/**\n\t * Returns up to <code>max</code> most recently added instances of type <code>t</code>\n\t * \n\t * @param max limit the number of instances returned\n\t * @see neo#recency()\n\t */\n\t<T> Collection<T> getMostRecent(Class<T> t, int max);\n\t\n\t\n\t<T> T getSingle(Class<T> t, String indexname, Object value);\n\t\n\t<T> Collection<T> get(Class<T> t, String indexname, Object value);\n\t\n\t<T> Collection<T> fullTextQuery(Class<T> t, String indexname, Object value);\n\n}", "public MuseologicalObjectDO getEntity(){\r\n\t\tMuseologicalObjectDO objDO = new MuseologicalObjectDO();\r\n\t\tif(objectId != null) objDO.setId(objectId);\r\n\t\tobjDO.setName(name);\r\n\t\tobjDO.setDate(date.getTime());\r\n\t\tobjDO.setObjectType(objectType);\r\n\t\treturn objDO;\r\n\t}", "@Override\n\tpublic <T> EntityGraph<T> createEntityGraph(Class<T> rootType) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Entity createEntity() {\n\t\tEntity entity = new Entity(LINKS_ENTITY_KIND);\n\t\tentity.setProperty(id_property, ID);\n\t\tentity.setProperty(url_property, url);\n\t\tentity.setProperty(CategoryID_property, CategoryID);\n\t\tentity.setProperty(note_property, note);\n\t\tentity.setProperty(createdOn_property, createdOn);\n\t\tentity.setProperty(updatedOn_property, updatedOn);\t\t\t\n\t\treturn entity;\n\t}", "void removeNode(Entity entity) {\n\t\tProcessing.nodeSet.remove(entity);\n\t\tProcessing.friendMap.remove(entity);\n\n\t\tSystem.out.println(\"the person was successfully removed from the network.\");\n\t}", "public void setEntity(EntityBase entity) {\n if (((entity != null) && !entity.equals(this.entity)) ||\n ((this.entity != null) && !this.entity.equals(entity))) {\n reset();\n }\n this.entity = entity;\n }", "protected abstract E createEntity(String line);", "public Entity() {\n this.position = new Point(0,0);\n realX=0;\n realY=0;\n }", "public static void addEntity(org.bukkit.entity.Entity entity) {\n\t\tEntity nmsentity = CommonNMS.getNative(entity);\n\t\tnmsentity.world.getChunkAt(MathUtil.toChunk(nmsentity.locX), MathUtil.toChunk(nmsentity.locZ));\n\t\tnmsentity.dead = false;\n\t\t// Remove an entity tracker for this entity if it was present\n\t\tWorldUtil.getTracker(entity.getWorld()).stopTracking(entity);\n\t\t// Add the entity to the world\n\t\tnmsentity.world.addEntity(nmsentity);\n\t}", "public interface Node extends TreeComponent {\n /**\n * The types of decision tree nodes available.\n */\n enum NodeType {\n Internal,\n Leaf\n }\n\n /**\n * Gets the type of this node.\n * @return The type of node.\n */\n NodeType getType();\n\n void print();\n\n String getClassLabel(DataTuple tuple);\n}", "void buildFromEntity(E entity);", "@Override\r\n\tpublic boolean fisheyeNode(Object entity) {\n\t\treturn true;\r\n\t}", "void create(T entity);", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "public void addEntity(final Entity aEntity, final int aX, final int aY)\r\n\t{\r\n\t\tif ( !aEntity.isParticle() && mEntities.containsKey(aEntity.getId()))\r\n\t\t{\r\n\t\t\taEntity.init(this, aEntity.getId());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\taEntity.init(this, generateId());\r\n\t\taEntity.setX(aX);\r\n\t\taEntity.setY(aY);\r\n\t\tmAddEntities.put(aEntity.getId(), aEntity);\r\n\t}", "public void add(E entity)\r\n\t{\r\n\t\tpad( 1 );\r\n\r\n\t\tentities[size] = entity;\r\n\t\t\r\n\t\tonAdd( entity, size );\r\n\t\t\r\n\t\tsize++;\r\n\t}", "@Override\n public String getFormatEntity() {\n return NameIDType.ENTITY;\n }", "public void setEntity(String entity) {\n\t\tthis.setEntity(entity, false);\n\t}", "public NamedEntity() {}", "public EntitiesAction(ModelSession session, IEntities<?> entities,\r\n\t\t\tIEntity<?> entity) {\r\n\t\tthis(session);\r\n\t\tthis.entities = entities;\r\n\t\tthis.entity = entity;\r\n\t}" ]
[ "0.7292718", "0.63286376", "0.6261692", "0.6241566", "0.6122665", "0.6099522", "0.60484856", "0.60461026", "0.6027383", "0.6007629", "0.5988585", "0.59514344", "0.5933344", "0.5881392", "0.5802563", "0.5792175", "0.57839614", "0.57839006", "0.57428163", "0.57209164", "0.5719706", "0.5667395", "0.56555754", "0.56511945", "0.5642518", "0.55881923", "0.55819976", "0.5576206", "0.5576206", "0.5569623", "0.55690295", "0.5567785", "0.55500543", "0.54950386", "0.5467827", "0.54260087", "0.54260087", "0.5403762", "0.5403762", "0.5403762", "0.5388445", "0.5370875", "0.53628415", "0.5362525", "0.5348985", "0.53441066", "0.53351367", "0.5333694", "0.5333612", "0.53329146", "0.5325523", "0.5321246", "0.53209734", "0.530672", "0.53061235", "0.52919924", "0.5291239", "0.528671", "0.5284941", "0.52844894", "0.5283759", "0.52720696", "0.5269901", "0.526899", "0.5267909", "0.52538955", "0.5238183", "0.52378297", "0.5233322", "0.5231393", "0.52191895", "0.5211574", "0.521018", "0.52035606", "0.5203463", "0.5196805", "0.51959383", "0.519578", "0.5183627", "0.5181247", "0.5178864", "0.5166819", "0.5163504", "0.51557976", "0.51525915", "0.51523924", "0.51502216", "0.5148279", "0.5147951", "0.5144342", "0.51439494", "0.51410055", "0.51355296", "0.51322496", "0.51322496", "0.5131898", "0.51238644", "0.51193994", "0.51144993", "0.5111115", "0.51104766" ]
0.0
-1
Counts the total number of people in a certain state. An entity may be in multiple states if there are multiple spreadables in play.
int count(State state);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int countObjectFlowStates();", "protected int count_nbr_in_state ( int state )\r\n {\r\n OSPF_Interface oif;\r\n int count = 0;\r\n int i, j; \r\n int if_no, nbr_no;\r\n \r\n if_no = if_list.size();\r\n for ( i = 0; i < if_no; i++) {\r\n oif = (OSPF_Interface) if_list.elementAt(i);\r\n nbr_no = oif.neighbor_list.size();\r\n for ( j = 0; j < nbr_no; j++) {\r\n OSPF_Neighbor nbr = (OSPF_Neighbor) oif.neighbor_list.elementAt(j);\r\n if (nbr.state == state)\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "int getStateValuesCount();", "public int numberOfStates();", "int count(State state, Spreadable spreadable);", "public Integer excerciseStateCount(Activity activity, ExerciseState state);", "Map<StateT, Map<ConditionT, Long>> getNumExecutions();", "private int calcNumParticlesInState(byte state){\n //use bitwise operators to determine the number of particles in the incomingState\n int count = 0;\n for(int n = 0; n < SMASKS.length; n++){\n if((state & SMASKS[n]) == SMASKS[n]){\n count++;\n }\n }\n return count;\n }", "protected abstract int numStates();", "long getNumExecutionsByTransition(StateT state, ConditionT condition);", "public int numStates();", "public abstract int numStates();", "public int countByExample(StateExample example) {\n Integer count = (Integer) getSqlMapClientTemplate().queryForObject(\"lgk_state.abatorgenerated_countByExample\", example);\n return count;\n }", "public int countPerson() {\n\t\treturn count(GraphQueries.COUNT_PERSON);\n\t}", "@SuppressWarnings(\"deprecation\")\r\n\tprivate int countEntities(){\r\n\t\tQuery query = new Query(\"UserProfile\");\r\n\t\treturn datastore.prepare(query).countEntities();\r\n\t}", "int getPersonInfoCount();", "static public int numberOfPersons() {\n return personMap.size();\n }", "public static long getNumberStates(Component comp) {\n\t\tAtomType atomicType = (AtomType) comp.getType();\n\t\treturn ( (PetriNet) atomicType.getBehavior()).getState().size();\n\t}", "int countByExample(UploadStateRegDTOExample example);", "final public int get_count(int states, int actions) {\r\n\t\tint count = 0;\r\n\r\n\t\tlock_.lock();\r\n\r\n\t\ttry {\r\n\t\t\tBPF.getInstance().getBPFLogger().debug(TAG, \"Log size: \" + log_.size());\r\n\r\n\t\t\tfor (int i = 0; i < log_.size(); i++) {\r\n\r\n\t\t\t\tif ((log_.get(i).state().getCode() & states) != 0\r\n\t\t\t\t\t\t&& (log_.get(i).action().getCode() & actions) != 0) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "private void countItems(ArrayList<Entity> entities) {\n\n\t\thealth = 0;\n\t\tarmor = 0;\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\n\t\t\tEntity curr = entities.get(i);\n\n\t\t\tif (curr instanceof Health) {\n\t\t\t\thealth++;\n\t\t\t} else if (curr instanceof Armor) {\n\t\t\t\tarmor++;\n\t\t\t}\n\n\t\t}\n\n\t}", "public long countAllUserEntitys() {\n return userEntityRepository.count();\n }", "public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public int countEntities(Map<String, Object> parms) {\n\t\treturn 0;\n\t}", "public int countEntities(Map<String, Object> parms) {\n\t\treturn 0;\n\t}", "public Integer entitiesCount() {\n return this.entitiesCount;\n }", "public void getCountByCityByState(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name whose contacts you want to see in sorted order by zip code\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tlog.info(\"Enter the city name\");\n\t\tString cityName = obj.next();\n\t\tLong personByCity = ContactList.stream().filter(PersonInfo -> PersonInfo.getCity().equals(cityName)).count();\n\t\tlog.info(\"No of person in same city : \" + personByCity);\n\t\tlog.info(\"Enter the state name\");\n\t\tString stateName = obj.next();\n\t\tLong personByState = ContactList.stream().filter(PersonInfo -> PersonInfo.getState().equals(stateName)).count();\n\t\tlog.info(\"No of person in same state : \" + personByState);\n\t}", "public int count() {\n\t Query count = getEntityManager().createQuery(\"select count(u) from \" + getEntityClass().getSimpleName() + \" u\");\n\t return Integer.parseInt(count.getSingleResult().toString());\n\t }", "int getEducationsCount();", "int nParametricStates();", "public long count(Predicate<GameResult> filter) {\n return results.stream()\n .filter(filter)\n .mapToInt(GameResult::getCount)\n .sum();\n }", "public static final int numberOfState(String[] statuses) throws IllegalArgumentException\r\n {\r\n int[] statusNumbers = new int[statuses.length];\r\n for (int i = 0; i < statuses.length; i++)\r\n {\r\n statusNumbers[i] = numberOfProverStatus(i, statuses[i]);\r\n }\r\n return numberOfState(statusNumbers);\r\n }", "public static final int numberOfState(String[] statuses) throws IllegalArgumentException\r\n {\r\n int[] statusNumbers = new int[statuses.length];\r\n for (int i = 0; i < statuses.length; i++)\r\n {\r\n statusNumbers[i] = numberOfProverStatus(i, statuses[i]);\r\n }\r\n return numberOfState(statusNumbers);\r\n }", "int findAllCount() ;", "@Override\n public int countAll() {\n\n Query qry = this.em.createQuery(\n \"select count(assoc) \" +\n \"from WorkToSubjectEntity assoc\");\n\n return ((Long) qry.getSingleResult()).intValue();\n }", "int getInterestsCount();", "@IntRange(from = 0)\n public int getEntityCount() {\n return mEntityConfidence.getEntities().size();\n }", "long getOwnedEntryCount();", "private int getEducationalCount(){\n int count = 0;\n\n String whereClause = DbHelper.IS_EDUCATIONAL + \" = ?\";\n String[] whereArgs = new String[]{String.valueOf(true)};\n\n Cursor cursor = mDbHelper.getReadableDatabase().query(DbHelper.TABLE_NAME, null, whereClause, whereArgs, null, null, null);\n\n while(cursor.moveToNext()){\n count++;\n }\n\n return count;\n }", "public int getNumEntities()\n\t{\n\t\treturn this.entities.size();\n\t}", "final public int get_count(final EndpointID eid, int states, int actions) {\r\n\r\n\t\tint count = 0;\r\n\r\n\t\tlock_.lock();\r\n\t\tForwardingInfo info;\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < log_.size(); i++) {\r\n\t\t\t\tinfo = log_.get(i);\r\n\t\t\t\tif ((info.remote_eid() == EndpointIDPattern.WILDCARD_EID() || info\r\n\t\t\t\t\t\t.remote_eid().equals(eid))\r\n\t\t\t\t\t\t&& (info.state().getCode() & states) != 0\r\n\t\t\t\t\t\t&& (info.action().getCode() & actions) != 0) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getMyNumStates() { return myNumStates; }", "int getActAmountCount();", "long countNameIdNameByIdPerson(int idPerson);", "private int numberOfFieldsOccupiedByStoneColor(Color colorOfStonesToCount) {\n int counterOccupiedByStoneColor = 0;\n for (int i = 0; i < fields.length; i++) {\n for (int j = 0; j < fields.length; j++) {\n if (this.fields[i][j].isOccupiedByStone()) {\n if (this.fields[i][j].getStone().getColor() == colorOfStonesToCount)\n counterOccupiedByStoneColor++;\n }\n }\n }\n return counterOccupiedByStoneColor;\n }", "public long getPersonesCount()throws personNotFoundExeption{\n EntityManager em = emf.createEntityManager();\n try{\n long personesCount = (long)em.createQuery(\"SELECT COUNT(p) FROM Person p\").getSingleResult();\n return personesCount;\n }finally{ \n em.close();\n }\n }", "public int getStateValuesCount() {\n return stateValues_.size();\n }", "long getRecipesCount();", "private List<String> calculatePeoplePerState(List<Person> population)\n\t{\t\t\n\t\tList<String> output = population\n\t\t\t\t\t\t\t\t\t.stream()\n\t\t\t\t\t\t\t\t\t.collect(Collectors.groupingBy(Person::getState, Collectors.counting()))\n\t\t\t\t\t\t\t\t\t.entrySet().stream()\n\t\t\t\t\t\t\t\t\t.sorted( (s1,s2) -> {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Desc by Long, Asc by Key\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint r = -s1.getValue().compareTo(s2.getValue());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (r==0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//return 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn s1.getKey().compareTo(s2.getKey());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn r;\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t .map(map-> map.getKey() + \",\" + map.getValue())\n\t\t\t\t\t\t\t\t .collect(Collectors.toList());\n\t\treturn output;\n\t}", "@DISPID(2) //= 0x2. The runtime will prefer the VTID if present\n @VTID(8)\n int checkedOutEntitiesCount();", "@Override\n\tpublic int familycount() throws Exception {\n\t\treturn dao.familycount();\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic int getCount(List<Filter> filters){\r\n\t\ttry{\r\n\t\t\tString sql = \"select count(*) \"\r\n\t\t\t\t\t + \"from FmtEstado \";\r\n\t\t\t\r\n\t\t\tsql = sqlFunctions.completeSQL(null, filters, sql, FmtEstado.getColumnNames());\r\n\t\t\t\r\n\t\t\tQuery query = getSession().createQuery(sql);\r\n\t \r\n\t\t\t query=sqlFunctions.setParameters(filters, query);\r\n\t\t\t \r\n\t\t\tIterator it = query.list().iterator();\r\n\t Long ret = new Long(0);\r\n\t \r\n\t if (it != null)\r\n\t\t if (it.hasNext()){\r\n\t\t \tret = (Long) it.next();\r\n\t\t }\r\n\t \r\n\t\t\treturn ret.intValue();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic int GenderCount(String gender) {\n\t\tint count = 0;\r\n\t\tfor (Map.Entry<String, MemberBean> entry : map.entrySet()) {\r\n\t\t\tif(entry.getValue().getGender().equals(gender)){\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getStateValuesCount() {\n return stateValues_.size();\n }", "public int count() {\r\n Session session = getSession();\r\n Long count = new Long(0);\r\n try {\r\n count = (Long) session.createQuery(\"select count(t) from \" + getPersistentClass().getName() + \" t \").uniqueResult();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in count Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return count.intValue();\r\n }", "int getTotalCount();", "@Override\n public int getTotalDistanceEquivalentStateCount() {\n return this.totalDistanceEquivalentStateCount;\n }", "default int countItems(Predicate<ItemStack> filter) {\n return streamStacks().filter(filter).mapToInt(InvTools::sizeOf).sum();\n }", "int getAchievementsCount();", "long getJoinedEventsCount();", "long countWorkflows();", "public int countFamily() {\n\t\treturn count(GraphQueries.COUNT_FAMILY);\n\t}", "Integer countByExample(T entity);", "@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}", "int getUserQuestJobsCount();", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "public int getNumPersons() {\r\n\t\treturn this.persons.size();\r\n\t}", "int getParticipantsCount();", "int getParticipantsCount();", "public Flowable<Integer> counts() {\n return createFlowable(b.updateBuilder, db) //\n .flatMap(Tx.flattenToValuesOnly());\n }", "int getEntryCount();", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}", "int getLocationsCount();", "public CountReservation countS(){\n\t\t\treturn repositoryR.getStatus();\n\t\t}", "@Override\n\tpublic int numCubies () {\n\t\treturn state_.length;\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CAMPUS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public abstract long countByCountry(Country country);", "public abstract long countByCountry(Country country);", "int getAchieveInfoCount();", "private int getGoodsCount(GoodsType type) {\n return colony.getGoodsCount(type);\n }", "public int countByStatus(int status);", "long count(Specification<E> spec);", "@Override\r\n\tpublic int countAll() {\r\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\tFINDER_ARGS_EMPTY, this);\r\n\r\n\t\tif (count == null) {\r\n\t\t\tSession session = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsession = openSession();\r\n\r\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_SHARE);\r\n\r\n\t\t\t\tcount = (Long)q.uniqueResult();\r\n\r\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\r\n\t\t\t\t\tcount);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\t\tFINDER_ARGS_EMPTY);\r\n\r\n\t\t\t\tthrow processException(e);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcloseSession(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count.intValue();\r\n\t}", "int getAoisCount();", "int getBlockLocationsCount();", "public abstract long countByEmployee(Employee employee);", "int countAssociations();", "public int bobCount ();", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public abstract long countByRegion(Region region);", "public abstract long countByRegion(Region region);", "Long getAllCount();", "int getContactCount();", "public int count() {\n\t\t\tassert wellFormed() : \"invariant false on entry to count()\";\n\n\t\t\tint count = 0;\n\t\t\tfor(Card p = this.first; p != null; p = p.next) {\n\t\t\t\t++count;\n\t\t\t}\n\n\t\t\treturn count; // TODO\n\t\t}", "public int getNumberOfFieldsOccupiedByStone(Color stoneColor) {\n return numberOfFieldsOccupiedByStoneColor(stoneColor);\n }", "@SelectProvider(type=TCmSetChangeSiteStateSqlProvider.class, method=\"countBySpec\")\r\n int countBySpec(TCmSetChangeSiteStateSpec Spec);", "public String getCount() {\r\n \t\r\n \tBoolean anyAges = Boolean.FALSE;\r\n \tBoolean anyAssayTypes = Boolean.FALSE;\r\n \tint count = 0;\r\n \t\r\n \tfor (String age: ages) {\r\n \t\tif (age.endsWith(\"ANY\")) {\r\n \t\t\tanyAges = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \tfor (String type: assayTypes) {\r\n \t\tif (type.equals(\"ANY\")) {\r\n \t\t\tanyAssayTypes = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \t// No Restrictions on Ages or AssayTypes, count everything\r\n \tif (anyAssayTypes && anyAges) {\r\n \tcount = record.getPairs().size(); \t\t\r\n \t}\r\n \t\r\n \t// There are restrictions on ages only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAssayTypes) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String age: ages) {\r\n \t\t\t\tif (pair.getAge().equals(age)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t// There are restrictions on assayTypes only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAges) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tif (pair.getAssayType().equals(type)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \telse {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tfor (String age: ages) {\r\n \t\t\t\t\tif (pair.getAssayType().equals(type) && pair.getAge().equals(age)) {\r\n \t\t\t\t\t\tcount ++;\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}\r\n\r\n \treturn \"\" + count;\r\n \t\r\n }", "@Override\n public long count() {\n return super.doCountAll();\n }" ]
[ "0.6891237", "0.67355365", "0.6685644", "0.6556195", "0.6490678", "0.6455971", "0.6392802", "0.63403845", "0.63129306", "0.62748253", "0.62421185", "0.6222463", "0.6217124", "0.6176982", "0.61528", "0.6025941", "0.5992636", "0.58741605", "0.5863789", "0.5831669", "0.57967925", "0.5785712", "0.57821095", "0.5781196", "0.5781196", "0.57573146", "0.5745344", "0.57322013", "0.5714393", "0.56994385", "0.568661", "0.56645787", "0.5661879", "0.5661069", "0.56576335", "0.56364185", "0.5616909", "0.560747", "0.56041723", "0.5594422", "0.5583491", "0.55787", "0.5577498", "0.5571733", "0.5562675", "0.5546566", "0.5526342", "0.55157936", "0.5496336", "0.54963017", "0.5474403", "0.54724896", "0.54708016", "0.5464389", "0.5452903", "0.5446118", "0.5444544", "0.5444115", "0.5441889", "0.5439397", "0.5438661", "0.5432041", "0.5424393", "0.54196197", "0.54021263", "0.54017687", "0.5400571", "0.53994876", "0.53994876", "0.53950727", "0.53887874", "0.5387301", "0.53849083", "0.53834987", "0.53824306", "0.53763324", "0.53749776", "0.53749776", "0.53699255", "0.5367371", "0.53650105", "0.53588486", "0.5358214", "0.53573406", "0.5356077", "0.535445", "0.5350354", "0.5347892", "0.534699", "0.534699", "0.534699", "0.5346483", "0.5346483", "0.53440076", "0.5343946", "0.53375256", "0.53335434", "0.53334826", "0.53247386", "0.5320127" ]
0.7219543
0
Counts the total number of people in a certain state for a given Spreadable. An entity will only ever be in one state per spreadable.
int count(State state, Spreadable spreadable);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int count_nbr_in_state ( int state )\r\n {\r\n OSPF_Interface oif;\r\n int count = 0;\r\n int i, j; \r\n int if_no, nbr_no;\r\n \r\n if_no = if_list.size();\r\n for ( i = 0; i < if_no; i++) {\r\n oif = (OSPF_Interface) if_list.elementAt(i);\r\n nbr_no = oif.neighbor_list.size();\r\n for ( j = 0; j < nbr_no; j++) {\r\n OSPF_Neighbor nbr = (OSPF_Neighbor) oif.neighbor_list.elementAt(j);\r\n if (nbr.state == state)\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "int count(State state);", "int countObjectFlowStates();", "private int calcNumParticlesInState(byte state){\n //use bitwise operators to determine the number of particles in the incomingState\n int count = 0;\n for(int n = 0; n < SMASKS.length; n++){\n if((state & SMASKS[n]) == SMASKS[n]){\n count++;\n }\n }\n return count;\n }", "public int numberOfStates();", "int getStateValuesCount();", "protected abstract int numStates();", "public Integer excerciseStateCount(Activity activity, ExerciseState state);", "public CountReservation countS(){\n\t\t\treturn repositoryR.getStatus();\n\t\t}", "public int numStates();", "public abstract int numStates();", "public int countPerson() {\n\t\treturn count(GraphQueries.COUNT_PERSON);\n\t}", "public int getNumberOfFieldsOccupiedByStone(Color stoneColor) {\n return numberOfFieldsOccupiedByStoneColor(stoneColor);\n }", "int getInterestsCount();", "public long count(Predicate<GameResult> filter) {\n return results.stream()\n .filter(filter)\n .mapToInt(GameResult::getCount)\n .sum();\n }", "int getPersonInfoCount();", "private int numberOfFieldsOccupiedByStoneColor(Color colorOfStonesToCount) {\n int counterOccupiedByStoneColor = 0;\n for (int i = 0; i < fields.length; i++) {\n for (int j = 0; j < fields.length; j++) {\n if (this.fields[i][j].isOccupiedByStone()) {\n if (this.fields[i][j].getStone().getColor() == colorOfStonesToCount)\n counterOccupiedByStoneColor++;\n }\n }\n }\n return counterOccupiedByStoneColor;\n }", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public int beanBagsInStock() {\n int counter = 0;\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the current beanBag in the \"stockList\" sold state boolean is true.\r\n if (!((BeanBag) stockList.get(i)).isSold()) {\r\n // Increment the \"counter\" integer by 1.\r\n counter++;\r\n }\r\n }\r\n // Return the value of the \"counter\" integer.\r\n return counter;\r\n }", "long getOwnedEntryCount();", "int getSeenInfoCount();", "int getStudentCount();", "public int count() {\n\t\t\tassert wellFormed() : \"invariant false on entry to count()\";\n\n\t\t\tint count = 0;\n\t\t\tfor(Card p = this.first; p != null; p = p.next) {\n\t\t\t\t++count;\n\t\t\t}\n\n\t\t\treturn count; // TODO\n\t\t}", "int getNumberOfStonesLeftToPlace();", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "Map<StateT, Map<ConditionT, Long>> getNumExecutions();", "static public int numberOfPersons() {\n return personMap.size();\n }", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}", "@Override\n\tpublic int listCount(SearchCriteria scri) throws Exception {\n\t\treturn dao.listCount(scri);\n\t}", "public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public int stoneCount(int bin)\n {\n \treturn state[bin];\n }", "public static final int numberOfState(String[] statuses) throws IllegalArgumentException\r\n {\r\n int[] statusNumbers = new int[statuses.length];\r\n for (int i = 0; i < statuses.length; i++)\r\n {\r\n statusNumbers[i] = numberOfProverStatus(i, statuses[i]);\r\n }\r\n return numberOfState(statusNumbers);\r\n }", "public static final int numberOfState(String[] statuses) throws IllegalArgumentException\r\n {\r\n int[] statusNumbers = new int[statuses.length];\r\n for (int i = 0; i < statuses.length; i++)\r\n {\r\n statusNumbers[i] = numberOfProverStatus(i, statuses[i]);\r\n }\r\n return numberOfState(statusNumbers);\r\n }", "public int getStoneCount()\n {\n return stoneCount;\n }", "public Integer getAllShelfCount(String filter, String username);", "int getScoresCount();", "public abstract long countByShipper(Shipper shipper);", "public abstract long countByShipper(Shipper shipper);", "int getAoisCount();", "public int countByExample(StateExample example) {\n Integer count = (Integer) getSqlMapClientTemplate().queryForObject(\"lgk_state.abatorgenerated_countByExample\", example);\n return count;\n }", "int getStudentResponseCount();", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_LOCALRICHINFO);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int getMyNumStates() { return myNumStates; }", "@Override\n\tpublic int countByDrafts(String isDraft) throws SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_DRAFTS;\n\n\t\tObject[] finderArgs = new Object[] { isDraft };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_LMSLEAVEINFORMATION_WHERE);\n\n\t\t\tboolean bindIsDraft = false;\n\n\t\t\tif (isDraft == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_DRAFTS_ISDRAFT_1);\n\t\t\t}\n\t\t\telse if (isDraft.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_DRAFTS_ISDRAFT_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindIsDraft = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_DRAFTS_ISDRAFT_2);\n\t\t\t}\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tif (bindIsDraft) {\n\t\t\t\t\tqPos.add(isDraft);\n\t\t\t\t}\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int getNumberOfSoldBeanBags() {\n int counter = 0;\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the ID in the stockList matches the passed parameter ID\r\n if (((BeanBag) stockList.get(i)).isSold()) {\r\n // Increment the \"counter\" integer by 1.\r\n counter++;\r\n }\r\n }\r\n // Return the value of the \"counter\" integer.\r\n return counter;\r\n }", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "private List<String> calculatePeoplePerState(List<Person> population)\n\t{\t\t\n\t\tList<String> output = population\n\t\t\t\t\t\t\t\t\t.stream()\n\t\t\t\t\t\t\t\t\t.collect(Collectors.groupingBy(Person::getState, Collectors.counting()))\n\t\t\t\t\t\t\t\t\t.entrySet().stream()\n\t\t\t\t\t\t\t\t\t.sorted( (s1,s2) -> {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Desc by Long, Asc by Key\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint r = -s1.getValue().compareTo(s2.getValue());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (r==0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//return 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn s1.getKey().compareTo(s2.getKey());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn r;\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t .map(map-> map.getKey() + \",\" + map.getValue())\n\t\t\t\t\t\t\t\t .collect(Collectors.toList());\n\t\treturn output;\n\t}", "public void can_counter()\n {\n candidate_count=0;\n for (HashMap.Entry<String,Candidate> set : allCandidates.entrySet())\n {\n candidate_count++;\n }\n }", "studentCounter( int numStudentAlreadyInTheRoom ){ \n\t\tnumStudentInRoom = numStudentAlreadyInTheRoom ;\n\t}", "public int getTotalSPEntries() {\n\t\tList<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\treturn list.size();\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic int getCount(List<Filter> filters){\r\n\t\ttry{\r\n\t\t\tString sql = \"select count(*) \"\r\n\t\t\t\t\t + \"from FmtEstado \";\r\n\t\t\t\r\n\t\t\tsql = sqlFunctions.completeSQL(null, filters, sql, FmtEstado.getColumnNames());\r\n\t\t\t\r\n\t\t\tQuery query = getSession().createQuery(sql);\r\n\t \r\n\t\t\t query=sqlFunctions.setParameters(filters, query);\r\n\t\t\t \r\n\t\t\tIterator it = query.list().iterator();\r\n\t Long ret = new Long(0);\r\n\t \r\n\t if (it != null)\r\n\t\t if (it.hasNext()){\r\n\t\t \tret = (Long) it.next();\r\n\t\t }\r\n\t \r\n\t\t\treturn ret.intValue();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "int getEducationsCount();", "final public int get_count(int states, int actions) {\r\n\t\tint count = 0;\r\n\r\n\t\tlock_.lock();\r\n\r\n\t\ttry {\r\n\t\t\tBPF.getInstance().getBPFLogger().debug(TAG, \"Log size: \" + log_.size());\r\n\r\n\t\t\tfor (int i = 0; i < log_.size(); i++) {\r\n\r\n\t\t\t\tif ((log_.get(i).state().getCode() & states) != 0\r\n\t\t\t\t\t\t&& (log_.get(i).action().getCode() & actions) != 0) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "int findAllCount() ;", "default int countItems(Predicate<ItemStack> filter) {\n return streamStacks().filter(filter).mapToInt(InvTools::sizeOf).sum();\n }", "public int countFamily() {\n\t\treturn count(GraphQueries.COUNT_FAMILY);\n\t}", "static int NumberOfThisRaceNames(HackSackFrame oParent,\n String sRace,boolean bMale, boolean bFemale,\n boolean bLast)\n {\n int nCount = 0;\n\n for (int i=0;i<oParent.lRandomNames.size();i++)\n {\n TableRandomName oR = (TableRandomName)oParent.lRandomNames.get(i);\n if (sRace.equalsIgnoreCase(oR.sRace) && (bLast == oR.bLast) &&\n ( (bMale && oR.bMale) ||\n (bFemale && oR.bFemale) ) )\n nCount++;\n }\n return nCount;\n }", "@Override\r\n\tpublic int countAll() {\r\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\tFINDER_ARGS_EMPTY, this);\r\n\r\n\t\tif (count == null) {\r\n\t\t\tSession session = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsession = openSession();\r\n\r\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_SHARE);\r\n\r\n\t\t\t\tcount = (Long)q.uniqueResult();\r\n\r\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\r\n\t\t\t\t\tcount);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\t\tFINDER_ARGS_EMPTY);\r\n\r\n\t\t\t\tthrow processException(e);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcloseSession(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count.intValue();\r\n\t}", "default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }", "long getNumExecutionsByTransition(StateT state, ConditionT condition);", "int getFundsCount();", "int getFundsCount();", "int getNumberOfStonesOnBoard();", "@Override\r\n\tpublic int list_count(SearchCriteria scri) throws Exception {\n\t\treturn sql.selectOne(\"cms_board.list_count\", scri);\r\n\t}", "public Flowable<Integer> counts() {\n return createFlowable(b.updateBuilder, db) //\n .flatMap(Tx.flattenToValuesOnly());\n }", "public static int countPearls(List<Boolean> oysters) {\n\t\tint pearlCount = 0;\n\t\tfor (int i = 0; i < oysters.size(); i++) {\n\t\t\tif (oysters.get(i) == true) {\n\t\t\t\tpearlCount = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn pearlCount;\n\t\t\n\n\t}", "@Override\n\tpublic int selectCount(Object ob) {\n\t\t\n\t\tint res = session.selectOne(\"party.party_list_total_count\",ob);\n\t\t\n\t\treturn res;\n\t}", "@Override\r\n public Integer oneObligorClassCount(OneObligorSC oneObligorSC) throws DAOException\r\n {\r\n\tDAOHelper.fixGridMaps(oneObligorSC, getSqlMap(), \"oneObligorMapper.oneObligorClassMap\");\r\n\treturn (Integer) getSqlMap().queryForObject(\"oneObligorMapper.oneObligorClassCount\", oneObligorSC);\r\n }", "public void getCountByCityByState(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name whose contacts you want to see in sorted order by zip code\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tlog.info(\"Enter the city name\");\n\t\tString cityName = obj.next();\n\t\tLong personByCity = ContactList.stream().filter(PersonInfo -> PersonInfo.getCity().equals(cityName)).count();\n\t\tlog.info(\"No of person in same city : \" + personByCity);\n\t\tlog.info(\"Enter the state name\");\n\t\tString stateName = obj.next();\n\t\tLong personByState = ContactList.stream().filter(PersonInfo -> PersonInfo.getState().equals(stateName)).count();\n\t\tlog.info(\"No of person in same state : \" + personByState);\n\t}", "int getInCount();", "default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }", "public int getSnInfoCount() {\n if (snInfoBuilder_ == null) {\n return snInfo_.size();\n } else {\n return snInfoBuilder_.getCount();\n }\n }", "public int getSnInfoCount() {\n if (snInfoBuilder_ == null) {\n return snInfo_.size();\n } else {\n return snInfoBuilder_.getCount();\n }\n }", "public int getSnInfoCount() {\n if (snInfoBuilder_ == null) {\n return snInfo_.size();\n } else {\n return snInfoBuilder_.getCount();\n }\n }", "int getParticipantsCount();", "int getParticipantsCount();", "public static long countPearls(List<Boolean> oysters) {\n\t\treturn 0;\n\t}", "public static int countPearls(List<Boolean> oysters) {\n\tint pearls = 0;\n\t\tfor (int i = 0; i < oysters.size(); i++) {\n\t\t\tif (oysters.get(i)==true) {\n\t\t\t\tpearls = pearls +1;\n\t\t\t\t\n\t\t\t\t//return pearls;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn pearls;\n\t}", "@Override\r\n\tpublic int memberCount() {\n\t\treturn sqlSession.selectOne(NAMESPACE + \".member_count_user\");\r\n\t}", "public Integer getScannedCount() {\n return this.scannedCount;\n }", "public abstract long count();", "int getCountOfFemaleUsers(List<User> users);", "int getTotalCount();", "public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CAMPUS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int count() {\n\t\treturn count;\n\t}", "@Override\n\tpublic int numCubies () {\n\t\treturn state_.length;\n\t}", "int getFaintedPokemonCount();", "public int count(String st) {\n\t\tboolean ans = Search(st);\n\t\tif (ans) {\n\t\t\tint stIndex = table[hashFunction(st,m)].indexOf(st);\n\t\t\tint count = table[hashFunction(st,m)].get(stIndex).GetCount();\n\t\t\treturn count;\n\n\t\t} else\n\t\t\treturn 0;\n\t}", "public void countCoins() {\r\n\t\tthis.coinCount = 0;\r\n\t\tfor (int x = 0; x < WIDTH; x++) {\r\n\t\t\tfor (int y = 0; y < HEIGHT; y++) {\r\n\t\t\t\tif (this.accessType(x, y) == 'C')\r\n\t\t\t\t\tthis.coinCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int count() {\r\n Session session = getSession();\r\n Long count = new Long(0);\r\n try {\r\n count = (Long) session.createQuery(\"select count(t) from \" + getPersistentClass().getName() + \" t \").uniqueResult();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in count Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return count.intValue();\r\n }", "@Override\r\n\tpublic int GenderCount(String gender) {\n\t\tint count = 0;\r\n\t\tfor (Map.Entry<String, MemberBean> entry : map.entrySet()) {\r\n\t\t\tif(entry.getValue().getGender().equals(gender)){\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_PAPER);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "boolean hasCount();", "private int getEducationalCount(){\n int count = 0;\n\n String whereClause = DbHelper.IS_EDUCATIONAL + \" = ?\";\n String[] whereArgs = new String[]{String.valueOf(true)};\n\n Cursor cursor = mDbHelper.getReadableDatabase().query(DbHelper.TABLE_NAME, null, whereClause, whereArgs, null, null, null);\n\n while(cursor.moveToNext()){\n count++;\n }\n\n return count;\n }", "int countByExample(UploadStateRegDTOExample example);" ]
[ "0.6792315", "0.65086657", "0.62461555", "0.6027493", "0.6002862", "0.5930876", "0.58364487", "0.57993054", "0.57760084", "0.5691802", "0.5670315", "0.5617302", "0.55777407", "0.5576855", "0.5560659", "0.55438876", "0.5492589", "0.54810965", "0.54810965", "0.54810965", "0.547565", "0.54586655", "0.5425325", "0.5414367", "0.5412468", "0.53755206", "0.53570014", "0.53570014", "0.53570014", "0.535652", "0.5346462", "0.53402346", "0.5333837", "0.5321458", "0.5315952", "0.53121483", "0.53098714", "0.5309416", "0.5295973", "0.52952826", "0.5295018", "0.5295018", "0.52942306", "0.5288055", "0.52806926", "0.5267756", "0.52668893", "0.5266512", "0.52633417", "0.52454644", "0.5239058", "0.5231029", "0.52303135", "0.52264845", "0.52049255", "0.52039176", "0.5200147", "0.5190806", "0.51881164", "0.5182492", "0.51742256", "0.51679295", "0.5167828", "0.5163417", "0.5148441", "0.5148441", "0.5147881", "0.51382655", "0.5133062", "0.5132066", "0.5125776", "0.5123566", "0.51217836", "0.51204675", "0.511928", "0.5116802", "0.5116802", "0.5116802", "0.51078975", "0.51078975", "0.51052684", "0.51043683", "0.5097428", "0.50948304", "0.5092414", "0.50913626", "0.50885797", "0.5085442", "0.50842726", "0.5083702", "0.50820273", "0.50749415", "0.507382", "0.50715286", "0.506821", "0.5064224", "0.506166", "0.50598854", "0.50586903", "0.5057919" ]
0.77042574
0
Try to change entities from one state to another. If there aren't enough entities with the old state, then only that many will be changed to the new state.
void changeState(Spreadable spreadable, State from, State to, int count);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final protected void setEntityState(int newState)\n {\n state = newState;\n }", "public final void setEntityState(EntityState state) {\n for (int i = fVSs.size()-1; i >= 0; i--) {\n ((ValidationState)fVSs.get(i)).setEntityState(state);\n }\n }", "private void updateState(ExecutionEntity entity, TaskState state) {\r\n\t\tupdateStateRecursive(elements, entity, state);\r\n\t}", "protected void setState( EntityState newState ) throws BusinessException\n\t{\n\t\t/* Invariant check */\n\t\tif( newState.equals( this.state ) )\n\t\t\tthrow new ActualStateException( );\n\t\t\n\t\t/* Set the state before the observers update */\n\t\tthis.state = newState;\n\t\t\n\t\t/* Notify the observers */\n\t\tHashMap< EntityState, StateEventsFactory > eventFactories = getEventFactories( );\n\t\tStateEventsFactory stateFactory = eventFactories.get( newState );\n\t\ttry\n\t\t{\n\t\t\tArrayList< DomainEvent > events = stateFactory.getEventsFor( newState, FacturaElectronica2DTO.map( this ) );\n\t\t\tnotifyObservers( events );\n\t\t}\n\t\tcatch ( ObserverUpdateFailed e ) \n\t\t{\n\t\t\te.printStackTrace( );\n\t\t\tArrayList< DomainEvent > failoverEvents = stateFactory.getFailoverEventsFor( newState, FacturaElectronica2DTO.map( this ) );\n\t\t\tnotifyObservers( failoverEvents );\n\t\t}\n\t}", "@Internal\n\tpublic static <T> Map<String, State<T>> migrateGraph(State<T> oldStartState) {\n\t\tState<T> oldFirst = oldStartState;\n\t\tState<T> oldSecond = oldStartState.getStateTransitions().iterator().next().getTargetState();\n\n\t\tStateTransition<T> oldFirstToSecondTake = Iterators.find(\n\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\tStateTransition<T> oldFirstIgnore = Iterators.find(\n\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.IGNORE;\n\t\t\t\t}\n\n\t\t\t}, null);\n\n\t\tStateTransition<T> oldSecondToThirdTake = Iterators.find(\n\t\t\toldSecond.getStateTransitions().iterator(),\n\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t}\n\n\t\t\t}, null);\n\n\t\tfinal Map<String, State<T>> convertedStates = new HashMap<>();\n\t\tState<T> newSecond;\n\t\tState<T> newFirst = new State<>(oldSecond.getName(), State.StateType.Start);\n\t\tconvertedStates.put(newFirst.getName(), newFirst);\n\t\twhile (oldSecondToThirdTake != null) {\n\n\t\t\tnewSecond = new State<T>(oldSecondToThirdTake.getTargetState().getName(), State.StateType.Normal);\n\t\t\tconvertedStates.put(newSecond.getName(), newSecond);\n\t\t\tnewFirst.addTake(newSecond, oldFirstToSecondTake.getCondition());\n\n\t\t\tif (oldFirstIgnore != null) {\n\t\t\t\tnewFirst.addIgnore(oldFirstIgnore.getCondition());\n\t\t\t}\n\n\t\t\toldFirst = oldSecond;\n\n\t\t\toldFirstToSecondTake = Iterators.find(\n\t\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\t\toldFirstIgnore = Iterators.find(\n\t\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.IGNORE;\n\t\t\t\t\t}\n\n\t\t\t\t}, null);\n\n\t\t\toldSecond = oldSecondToThirdTake.getTargetState();\n\n\t\t\toldSecondToThirdTake = Iterators.find(\n\t\t\t\toldSecond.getStateTransitions().iterator(),\n\t\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t\t}\n\n\t\t\t\t}, null);\n\n\t\t\tnewFirst = newSecond;\n\t\t}\n\n\t\tfinal State<T> endingState = new State<>(ENDING_STATE_NAME, State.StateType.Final);\n\n\t\tnewFirst.addTake(endingState, oldFirstToSecondTake.getCondition());\n\n\t\tif (oldFirstIgnore != null) {\n\t\t\tnewFirst.addIgnore(oldFirstIgnore.getCondition());\n\t\t}\n\n\t\tconvertedStates.put(endingState.getName(), endingState);\n\n\t\treturn convertedStates;\n\t}", "private void generateBidirectionalCollectionChangeWorkUnits(AuditSync verSync, EntityPersister entityPersister,\n String entityName, Object[] newState, Object[] oldState,\n SessionImplementor session) {\n if (!verCfg.getGlobalCfg().isGenerateRevisionsForCollections()) {\n return;\n }\n \n // Checks every property of the entity, if it is an \"owned\" to-one relation to another entity.\n // If the value of that property changed, and the relation is bi-directional, a new revision\n // for the related entity is generated.\n String[] propertyNames = entityPersister.getPropertyNames();\n \n for (int i=0; i<propertyNames.length; i++) {\n String propertyName = propertyNames[i];\n RelationDescription relDesc = verCfg.getEntCfg().getRelationDescription(entityName, propertyName);\n if (relDesc != null && relDesc.isBidirectional() && relDesc.getRelationType() == RelationType.TO_ONE) {\n // Checking for changes\n Object oldValue = oldState == null ? null : oldState[i];\n Object newValue = newState == null ? null : newState[i];\n \n if (!Tools.entitiesEqual(session, oldValue, newValue)) {\n // We have to generate changes both in the old collection (size decreses) and new collection\n // (size increases).\n if (newValue != null) {\n // relDesc.getToEntityName() doesn't always return the entity name of the value - in case\n // of subclasses, this will be root class, no the actual class. So it can't be used here.\n String toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n if (newValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) newValue;\n \t toEntityName = session.bestGuessEntityName(newValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object from the proxy to later read its state. \n \t\t\t\t\t\t\tnewValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(newValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \tid = (Serializable) idMapper.mapToIdFromEntity(newValue);\n \t}\n \n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, newValue));\n }\n \n if (oldValue != null) {\n \tString toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n \tif(oldValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) oldValue;\n \t toEntityName = session.bestGuessEntityName(oldValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object as we'll read it's state anyway.\n \t\t\t\t\t\t\toldValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(oldValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \t\t\t\t\t\t\tid = (Serializable) idMapper.mapToIdFromEntity(oldValue);\n \t}\n \t\t\t\t\t\t\n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, oldValue));\n }\n }\n }\n }\n }", "private void updateAccPoolState() {\n List<AionAddress> clearAddr = new ArrayList<>();\n for (Entry<AionAddress, AccountState> e : this.accountView.entrySet()) {\n AccountState as = e.getValue();\n if (as.isDirty()) {\n\n if (as.getMap().isEmpty()) {\n this.poolStateView.remove(e.getKey());\n clearAddr.add(e.getKey());\n } else {\n // checking AccountState given by account\n List<PoolState> psl = this.poolStateView.get(e.getKey());\n if (psl == null) {\n psl = new LinkedList<>();\n }\n\n List<PoolState> newPoolState = new LinkedList<>();\n // Checking new tx has been include into old pools.\n BigInteger txNonceStart = as.getFirstNonce();\n\n if (txNonceStart != null) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState fn [{}]\",\n txNonceStart.toString());\n }\n for (PoolState ps : psl) {\n // check the previous txn status in the old\n // PoolState\n if (isClean(ps, as)\n && ps.firstNonce.equals(txNonceStart)\n && ps.combo == seqTxCountMax) {\n ps.resetInFeePool();\n newPoolState.add(ps);\n\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState add fn [{}]\",\n ps.firstNonce.toString());\n }\n\n txNonceStart = txNonceStart.add(BigInteger.valueOf(seqTxCountMax));\n } else {\n // remove old poolState in the feeMap\n if (this.feeView.get(ps.getFee()) != null) {\n\n if (e.getValue().getMap().get(ps.firstNonce) != null) {\n this.feeView\n .get(ps.getFee())\n .remove(\n e.getValue()\n .getMap()\n .get(ps.firstNonce)\n .getKey());\n }\n\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState remove fn [{}]\",\n ps.firstNonce.toString());\n }\n\n if (this.feeView.get(ps.getFee()).isEmpty()) {\n this.feeView.remove(ps.getFee());\n }\n }\n }\n }\n }\n\n int cnt = 0;\n BigInteger fee = BigInteger.ZERO;\n BigInteger totalFee = BigInteger.ZERO;\n\n for (Entry<BigInteger, SimpleEntry<ByteArrayWrapper, BigInteger>> en :\n as.getMap().entrySet()) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState mapsize[{}] nonce:[{}] cnt[{}] txNonceStart[{}]\",\n as.getMap().size(),\n en.getKey().toString(),\n cnt,\n txNonceStart != null ? txNonceStart.toString() : null);\n }\n if (en.getKey()\n .equals(\n txNonceStart != null\n ? txNonceStart.add(BigInteger.valueOf(cnt))\n : null)) {\n if (en.getValue().getValue().compareTo(fee) > -1) {\n fee = en.getValue().getValue();\n totalFee = totalFee.add(fee);\n\n if (++cnt == seqTxCountMax) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState case1 - nonce:[{}] totalFee:[{}] cnt:[{}]\",\n txNonceStart,\n totalFee.toString(),\n cnt);\n }\n newPoolState.add(\n new PoolState(\n txNonceStart,\n totalFee.divide(BigInteger.valueOf(cnt)),\n cnt));\n\n txNonceStart = en.getKey().add(BigInteger.ONE);\n totalFee = BigInteger.ZERO;\n fee = BigInteger.ZERO;\n cnt = 0;\n }\n } else {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState case2 - nonce:[{}] totalFee:[{}] cnt:[{}]\",\n txNonceStart,\n totalFee.toString(),\n cnt);\n }\n newPoolState.add(\n new PoolState(\n txNonceStart,\n totalFee.divide(BigInteger.valueOf(cnt)),\n cnt));\n\n // next PoolState\n txNonceStart = en.getKey();\n fee = en.getValue().getValue();\n totalFee = fee;\n cnt = 1;\n }\n }\n }\n\n if (totalFee.signum() == 1) {\n\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState case3 - nonce:[{}] totalFee:[{}] cnt:[{}] bw:[{}]\",\n txNonceStart,\n totalFee.toString(),\n cnt,\n e.getKey().toString());\n }\n\n newPoolState.add(\n new PoolState(\n txNonceStart,\n totalFee.divide(BigInteger.valueOf(cnt)),\n cnt));\n }\n\n this.poolStateView.put(e.getKey(), newPoolState);\n\n if (LOG.isTraceEnabled()) {\n this.poolStateView.forEach(\n (k, v) ->\n v.forEach(\n l -> {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState - the first nonce of the poolState list:[{}]\",\n l.firstNonce);\n }));\n }\n as.sorted();\n }\n }\n }\n\n if (!clearAddr.isEmpty()) {\n clearAddr.forEach(\n addr -> {\n lock.writeLock().lock();\n this.accountView.remove(addr);\n lock.writeLock().unlock();\n this.bestNonce.remove(addr);\n });\n }\n }", "private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n // empty job set -> going to IDLE state\n if (jobs.size() == 0) {\n this.currentState = IDLE;\n return;\n }\n\n Integer closestFloorDownwards = jobs.floor(this.currentFloor);\n Integer closestFloorUpwards = jobs.ceiling(this.currentFloor);\n\n switch (this.currentState) {\n // if elevator is in idle state then we need to go to the closest job possible\n case IDLE -> {\n Integer closestFloor =\n findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards);\n\n if (closestFloor < this.currentFloor) {\n this.currentState = DOWN;\n } else {\n this.currentState = UP;\n }\n }\n case DOWN -> {\n if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs`\n this.currentState = DOWN; // let's continue going down\n } else {\n this.currentState = UP; // otherwise we need to go up\n }\n }\n case UP -> {\n if (closestFloorUpwards != null) { // if there exists a successor in `jobs`\n this.currentState = UP; // let's continue going up\n } else {\n this.currentState = DOWN; // otherwise we need to go down\n }\n }\n }\n }", "private void updateArtifactState(ArrayList<TransitionRule> transitionRules , ArrayList<ArtifactInstance> Artifacts)\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\tListIterator<TransitionRule> TrasitionIterator = transitionRules.listIterator();\r\n\t\t\r\n\t\t//System.out.println(\"size of transition Rule:\" + transitionRules.size());\r\n\t\t\r\n\t\twhile(TrasitionIterator.hasNext())\r\n\t\t{\r\n\t\t\tTransitionRule currentTransitionRule = TrasitionIterator.next();\r\n\t\t\tString targetArtifact = currentTransitionRule.getArtifact();\r\n\t\t\tString fromState = currentTransitionRule.getFromState();\r\n\t\t\tString toState = currentTransitionRule.getToState();\r\n\t\t\t\r\n\t\t\t//System.out.println(targetArtifact);\r\n\t\t\t//System.out.println(fromState);\r\n\t\t\t//System.out.println(toState);\r\n\t\t\t\r\n\t\t\tListIterator<ArtifactInstance> ArtifactIterator = Artifacts.listIterator();\r\n\t\t\t\r\n\t\t\twhile(ArtifactIterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tArtifactInstance CurrentArtifact = ArtifactIterator.next();\r\n\t\t\t\tString ArtifactName = CurrentArtifact.getArtifactName();\r\n\t\t\t//\tSystem.out.println(ArtifactName);\r\n\t\t\t\tString CurrentArtifactState = CurrentArtifact.getCurrentState();\r\n\t\t\t\tArrayList<StateInstance> StateList = CurrentArtifact.getStateList();\r\n\t\t\t\t\r\n\t\t\t // to be continue state transiton\r\n\t\t\t\tif(ArtifactName.equalsIgnoreCase(targetArtifact) && CurrentArtifactState.equalsIgnoreCase(fromState) ) //&& this.checkState(StateList, fromState, toState)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tCurrentArtifact.setCurrentState(toState);\r\n\t\t\t\t\t//System.out.println(CurrentArtifact.getArtifactName()+\":\"+CurrentArtifact.getCurrentState());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void changeState(VehicleState newState) throws ServiceException {\n\t\t\n\t}", "protected SpacecraftState updateUnmanagedStates(final SpacecraftState original) {\n\n // start with original state,\n // which may already contain additional states, for example in interpolated ephemerides\n SpacecraftState updated = original;\n\n // update the states not managed by providers\n for (final Map.Entry<String, TimeSpanMap<double[]>> entry : unmanagedStates.entrySet()) {\n updated = updated.addAdditionalState(entry.getKey(),\n entry.getValue().get(original.getDate()));\n }\n\n return updated;\n\n }", "private void mergeStates() {\n ArrayList<DFAState> newStates = new ArrayList<DFAState>();\r\n HashSet<Integer> newAcceptStates = new HashSet<Integer>();\r\n HashMap<Integer, Integer> merged = new HashMap<Integer, Integer>();\r\n ArrayList<ArrayList<Integer>> mergeGroups = new ArrayList<ArrayList<Integer>>();\r\n for (int i = 0; i < D.length; i++) {\r\n if (merged.get(i) != null || states[i] == null) {\r\n continue;\r\n }\r\n\r\n DFAState state = states[i];\r\n\r\n ArrayList<Integer> toMerge = new ArrayList<Integer>();\r\n for (int j = i + 1; j < D.length; j++) {\r\n if (!D[i][j]) {\r\n toMerge.add(j);\r\n merged.put(j, i);\r\n }\r\n }\r\n\r\n // renumber existing transitions\r\n for (int j = 0; j < state.transitions.size(); j++) {\r\n Integer transition = state.transitions.get(j);\r\n if (merged.containsKey(transition)) {\r\n state.transitions.set(j, merged.get(transition));\r\n }\r\n }\r\n\r\n if (acceptStates.contains(i)) {\r\n newAcceptStates.add(i);\r\n }\r\n toMerge.add(i);\r\n mergeGroups.add(toMerge);\r\n newStates.add(state);\r\n }\r\n\r\n renumberStates(mergeGroups, newAcceptStates);\r\n\r\n // replace attributes\r\n DFAState[] newStatesArray = new DFAState[newStates.size()];\r\n newStatesArray = newStates.toArray(newStatesArray);\r\n states = newStatesArray;\r\n acceptStates = newAcceptStates;\r\n }", "@Override\n\tpublic void update(Estado es) {\n\t\tEntityManager em = this.emf.createEntityManager();\n\t\ttry {\n\t\t\tEstado origen = em.find(Estado.class, es.getId());\n\t\t\torigen.setEstado(es.getEstado());\n\t\t\t\n\t\t\tem.merge(origen);\n\t\t\tem.flush();\n\t\t} catch(Exception e) {\n\t\t\t\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}", "protected abstract int newState();", "private ScanState switchState(ScanState desired,EnumSet<ScanState> allowed) {\n final ScanState old;\n final long timestamp;\n final long sequence;\n synchronized(this) {\n old = state;\n if (!allowed.contains(state))\n throw new IllegalStateException(state.toString());\n state = desired;\n timestamp = System.currentTimeMillis();\n sequence = getNextSeqNumber();\n }\n LOG.fine(\"switched state: \"+old+\" -> \"+desired);\n if (old != desired)\n queueStateChangedNotification(sequence,timestamp,old,desired);\n return old;\n }", "public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }", "public void alterState(SimulationState currentState) {\r\n int size = states.size();\r\n states.removeIf(state -> state.getFrameNumber() >= currentState.getFrameNumber());\r\n alteredStates.removeIf(num -> num >= currentState.getFrameNumber());\r\n alteredStates.add(currentState.getFrameNumber());\r\n states.add(currentState.getFrameNumber(), currentState);\r\n for (int i = states.size(); i < size; i++) {\r\n nextState();\r\n }\r\n }", "void stateChanged( final GameState oldState, final GameState newState );", "public void optimize(){\n\n NfaState currState;\n HashMap<Integer, State> statesCloned = (HashMap)states.clone();\n\n\n boolean removed;\n\n for(Map.Entry<Integer, State> entry : statesCloned.entrySet()) {//for each state of the nfa\n\n do {\n removed=false;\n Integer id = entry.getKey();\n\n if (states.get(id) == null)//state already been removed\n continue;\n else\n currState = (NfaState) entry.getValue();\n\n HashMap<String, ArrayList<Integer>> startEdges = currState.getOut_edges();\n\n for (Map.Entry<String, ArrayList<Integer>> startEdge : startEdges.entrySet()) {//for each edge of the current state being optimezed\n\n ArrayList<Integer> transactions = new ArrayList(startEdge.getValue());\n\n\n for (Integer state2DegID : transactions) {// for each transaction the 2nd degree state\n NfaState stateDeg2 = (NfaState) states.get(state2DegID);\n\n if (stateDeg2.getOut_edges() == null)\n continue;\n\n\n\n ArrayList<Integer> edgesDeg2 = stateDeg2.getOut_edges().get(EPSILON);\n\n if (edgesDeg2 != null && edgesDeg2.size() == 1 && stateDeg2.getOut_edges().size() == 1) {//if the next state has only a epsilon transaction, we can remove this state\n NfaState successor = (NfaState) states.get(edgesDeg2.get(0));\n\n\n for (Map.Entry<String, ArrayList<Integer>> inEdgesDeg2 : stateDeg2.getIn_edges().entrySet()) {//for every in_edge of the state being removed, update the elements accordingly\n String key = inEdgesDeg2.getKey();\n\n if (inEdgesDeg2.getValue().size() > 0)\n removed = true;\n\n for (Integer stateBeingUpdatedId : inEdgesDeg2.getValue()) {//state to be updated\n NfaState stateBeingUpdated = (NfaState) states.get(stateBeingUpdatedId);\n //add new edge\n stateBeingUpdated.addEdge(key, successor);\n\n //remove out and in edge to intermediate\n stateBeingUpdated.getOut_edges().get(key).remove((Integer) stateDeg2.getId());\n }\n }\n\n //remove out_edges\n for (Map.Entry<String, ArrayList<Integer>> outEdgesDeg2 : stateDeg2.getOut_edges().entrySet()) {\n for (Integer sucId : outEdgesDeg2.getValue()){\n ((NfaState)states.get(sucId)).getIn_edges().get(outEdgesDeg2.getKey()).remove((Integer) stateDeg2.getId());\n }\n }\n //remove state\n states.remove(stateDeg2.getId());\n }\n }\n\n }\n\n }while (removed);\n }\n }", "public void swapReplicatedEntities(Set<Entity> newReplicatedEntities, Portal portal) {\n // Loop through all of the existing fake entities and remove any that will no longer be visible to the player\n Iterator<ViewableEntity> removingIterator = replicatedEntites.values().iterator();\n while(removingIterator.hasNext()) {\n // Get the next entity, check if it is still visible in the new entities\n ViewableEntity playerEntity = removingIterator.next();\n Entity entity = playerEntity.getEntity();\n\n // If an entity is now vanished, or is no longer shown, hide it\n if(!newReplicatedEntities.contains(entity) || isVanished(entity)) {\n // If not, send an entity destroy packet, then remove the entity\n hideEntity(playerEntity.getEntityId());\n removingIterator.remove();\n }\n }\n\n // Loop through all the new entities\n for(Entity entity : newReplicatedEntities) {\n // Skip vanished players\n if(isVanished(entity)) {\n continue;\n }\n\n // If the current entity does not exist in the list\n if(!replicatedEntites.containsKey(entity)) {\n // Make a new PlayerViewableEntity instance from the entity, then send the packets to show it\n ViewableEntity newEntity = new ViewableEntity(this, entity, portal, random);\n showEntity(entity, newEntity.getLocation(), newEntity.getRotation(), newEntity.getEntityId());\n replicatedEntites.put(entity, newEntity); // Add the entity to the list\n }\n }\n }", "public interface Entity extends Immunizable {\n /**\n * Counts the total number of people in a certain state. An entity may be in multiple states if there are\n * multiple spreadables in play.\n *\n * @param state Which state to count\n * @return The number of entities in that state\n */\n int count(State state);\n\n /**\n * Counts the total number of people in a certain state for a given Spreadable. An entity will only ever be\n * in one state per spreadable.\n *\n * @param state Which state to count\n * @param spreadable Which spreadable to consider\n * @return The number of entities in that state for the given spreadable\n */\n int count(State state, Spreadable spreadable);\n\n /**\n * @return The total number of individuals that this Entity represents\n */\n int population();\n\n /**\n * Try to change entities from one state to another. If there aren't enough entities with the old state,\n * then only that many will be changed to the new state.\n *\n * @param spreadable\n * @param from\n * @param to\n * @param count\n */\n void changeState(Spreadable spreadable, State from, State to, int count);\n\n /**\n * Try to infect one or more entities with a specific Spreadable. This will not infect more people than are\n * susceptible, and may also be affected by rules for coexistence of spreadables.\n *\n * @param spreadable\n * @param count\n */\n default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }\n\n\n /**\n * Try to recover one or more entities with a specific Spreadable. This will not recover more entities than are\n * infected.\n *\n * @param spreadable\n * @param count\n */\n default void recover(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.RECOVERED, count);\n }\n\n /**\n * Try to return one or more entities from the infected state to the susceptible state for a given Spreadable.\n * This will not affect more entities than are infected.\n *\n * @param spreadable\n * @param count\n */\n default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }\n\n String getName();\n\n Collection<String> getLabels();\n\n Collection<Spreadable> getSpreadables();\n}", "public void forceChangeState(State toState) {\n changeState(state, toState);\n }", "void changeEntryState(ReadOnlyEntry entryToChange, Entry.State newState)\n throws DuplicateEntryException, EntryNotFoundException, OverlappingEventException,\n OverlappingAndOverdueEventException, EntryOverdueException;", "public void changeState(GameObjectState s) {\r\n\t\tstate.undoAction();\r\n\t\tstate = s;\r\n\t\tstate.doAction();\r\n\t}", "public void changeState()\r\n\t{\r\n\t\tfailedNumber=0;\r\n\t\tif(state.equalsIgnoreCase(\"IN PREPARATION\"))\r\n\t\t\tsetState(\"IN TRANSIT\");\r\n\t\telse if(state.equalsIgnoreCase(\"IN TRANSIT\"))\r\n\t\t{\r\n\t\t\tfailedNumber=Math.random();\r\n\t\t\tif(failedNumber<=0.2) setState(\"FAILED\");\r\n\t\t\telse setState(\"RECEIVED\");\r\n\t\t}\r\n\t}", "public void updateFakeEntities() { \n for(ViewableEntity playerEntity : replicatedEntites.values()) {\n playerEntity.update();\n }\n }", "private void updateState() {\n\t while(!isGoodState()) {\n\t\t updateStateOnce();\n\t }\n }", "public void update_all(state_t old_state, state_t new_state) {\r\n\r\n\t\tlock_.lock();\r\n\r\n\t\tForwardingInfo info;\r\n\t\ttry {\r\n\t\t\tfor (int i = log_.size() - 1; i >= 0; --i) {\r\n\t\t\t\tinfo = log_.get(i);\r\n\r\n\t\t\t\tif (info.state() == old_state) {\r\n\t\t\t\t\tinfo.set_state(new_state);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\t\t}\r\n\t}", "public void state(@NotNull State newState) {\n State state = this.state.get();\n\n if (state.ordinal() < newState.ordinal())\n this.state.compareAndSet(state, newState);\n }", "public void applyNewState() {\n this.setAlive(this.newState);\n }", "public void resolveRevisionStates() {\r\n\t\tboolean first = true;\r\n\t\tfor (Iterator i = getRevisions().iterator(); i.hasNext();) {\r\n\t\t\tPvcsRevision revision = (PvcsRevision) i.next();\r\n\t\t\tif (first) {\r\n\t\t\t\trevision.setState(PvcsRevisionState.ADD);\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\trevision.setState(PvcsRevisionState.CHANGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected S state(S newState) {\n S oldState = state;\n state = newState;\n return oldState;\n }", "@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}", "private void computeExternalState(InternalState newState) {\n if (internalState != newState) {\n switch (internalState) {\n case BUILD:\n Preconditions.checkState(newState == InternalState.PROBE_IN || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_IN:\n Preconditions.checkState(newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.REPLAY ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_OUT:\n case PROBE_PIVOT_AND_OUT:\n Preconditions.checkState(newState == InternalState.PROBE_IN ||\n newState == InternalState.PROBE_OUT ||\n newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROJECT_NON_MATCHES:\n Preconditions.checkState(newState == InternalState.REPLAY || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case REPLAY:\n Preconditions.checkState(newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n }\n internalState = newState;\n }\n computeExternalState();\n }", "@Override\n\tpublic void changeStateTo(String complainId, String state) throws Exception {\n\t\tIBOOrderComplainsValue ivalue = getOrderComplainsById(complainId);\n\t\tivalue.setState(state);\n\t\tBOOrderComplainsEngine.save(ivalue);\n\t}", "protected void stateChanged(final SpacecraftState state) {\n final AbsoluteDate date = state.getDate();\n final boolean forward = date.durationFrom(getStartDate()) >= 0.0;\n for (final DoubleArrayDictionary.Entry changed : state.getAdditionalStatesValues().getData()) {\n final TimeSpanMap<double[]> tsm = unmanagedStates.get(changed.getKey());\n if (tsm != null) {\n // this is an unmanaged state\n if (forward) {\n tsm.addValidAfter(changed.getValue(), date, false);\n } else {\n tsm.addValidBefore(changed.getValue(), date, false);\n }\n }\n }\n }", "private void revertState() {\r\n\t\tBlock block = this.state.getBlock();\r\n\t\t//If the block has been changed by the time we revert (e.g. block place). Also, we ignore fire since it isn't worth the time\r\n\t\tif (block.getType() != this.newData.getMaterial() && block.getType() != Material.FIRE && block.getType() != Material.SOUL_FIRE) {\r\n\t\t\t//Get the drops of the original block and drop them in the world\r\n\t\t\tGeneralMethods.dropItems(block, GeneralMethods.getDrops(block, this.state.getType(), this.state.getBlockData()));\r\n\t\t} else {\r\n\t\t\t//Previous Material was SNOW\r\n\t\t\tif (this.state.getType() == Material.SNOW){\r\n\t\t\t\tupdateSnowableBlock(block.getRelative(BlockFace.DOWN), true);\r\n\t\t\t}\r\n\r\n\t\t\t//Revert the original blockstate\r\n\t\t\tthis.state.update(true, applyPhysics(state.getType())\r\n\t\t\t\t\t&& !(state.getBlockData() instanceof Bisected));\r\n\t\t}\r\n\t}", "public void swapHiddenEntities(Set<Entity> newHiddenEntites) {\n for(Entity entity : newHiddenEntites) {\n // If the entity is already hidden, and should remain hidden,\n // remove it from the current array and do not hide or show it\n if(hiddenEntities.contains(entity)) {\n hiddenEntities.remove(entity);\n continue;\n }\n\n // If the entity was shown previously, and should now be hidden, hide it\n if(!hiddenEntities.contains(entity)) {\n hideEntity(entity.getEntityId());\n }\n }\n\n // Show the entities corresponding to the entries in the current array,\n // since these are the entities that should not stay hidden\n for(Entity entity : hiddenEntities) {\n showEntity(entity, null, null, entity.getEntityId());\n }\n\n hiddenEntities = newHiddenEntites; // Update the array\n }", "private void updateSharedState()\r\n {\r\n // TODO update the shared state\r\n // e.g.: sharedState.setTurnHolder(gameModel.getTurnHolder());\r\n }", "abstract public void updateState();", "public void changeState() {\n if (!isDead) {\n Bitmap temp = getBitmap();\n setBitmap(stateBitmap);\n stateBitmap = temp;\n }\n }", "protected SourceInterestMap updateEntity(SourceInterestMap entity, SourceInterestMap newEntity) {\n EntityManager em = PersistenceService.getInstance().getEntityManager();\n InterestArea interestAreaId = entity.getInterestAreaId();\n InterestArea interestAreaIdNew = newEntity.getInterestAreaId();\n Source sourceId = entity.getSourceId();\n Source sourceIdNew = newEntity.getSourceId();\n entity = em.merge(newEntity);\n if (interestAreaId != null && !interestAreaId.equals(interestAreaIdNew)) {\n interestAreaId.getSourceInterestMapCollection().remove(entity);\n }\n if (interestAreaIdNew != null && !interestAreaIdNew.equals(interestAreaId)) {\n interestAreaIdNew.getSourceInterestMapCollection().add(entity);\n }\n if (sourceId != null && !sourceId.equals(sourceIdNew)) {\n sourceId.getSourceInterestMapCollection().remove(entity);\n }\n if (sourceIdNew != null && !sourceIdNew.equals(sourceId)) {\n sourceIdNew.getSourceInterestMapCollection().add(entity);\n }\n return entity;\n }", "public void normalize()\n\t{\n\t\tlong last_entity_id = getLastEntityId(getEntityName());\n\t\t\n\t\t/* Clear db of any id's greater than id for this entity. Keep things clean */\n\t\t\n\t\t/* Save new entries for that entity */\n\t\tprocessNewRows(last_entity_id);\n\t\t\n\t\t/* Update session info */\n\t}", "public void updateNewState() {\n Integer aliveCount = 0;\n for (final Cell neighbor : this.neighbors) {\n if (neighbor.isAlive()) {\n aliveCount++;\n }\n }\n\n if (aliveCount < 2) {\n this.setNewState(false);\n } else if (!this.isAlive() && aliveCount == 3) {\n this.setNewState(true);\n } else if (aliveCount > 3) {\n this.setNewState(false);\n }\n }", "public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }", "public void setCameFrom(State n)\r\n\t{\r\n\t\tthis.previousState = new State(n);\r\n\t}", "void changed(State state, Exception e);", "public void setState(DiagramModel state) {\r\n for (Element e : state) {\r\n savedState_.add(0, e.makeCopy());\r\n }\r\n }", "private void setNewStatusIfNeeded() {\n \t\tfor(FileDiffDirectory dir : directories ) {\n \t\t\tif (dir.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor(FileDiffFile file : files ) {\n \t\t\tif (file.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}", "private void switchRelations() throws TransactionAbortedException, DbException {\n // IMPLEMENT ME\n }", "public void setState(State newState) {this.state = newState;}", "@Test\n public void toggleTeamStates() {\n Team team = new Team(\"Crvena Zvezda\");\n\n // TODO: open persistence context and create transaction\n\n // TODO: move team to managed state\n\n // TODO: assert that the team is managed (check if contained in session)\n\n // TODO: commit and close persistence context\n\n // TODO: fetch from DB as managed entity\n\n // TODO: assert entity is managed\n\n // TODO: remove entity from session and assert not managed\n\n // TODO: commit and close\n }", "private void handleStepChange()\n {\n boolean processorsChanged = false;\n myProcessorsLock.writeLock().lock();\n try\n {\n final Iterator<Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>>> procIter = myGeometryProcessorsMap\n .entrySet().iterator();\n final ActiveTimeSpans activeTimeSpans = myActiveTimeSpans;\n while (procIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>> entry = procIter.next();\n if (!inProcessRange(entry.getKey(), activeTimeSpans))\n {\n processorsChanged = true;\n procIter.remove();\n myInactiveGeometries.put(entry.getKey(), New.set(entry.getValue().getGeometries()));\n entry.getValue().close();\n }\n }\n\n final Iterator<Entry<ProcessorDistributionKey, Set<Geometry>>> inactiveIter = myInactiveGeometries.entrySet()\n .iterator();\n while (inactiveIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, Set<Geometry>> entry = inactiveIter.next();\n if (inProcessRange(entry.getKey(), activeTimeSpans) && !entry.getValue().isEmpty())\n {\n processorsChanged = true;\n inactiveIter.remove();\n setProcessorConstraints(entry.getKey());\n final GeometryProcessor<? extends Geometry> processor = myProcessorBuilder\n .createProcessorForClass(entry.getKey().getGeometryType());\n processor.receiveObjects(this, entry.getValue(), Collections.<Geometry>emptyList());\n myGeometryProcessorsMap.put(entry.getKey(), processor);\n }\n }\n }\n finally\n {\n myProcessorsLock.writeLock().unlock();\n }\n\n if (processorsChanged)\n {\n populateRenderableProcessors();\n }\n }", "public void updateNetwork(double infectionChance) {\n\t\tSet<Integer> ids = idToPersons.keySet();\n\t\tList<Integer> list = new ArrayList<Integer>(ids);\n\t\tCollections.shuffle(list);\n\t\tfor (int id : list) {\n\t\t\tidToPersons.get(id).updateState(infectionChance);\n\t\t} \n\t\t//states = getState();\n\t}", "public void partialCopy (WorldState other, LGOAPAction action, boolean isGoal)\n\t{\n\t\tresetProperties();\n\t\t//Iterate through other state and clone it's properties into this states properties\n\t\tCollection<WorldStateProperty> otherProperties = other.properties.values();\n\t\tfor (WorldStateProperty property : otherProperties)\n\t\t{\n\t\t\tproperties.put(property.key, property.clone());\n\t\t}\n\t\t\n\t\tif (isGoal)\n\t\t{\n\t\t\tfor (WorldStateProperty effectProp : action.effects.properties.values())\n\t\t\t{\t\t\t\t\n\t\t\t\tObject oPropValue = properties.get(effectProp.key).value.getValue();\n\t\t\t\tObject oActionValue = effectProp.value.getValue();\n\n\t\t\t\tint actionValue = ((Integer) oActionValue).intValue();\n\t\t\t\tint propValue = ((Integer) oPropValue).intValue();\t\n\t\t\t\tint newPropValue = propValue - actionValue;\n\t\t\t\t\n\t\t\t\tproperties.get(effectProp.key).value = new WorldStateValue(newPropValue);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (WorldStateProperty effectProp : action.effects.properties.values())\n\t\t\t{\t\t\t\n\t\t\t\tObject oPropValue = properties.get(effectProp.key).value.getValue();\n\t\t\t\tObject oActionValue = effectProp.value.getValue();\t\t\t\n\n\t\t\t\tint actionValue = ((Integer) oActionValue).intValue();\n\t\t\t\tint propValue = ((Integer) oPropValue).intValue();\t\n\t\t\t\tint newPropValue = propValue + actionValue;\n\t\t\t\t\n\t\t\t\tproperties.get(effectProp.key).value = new WorldStateValue(newPropValue);\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void sendState(int currentPlayerState, int opponentPlayerState) {\n for(Integer playerID: getPlayerList()) {\n \tif(playerID == currentPlayer) {\n \t//\tplayerStates.put(player, currentPlayerState);\n \t\t// Don't send anything but a clone! It will mysteriously vanish once it hits the ClientWindow\n\t\t\t\tsendToOne(playerID, new GameState((Player)players.get(playerID), (ArrayList<Card>)discardHand.clone(), currentPlayerState));\n \t} else {\n \t//\tplayerStates.put(player, opponentState);\n\t\t\t\tsendToOne(playerID, new GameState((Player)players.get(playerID), (ArrayList<Card>)discardHand.clone(), opponentPlayerState));\n \t}\n }\n// for(int i = 0; i < playerCount; i++) {\n// \tsendToOne(i+1, new GameState(hands.get(i),playerStates.get(key)));\n// }\n\t}", "public void updateStep() {\n if (level != null) {\n // erst bewegung beenden, dann aktivitaet\n pacman.endMove();\n pacman.update(this);\n checkCollisions();\n // beendet die bewegungen von entities sofort, sonst keine aktivitaet\n GameEntity e;\n for (GameEntity entity : entities) {\n e = entity;\n // erst aktivitaet, dann bewegung beenden\n e.update(this);\n if (e instanceof MovingEntity)\n ((MovingEntity) e).endMove();\n }\n checkCollisions();\n }\n }", "public static int activityStateToWorkItemState( int newState )\r\n {\r\n // The states actually have the same ordinals.\r\n return newState;\r\n }", "@Override\n\tpublic void adjust() {\n\t\tstate = !state;\n\t}", "public void updateIdentities() {\n // get a list of the internal conversation addresses\n ArrayList<String> addresses = new ArrayList<>();\n for (int i = 0; i < size(); i++)\n addresses.add(get(i).getFromAddress());\n\n // retrieve and set the identities of the internal addresses\n ArrayList<String> identities = retrieveIdentities(addresses);\n for (int i = 0; i < size(); i++)\n get(i).setIdentity(identities.get(i));\n }", "void updateBeliefStateActionTrans( BeliefStateDimension prev_belief,\n BelievabilityAction action,\n BeliefStateDimension next_belief )\n throws BelievabilityException\n {\n if (( prev_belief == null )\n || ( action == null )\n || ( next_belief == null ))\n throw new BelievabilityException\n ( \"updateBeliefStateActionTrans()\",\n \"NULL parameter(s) sent in.\" );\n\n // If the action does not pertain to this state dimension\n // (shouldn't happen), then we assume the state remains\n // unchanged (identiy matrix). Note that we copy the\n // probability values from prev_belief to next_belief, even\n // though the next_belief likely starts out as a clone of the\n // prev_belief. We do this because we were afraid of assuming\n // it starts out as a clone, as this would make this more\n // tightly coupled with the specific implmentation that calls\n // this method. Only if this becomes a performance problem\n // should this be revisited.\n // \n\n double[] prev_belief_prob = prev_belief.getProbabilityArray();\n double[] next_belief_prob = new double[prev_belief_prob.length];\n\n // The action transition matrix will model how the asset state\n // change will happen when the action is taken..\n //\n double[][] action_trans\n = _asset_dim_model.getActionTransitionMatrix( action );\n\n if ( _logger.isDetailEnabled() )\n _logger.detail( \"Action transition matrix: \" \n + _asset_dim_model.getStateDimensionName() + \"\\n\" \n + ProbabilityUtils.arrayToString( action_trans ));\n\n // We check this, but it really should never be null.\n //\n if ( action_trans == null )\n throw new BelievabilityException\n ( \"updateBeliefStateActionTrans()\",\n \"Could not find action transition matrix for: \"\n + prev_belief.getAssetID().getName() );\n \n // Start the probability calculation\n //\n for ( int cur_state = 0; \n cur_state < prev_belief_prob.length; \n cur_state++ ) \n {\n \n for ( int next_state = 0; \n next_state < prev_belief_prob.length; \n next_state++ ) \n {\n next_belief_prob[next_state] \n += prev_belief_prob[cur_state] \n * action_trans[cur_state][next_state];\n \n } // for next_state\n } // for cur_state\n\n // We do this before the sanity check, but maybe this isn't\n // the right thing to do. For now, it allows me to more easily\n // convert it to a string in the case where there is a\n // problem. \n //\n next_belief.setProbabilityArray( next_belief_prob );\n\n // Add a sanity check to prevent bogus belief from being\n // propogated to other computations. \n //\n double sum = 0.0;\n for ( int i = 0; i < next_belief_prob.length; i++ )\n sum += next_belief_prob[i];\n\n if( ! Precision.isZeroComputation( 1.0 - sum ))\n throw new BelievabilityException\n ( \"updateBeliefStateActionTrans()\",\n \"Resulting belief doesn't sum to 1.0 : \"\n + next_belief.toString() );\n\n }", "@Override\n protected void doChanged(java.sql.Connection connection, java.util.Collection<org.tair.db.locusdetail.IPolymorphismSite> dtos)\n throws java.sql.SQLException, com.poesys.db.BatchException, com.poesys.db.ConstraintViolationException,\n com.poesys.db.dto.DtoStatusException {\n com.poesys.db.dao.IDaoManager manager = \n com.poesys.db.dao.DaoManagerFactory.getManager(subsystem);\n com.poesys.db.dao.IDaoFactory<org.tair.db.locusdetail.IPolymorphismSite> factory = \n manager.getFactory(org.tair.db.locusdetail.PolymorphismSite.class.getName(), subsystem, 2147483647);\n com.poesys.db.dao.update.IUpdateBatch<org.tair.db.locusdetail.IPolymorphismSite> dao =\n factory.getUpdateBatch(new org.tair.db.locusdetail.sql.UpdatePolymorphismSite());\n dao.update(connection, dtos, BATCH_SIZE);\n }", "private LogicStatus updateState(Board thing) {\n count(thing);\n CellType curstate = thing.getCellType(x,y);\n\n // is it a terminal?\n if (walls.size() == 3) {\n if (curstate == CellType.NOTTERMINAL) return LogicStatus.CONTRADICTION;\n thing.setCellType(x,y,CellType.TERMINAL);\n return LogicStatus.LOGICED;\n }\n\n // the other states (BEND,STRAIGHT) require two paths.\n if (paths.size() < 2) return LogicStatus.STYMIED;\n\n Iterator<Direction> dit = paths.iterator();\n Direction d1 = dit.next();\n Direction d2 = dit.next();\n\n CellType nextct = d1 == d2.getOpp() ? CellType.STRAIGHT : CellType.BEND;\n\n if (nextct == CellType.STRAIGHT) {\n thing.setCellType(x,y,nextct);\n return LogicStatus.LOGICED;\n }\n\n if (curstate == CellType.NOTBEND) return LogicStatus.CONTRADICTION;\n\n thing.setCellType(x,y,nextct);\n return LogicStatus.LOGICED;\n }", "public void undo() {\n target.setCombatState( oldState );\n }", "@Override\n protected void incrementStates() {\n\n }", "@Override\n\tpublic void updateEntity()\n\t{\n\t\tif (structureComplete() && checkCountdown >= CHECK_MAX)\n\t\t{\n\t\t\tcheckCountdown = 0;\n\t\t\t\n\t\t\t// Refresh the core structure.\n\t\t\tupdateStructure();\n\t\t}\n\t\telse checkCountdown++;\n\t}", "synchronized void revertState()\n {\n state = state.revert();\n notifyAll();\n }", "@Test\n public void testStateTransitions2()\n {\n theEngine.start();\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inWonState());\n \n //Player won -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inWonState());\n \n //Player won -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inWonState());\n \n //Undo from player won state\n theEngine.undoLastMove();\n //didn't throw assertion error, so this is fine\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n }", "public void setSelectedEntities(Entity[] newEntities) {\n\t\tselectedEntities = newEntities;\n\t}", "public abstract Op resetStates();", "public void updateState(Orders orders) {\n\t\t\n\t\tordersMapper.updateByPrimaryKeySelective(orders);\n\t}", "public LinkedList<State> getNextAvailableStates() {\n LinkedList<Integer> currentSide = new LinkedList<>();\n LinkedList<Integer> otherSide = new LinkedList<>();\n LinkedList<State> newStates = new LinkedList<>();\n if(isLeft) {\n if(leftSide != null) currentSide = new LinkedList<>(leftSide);\n if(rightSide != null) otherSide = new LinkedList<>(rightSide);\n } else {\n if (rightSide != null) currentSide = new LinkedList<>(rightSide);\n if (leftSide != null) otherSide = new LinkedList<>(leftSide);\n }\n\n // add one people to the other side of the bridge\n for (int index=0; index< currentSide.size(); index++) {\n LinkedList<Integer> newCurrentSide = new LinkedList<>(currentSide);\n LinkedList<Integer> newOtherSide = new LinkedList<>(otherSide);\n int firstPeopleMoved = newCurrentSide.remove(index);\n newOtherSide.add(firstPeopleMoved);\n State state = (isLeft) ? new State(newCurrentSide, newOtherSide, !isLeft,timeTaken+firstPeopleMoved, depth+1, highestSpeed) :\n new State(newOtherSide, newCurrentSide, !isLeft, timeTaken+firstPeopleMoved, depth+1, highestSpeed);\n state.setReward(state.calculateReward(firstPeopleMoved));\n // add this as parent to the child\n state.parents = new LinkedList<>(this.parents);\n state.addParent(this);\n // set the action that get to this state\n String currentAction = \"move \" + firstPeopleMoved;\n currentAction += (isLeft) ? \" across\" : \" back\";\n state.copyActions(this); // copy all the previous actions from the parent\n state.addActions(currentAction); // add new action to state generated by parent\n // add to the new states of list\n newStates.add(state);\n // add two people to the other side of the bridge\n for (int second=0; second < newCurrentSide.size(); second++) {\n LinkedList<Integer> newSecondCurrentSide = new LinkedList<>(newCurrentSide);\n LinkedList<Integer> newSecondOtherSide = new LinkedList<>(newOtherSide);\n int secondPeopleMoved = newSecondCurrentSide.remove(second);\n newSecondOtherSide.add(secondPeopleMoved);\n int slowerSpeed = (firstPeopleMoved > secondPeopleMoved) ? firstPeopleMoved : secondPeopleMoved;\n state = (isLeft) ? new State(newSecondCurrentSide, newSecondOtherSide, !isLeft, timeTaken+slowerSpeed, depth+1, highestSpeed) :\n new State(newSecondOtherSide, newSecondCurrentSide, !isLeft, timeTaken+slowerSpeed, depth+1, highestSpeed);\n state.setReward(state.calculateReward(firstPeopleMoved, secondPeopleMoved));\n // add this as parent to the child\n state.parents = new LinkedList<>(this.parents);\n state.addParent(this);\n // set the action that get to this state\n currentAction = \"move \"+ firstPeopleMoved + \" \" + secondPeopleMoved;\n currentAction += (isLeft) ? \" across\" : \" back\";\n state.copyActions(this);\n state.addActions(currentAction);\n // add to the new states of list\n newStates.add(state);\n }\n\n }\n return newStates;\n }", "public void updateState();", "public void updateState() {\n\n // After each frame, the unit has a slight morale recovery, but only up to the full base morale.\n morale = Math.min(morale + GameplayConstants.MORALE_RECOVERY, GameplayConstants.BASE_MORALE);\n\n if (morale < GameplayConstants.PANIC_MORALE) {\n state = UnitState.ROUTING;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.ROUTING);\n }\n } else if (state == UnitState.ROUTING && morale > GameplayConstants.RECOVER_MORALE) {\n this.repositionTo(averageX, averageY, goalAngle);\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.MOVING);\n }\n }\n\n // Update the state of each single and the average position\n double sumX = 0;\n double sumY = 0;\n double sumZ = 0;\n int count = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.updateState();\n sumX += single.getX();\n sumY += single.getY();\n sumZ += single.getZ();\n count += 1;\n }\n averageX = sumX / count;\n averageY = sumY / count;\n averageZ = sumZ / count;\n\n // Updating soundSink\n soundSink.setX(averageX);\n soundSink.setY(averageY);\n soundSink.setZ(averageZ);\n\n // Update the bounding box.\n updateBoundingBox();\n\n // Update stamina\n updateStamina();\n }", "public void step() {\n\t\t// calculate new values\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = cells[x + (y * gridX)];\n\t\t\t\tCell newCell = newCells[x + (y * gridX)];\n\n\t\t\t\tint neighborCount = sameNeighborCount(x, y);\n\n\t\t\t\tif (c.isActive) {\n\t\t\t\t\tif (neighborCount < 2) {\n\t\t\t\t\t\t// all alone, die of loneliness\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t\telse if (neighborCount > 3) {\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Dead cells can be reborn if surrounded by enough neighbors of the same\n\t\t\t\t\t// color. The cell will be reborn using the most prominent color.\n\t\t\t\t\tint populousColor = mostPopulousColor(x, y);\n\t\t\t\t\tif (populousColor > Integer.MIN_VALUE) {\n\t\t\t\t\t\tnewCell.isActive = true;\n\t\t\t\t\t\tnewCell.cellColor = populousColor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// update to new state\n\t\tfor (int i = 0; i < cells.length; i++) {\n\t\t\tcells[i].isActive = newCells[i].isActive;\n\t\t\tcells[i].cellColor = newCells[i].cellColor;\n\t\t}\n\t}", "public static int activityStateToProcessState( int newState )\r\n {\r\n // The states actually have the same ordinals.\r\n return newState;\r\n }", "@Override\r\n\tpublic void updateState(int id, int state) {\n\t}", "public void updateEntity()\n {\n\t\tif ((++ticksSinceSync % 20) == 0) \n {\n\t\t\tsync();\n\t\t}\n\t\t\n boolean var1 = this.furnaceBurnTime > 0;\n boolean checkBurning = false;\n boolean prevIsBurning = isBurning;\n\n if(this.canSmelt() && this.fuel > 0)\n {\n\t\t\t++this.furnaceCookTime;\n\t\t\tisBurning = true;\n\n\t\t\tif (this.furnaceCookTime == furnaceTimeBase) \n\t\t\t{\n\t\t\t\tthis.furnaceCookTime = 0;\n\t\t\t\t--this.fuel;\n\t\t\t\tthis.smeltItem();\n\t\t\t\tcheckBurning = true;\n\t\t\t}\n }\n else\n {\n this.furnaceCookTime = 0;\n isBurning = false;\n }\n \n \n if(prevIsBurning != isBurning)\n {\n \tcheckBurning = true;\n NF_BlockNetherForge.updateFurnaceBlockState(this.isBurning, this.worldObj, this.xCoord, this.yCoord, this.zCoord);\n }\n\n if (checkBurning)\n {\n this.onInventoryChanged();\n\t\t\tint id = worldObj.getBlockId(xCoord, yCoord, zCoord);\n\t\t\tsync();\n }\n }", "private void updateStatuses(ArrayList<MovingEntity> targets){\n //ArrayList<MovingEntity> swapped = new ArrayList<>();\n for(MovingEntity target : targets) {\n for (Status s: target.getStatusList()) {\n if(s != null) s.battleTick(target);\n }\n /*\n if(target.isFriendly() == friendly){\n target.setStatus(null);\n swapped.add(target);\n }\n */\n }\n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Override\r\n\tpublic void updateState(Long id, Integer state) throws ServiceException {\n\r\n\t}", "private void actualizarEnemigosItems() {\n if(estadoMapa== EstadoMapa.RURAL || estadoMapa== EstadoMapa.RURALURBANO ){\n moverCamionetas();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n moverCarroLujo();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.UNIVERSIDAD){\n moverCarritoGolf();\n moverAves();\n }\n if (estadoMapa == EstadoMapa.SALONES){\n moverLamparas();\n moverSillas();\n }\n actualizaPuntuacion();\n moverTareas();\n moverItemCorazon();\n verificarColisiones();\n verificarMuerte();\n moverItemRayo();\n /*\n IMPLEMENTAR\n\n //moverPajaro();\n //etc\n */\n }", "public void changeState(int transition) {\n lastState = currentState;\n currentState = nextState[currentState][transition];\n // System.out.println(\" = \" + currentState);\n if (currentState == -2) {\n System.out.println(\"Error [\" + currentState + \"] has occured\");\n terminate();\n }\n else if (currentState == -1) {\n terminate();\n }\n states[currentState].run();\n }", "private List<State> substitueStateSketch(State oldState, Set<Node> components) {\n\n// long start = System.currentTimeMillis();\n\n List<State> ret = new ArrayList<>();\n\n for (Node sk : components) {\n\n State newState = new State(oldState);\n VariableNode v = newState.pp.findSelectedVar();\n v.sketch = sk;\n\n if (sk instanceof NullaryTerminalNode) {\n\n NullaryTerminalNode n = (NullaryTerminalNode) sk;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n if (n.sym.name.equals(\"<any>\")) continue;\n } else if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n newState.cost += Main.NOT_TERMINAL_PATTERN;\n }\n }\n\n newState.pp.numNullaryTerminals++;\n } else if (sk instanceof OperatorNode) {\n if (((OperatorNode) sk).special) newState.cost += Main.SPECIAL_REPEATATLEAST_1;\n\n String opName = ((OperatorNode) sk).operatorName;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n if (!(opName.equals(\"startwith\") || opName.equals(\"endwith\") || opName.equals(\"contain\"))) {\n newState.cost += Main.NOT_NOT_CONTAIN_SW_EW_PATTERN;\n }\n }\n }\n } else {\n\n // do not continue if we are trying to replace argument of notcc with a op node\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n continue;\n }\n }\n }\n\n newState.pp.numOperatorSketch++; // TODO: it might be a problem if we have a rf sketch such as concat(v:contain(v:?{<num>}))\n newState.pp.deselectVar();\n if (evalApprox(newState)) ret.add(newState);\n\n }\n\n return ret;\n\n }", "protected PuzzleState swapTilesNewState(PuzzleState state, int row1, int col1, int row2, int col2) {\r\n PuzzleState newState = state.copy();\r\n int temp = newState.getTile(row1, col1);\r\n newState.setTile(row1, col1, newState.getTile(row2, col2));\r\n newState.setTile(row2, col2, temp);\r\n return newState;\r\n }", "@Transactional \n\tpublic void updateAll() {\n\t\t\n\t\tIterator<Pharmacy> newList = pharmacyRepository1.getAllEntity().iterator();\n\t\twhile (newList.hasNext()) {\n\t\t\tPharmacy pharmacy = newList.next();\n\t\t\tlistStockInPharmacy(pharmacy);\n\t\t\t}\n\t\t\n\t}", "protected void processEntryTransition(InternalSystemEntryDelta entryDelta,\n Collection<String> toStates)\n {\n Transition lastTransition = null;\n \n String fromState = entryDelta.getCurrentEntryState();\n \n for(String toState : toStates)\n {\n if(\"<expected>\".equals(toState))\n toState = entryDelta.getExpectedEntryState();\n \n lastTransition = processEntryStateMismatch(lastTransition,\n entryDelta,\n fromState,\n toState);\n \n fromState = toState;\n }\n }", "public static int processStateToActivityState(int newState) {\r\n // The states actually have the same ordinals.\r\n return newState;\r\n }", "public void changeState(){\n\t\t//red - Green\n\t\tif (lights[0].isOn()){\n\t\t\tlights[0].turnOff();\n\t\t\tlights[2].turnOn();\n\t\t}\n\t\t\n\t\t//Green -yellow\n\t\telse if(lights[2].isOn()){\n\t\t\tlights[2].turnOff();\n\t\t\tlights[1].turnOn();\n\t\t}\n\t\t//yellow to red\n\t\telse if (lights[1].isOn()){\n\t\t\tlights[1].turnOff();\n\t\t\tlights[0].turnOn();\n\t\t}\n\t\t\n\t}", "void refreshEntities(Collection<Entity> entities);", "private void restoreMappingPreviousState(ApplicationInfo readPerst)\n\t\t\tthrows RowsExceededException, WriteException, BiffException,\n\t\t\tIOException {\n\t\tint size = NcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t.size();\n\t\tfor (int i = NcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t.size() - 1; i >= 0; i--) {\n\t\t\tNcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t\t.remove(i);\n\t\t}\n\n\t\t// setting the available columns\n\t\tfor (int i = 0; i < readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t.getAvailableColumnsVector().size(); i++) {\n\t\t\tNcaMappingDispGui.createMappingInstance().availableVariablesListmodel\n\t\t\t\t\t.add(i, readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getAvailableColumnsVector().get(i));\n\n\t\t}\n\n\t\t// since sort variables are not populated while creating a new\n\t\t// ncaMainScreen\n\t\t// we need not remove anything, so\n\t\t// setting the sort variables\n\t\tfor (int i = 0; i < readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t.getSortVariablesListVector().size(); i++) {\n\t\t\tNcaMappingDispGui.createMappingInstance().sortVariableListModel\n\t\t\t\t\t.add(i, readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getSortVariablesListVector().get(i));\n\n\t\t}\n\n\t\t// setting the time column\n\n\t\tNcaMappingDispGui.createMappingInstance().xVariableTextField\n\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t.getxColumnName());\n\n\t\t// setting the concentration column\n\n\t\tNcaMappingDispGui.createMappingInstance().yVariableTextField\n\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t.getYcolumnName());\n\n\t\t// setting the end time column\n\t\t// restore this value only if the previous analysis is of model type\n\t\t// urine\n\t\tif (readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getModelInputsObj().getModelType() == 1) {\n\t\t\tNcaMappingDispGui.createMappingInstance().endTimeVariableTextField\n\t\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getEndTimeColumnName());\n\n\t\t\tNcaMappingDispGui.createMappingInstance().volumeVariableTextField\n\t\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getVolumeColumnName());\n\t\t}\n\n\t\t// setting the subject column name\n\t\t// restore this value only when if it was a sparse analysis\n\t\tif (readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t.getProcessingInputs().getModelInputsObj()\n\t\t\t\t.getisSparseSelected() == true) {\n\n\t\t\tNcaMappingDispGui.createMappingInstance().subjectTextField\n\t\t\t\t\t.setText(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getWorkSheetObjectsAL().get(\n\t\t\t\t\t\t\treadPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getWorkBooksArrayList().get(readPerst.getProjectInfoAL().get(readPerst.getSelectedProjectIndex()).getSelectedWorkBookIndex()).getSelectedSheetIndex()).getNcaInfo()\n\t\t\t\t\t\t\t.getProcessingInputs().getMappingDataObj()\n\t\t\t\t\t\t\t.getSubjectColumnName());\n\t\t}\n}", "@Override\n\tpublic void restoreState() {\n // Rather than copying the stored stuff back, just swap the pointers...\n int[] tmp1 = currentMatricesIndices;\n currentMatricesIndices = storedMatricesIndices;\n storedMatricesIndices = tmp1;\n\n int[] tmp2 = currentPartialsIndices;\n currentPartialsIndices = storedPartialsIndices;\n storedPartialsIndices = tmp2;\n\n\n }", "@Test\n public void testStateTransitions3()\n {\n //Undo from starting state\n boolean assertionFailed = false;\n try\n {\n theEngine.undoLastMove();\n }\n catch (AssertionError ae)\n {\n assertionFailed = true;\n }\n \n assertTrue(assertionFailed);\n \n //Undo from playing state\n theEngine.start();\n try\n {\n theEngine.undoLastMove();\n }\n catch (AssertionError ae)\n {\n assertionFailed = true;\n }\n \n //Undo from halted state\n theEngine.quit();\n movePlayerToCell(getEmptyCell());\n theEngine.undoLastMove();\n //didn't throw assertion error, so fine\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n }", "void reattachEntitiesWithNoLock(Collection<? extends IPojoGenEntity> entities);", "public State update(State from) {\n\n if(from == null)\n return this;\n\n if(from.hub != null)\n this.hub = from.hub;\n\n if(from.batch != 0)\n this.batch = from.batch;\n\n return this;\n }", "public void updateEntity();", "public void setToOriginals(){\n\t\t//set all occupied nodes as empty\n\t\tif(nodeStatus == Status.occupied){\n\t\t\tsetAsEmpty();\n\t\t}\n\t\t//if the node had a unit end on it, reset that value\n\t\tif(ended == true){\n\t\t\tended=false;\n\t\t}\n\t\tf=0;\n\t\tg=0;\n\t\th=0;\n\t}", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void updateBattleSides() {\n ArrayList<MovingEntity> convertedEnemies = new ArrayList<MovingEntity>();\n ArrayList<MovingEntity> convertedAllies = new ArrayList<MovingEntity>();\n for (MovingEntity e: battleEnemies) {\n // check converting enemies to allies\n if (e.isFriendly() == true) {\n convertedEnemies.add(e);\n }\n }\n // convert here to avoid ConcurrentModificationException\n for (MovingEntity converted: convertedEnemies) {\n checkSideSwap(converted, true, battleAllies, targetAllies, battleEnemies, targetEnemies);\n }\n for (MovingEntity e: battleAllies) {\n // check converting allies to enemies\n if (e.isFriendly() == false) {\n convertedAllies.add(e);\n }\n }\n for (MovingEntity converted: convertedAllies) {\n checkSideSwap(converted, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n }", "private static void changePos(int[][] newState, int i_0, int j_0, int p, int o) {\r\n\r\n newState[i_0][j_0] = newState[p][o];\r\n newState[p][o] = 0;\r\n\r\n }" ]
[ "0.6289492", "0.58733803", "0.57634753", "0.5761026", "0.5748426", "0.57321185", "0.5690982", "0.5679378", "0.56393737", "0.55405205", "0.55158734", "0.5455447", "0.54385453", "0.54159755", "0.5412074", "0.54088926", "0.53871816", "0.5379853", "0.5376415", "0.5366538", "0.53642464", "0.53610456", "0.5325339", "0.5310036", "0.5304933", "0.52967614", "0.52882564", "0.5273962", "0.526509", "0.5264382", "0.5237476", "0.5228552", "0.52122533", "0.5200488", "0.5188795", "0.5176638", "0.51483154", "0.5137805", "0.5127695", "0.5126292", "0.51167387", "0.5113458", "0.5108416", "0.5092662", "0.5086187", "0.5072503", "0.5072261", "0.5071699", "0.5060798", "0.5030369", "0.50259984", "0.50228924", "0.50215924", "0.5011676", "0.5010316", "0.5006594", "0.499476", "0.49920723", "0.49916482", "0.4991018", "0.496564", "0.49653846", "0.49378765", "0.4937012", "0.49331778", "0.49295953", "0.492896", "0.4916169", "0.49154168", "0.4910658", "0.49043134", "0.4899042", "0.48974577", "0.48958316", "0.4879", "0.4878243", "0.48753726", "0.486624", "0.48590317", "0.48502544", "0.48493525", "0.4844823", "0.4830979", "0.48300785", "0.4828545", "0.48251188", "0.48145175", "0.4813262", "0.48112848", "0.48043934", "0.48038495", "0.48028737", "0.47976553", "0.47961983", "0.47902158", "0.4785434", "0.47829345", "0.47783425", "0.47781017", "0.47754723" ]
0.6220507
1
Try to infect one or more entities with a specific Spreadable. This will not infect more people than are susceptible, and may also be affected by rules for coexistence of spreadables.
default void infect(Spreadable spreadable, int count) { changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Entity extends Immunizable {\n /**\n * Counts the total number of people in a certain state. An entity may be in multiple states if there are\n * multiple spreadables in play.\n *\n * @param state Which state to count\n * @return The number of entities in that state\n */\n int count(State state);\n\n /**\n * Counts the total number of people in a certain state for a given Spreadable. An entity will only ever be\n * in one state per spreadable.\n *\n * @param state Which state to count\n * @param spreadable Which spreadable to consider\n * @return The number of entities in that state for the given spreadable\n */\n int count(State state, Spreadable spreadable);\n\n /**\n * @return The total number of individuals that this Entity represents\n */\n int population();\n\n /**\n * Try to change entities from one state to another. If there aren't enough entities with the old state,\n * then only that many will be changed to the new state.\n *\n * @param spreadable\n * @param from\n * @param to\n * @param count\n */\n void changeState(Spreadable spreadable, State from, State to, int count);\n\n /**\n * Try to infect one or more entities with a specific Spreadable. This will not infect more people than are\n * susceptible, and may also be affected by rules for coexistence of spreadables.\n *\n * @param spreadable\n * @param count\n */\n default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }\n\n\n /**\n * Try to recover one or more entities with a specific Spreadable. This will not recover more entities than are\n * infected.\n *\n * @param spreadable\n * @param count\n */\n default void recover(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.RECOVERED, count);\n }\n\n /**\n * Try to return one or more entities from the infected state to the susceptible state for a given Spreadable.\n * This will not affect more entities than are infected.\n *\n * @param spreadable\n * @param count\n */\n default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }\n\n String getName();\n\n Collection<String> getLabels();\n\n Collection<Spreadable> getSpreadables();\n}", "default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }", "private static Sittable[] makePeopleWhoCanSit() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic InputSource resolveEntity(String publicId, String systemId)\r\n\t\t\tthrows SAXException, IOException {\n\t\treturn null;\r\n\t}", "public void infectedBy(Organism infectingOrganism) {\n\t\tinfectingOrganism._nTotalInfected++;\n\t\t_infectedGeneticCode = infectingOrganism.getGeneticCode();\n\t\t_infectedGeneration = infectingOrganism.getGeneration();\n\t\t_world.organismHasBeenInfected(this, infectingOrganism);\n\t}", "private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public void infect() {\n isInfected = true;\n }", "private void obtainProblem(){\n followers = frame.getFollowers();\n followers = Math.min(followers, CreatureFactory.getStrongestMonster().getFollowers() * Formation.MAX_MEMBERS);\n maxCreatures = frame.getMaxCreatures();\n heroes = frame.getHeroes();//is this field needed?\n prioritizedHeroes = frame.getHeroes(Priority.ALWAYS);\n //create boss formation\n LinkedList<Creature> list = new LinkedList<>();\n list.add(frame.getBoss());\n bossFormation = new Formation(list);\n containsRandomBoss = bossFormation.containsRandomHeroes();\n yourRunes = frame.getYourRunes();\n for (int i = 0; i < Formation.MAX_MEMBERS; i++){\n //System.out.println(yourRunes[i]);\n if (!(yourRunes[i] instanceof Nothing)){\n hasRunes = true;\n //System.out.println(\"hasRunes\");\n break;\n }\n }\n \n NHWBEasy = heroes.length == 0 && prioritizedHeroes.length == 0 && frame.getBoss().getMainSkill().WBNHEasy() && !hasRunes && !containsRandomBoss;\n \n }", "public InputSource resolveEntity (String publicId, String systemId)\n throws IOException, SAXException\n {\n return null;\n }", "private void evaluateNamedEntities(String sentence, ResolutionMode resolutionMode,\n\t\t\tList<String> expectedSurfaceList, List<String> expectedTypeNames,\n \t\t\tList<Double> expectedProbList) throws Exception {\n\n List<NamedEntityType> expectedTypeList = new ArrayList<NamedEntityType>();\n for (String name : expectedTypeNames) {\n expectedTypeList.add(NamedEntityType.valueOf(name));\n }\n\n\t\t// Check that Sentence is not empty\n\t\tassertTrue(\"Extracting String: \",\n\t\t\t\tsentence != null && sentence.length() > 0);\n\n\t\tDocument doc = TextToSciXML.textToSciXML(sentence);\n\t\tIProcessingDocument procDoc = ProcessingDocumentFactory.getInstance()\n\t\t\t\t.makeTokenisedDocument(Tokeniser.getDefaultInstance(), doc);\n\t\t// Check that ProcDoc is not empty\n\t\tassertTrue(procDoc != null);\n\n\t\tList<NamedEntity> neList = recogniser.findNamedEntities(\n\t\t\t\tprocDoc.getTokenSequences(), resolutionMode);\n\t\t// Check that neList is not empty\n\t\tassertTrue(neList != null);\n\n\t\tList<String> actualSurfaceList = new ArrayList<String>();\n\t\tList<Object> actualProbList = new ArrayList<Object>();\n\t\tList<NamedEntityType> actualTypeList = new ArrayList<NamedEntityType>();\n\t\tfor (NamedEntity namedEntity : neList) {\n\t\t\t// Using a count to differentiate between duplicates in a list\n\t\t\tint count = 1;\n\t\t\tString surface = namedEntity.getSurface();\n\t\t\twhile (actualSurfaceList.contains(surface + \"_\"\n\t\t\t\t\t+ String.valueOf(count)))\n\t\t\t\tcount++;\n\n\t\t\tsurface = surface + \"_\" + String.valueOf(count);\n\t\t\tactualSurfaceList.add(surface);\n\t\t\tactualTypeList.add(namedEntity.getType());\n\t\t\tactualProbList.add(namedEntity.getConfidence());\n\n\t\t\t// Check if NamedEntity Surface is in the expectedSurfaceList\n\t\t\tassertTrue(surface + \" is a false positive \",\n\t\t\t\t\texpectedSurfaceList.contains(surface));\n\n\t\t\tif (expectedSurfaceList.contains(surface)) {\n\t\t\t\tint index = expectedSurfaceList.indexOf(surface);\n\t\t\t\tassertEquals(\"Type for \" + namedEntity.getSurface(),\n\t\t\t\t\t\texpectedTypeList.get(index), namedEntity.getType());\n\t\t\t\tif (!NamedEntityType.ONTOLOGY.isInstance(namedEntity.getType())\n && !NamedEntityType.LOCANTPREFIX.isInstance(namedEntity.getType())) {\n\t\t\t\t\tassertEquals(\n\t\t\t\t\t\t\t\"Probability for \" + namedEntity.getSurface(),\n\t\t\t\t\t\t\texpectedProbList.get(index),\n\t\t\t\t\t\t\t(Double) namedEntity.getConfidence(), 1E-15);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tfor (String string : expectedSurfaceList) {\n\t\t\tassertTrue(string + \" is a false negative \",\n\t\t\t\t\tactualSurfaceList.contains(string));\n\t\t}\n\n\t}", "protected void handleEntitiesIndividually() {\n\n\t\tfinal Set<Long> originalBatch = getUidsToLoad();\n\t\tfinal Set<Long> batchOfOne = new HashSet<Long>();\n\n\t\t/**\n\t\t * We replace the batch of all the uids with our own which we'll only put one uid at a time.\n\t\t */\n\t\tsetBatch(batchOfOne);\n\n\t\tLOG.info(\"Loading \" + originalBatch.size() + \" entities individually\");\n\n\t\tfor (final Long uid : originalBatch) {\n\n\t\t\ttry {\n\n\t\t\t\tbatchOfOne.clear();\n\t\t\t\tbatchOfOne.add(uid);\n\n\t\t\t\tfinal Collection<ENTITY> loadedEntity = loadBatch();\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_loaded_individually\", loadedEntity.size());\n\n\t\t\t\tfor (final ENTITY entity : loadedEntity) {\n\t\t\t\t\tgetNextStage().send(entity);\n\t\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_out\", 1);\n\n\t\t\t\t}\n\t\t\t} catch (final Exception e) {\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:individual_entity_loading_failures\", 1);\n\n\t\t\t\tLOG.error(\"Could not load entity with uid \" + uid + \" for indexing, this entity will not be indexed. \", e);\n\t\t\t}\n\n\t\t}\n\n\t\t/** Put the original set of uids back. */\n\t\tsetBatch(originalBatch);\n\n\t}", "@Override\n public InputSource resolveEntity(String publicId, String systemId)\n throws SAXException, IOException {\n\n if (isReference()) {\n return getRef().resolveEntity(publicId, systemId);\n }\n\n dieOnCircularReference();\n\n log(\"resolveEntity: '\" + publicId + \"': '\" + systemId + \"'\",\n Project.MSG_DEBUG);\n\n InputSource inputSource =\n getCatalogResolver().resolveEntity(publicId, systemId);\n\n if (inputSource == null) {\n log(\"No matching catalog entry found, parser will use: '\"\n + systemId + \"'\", Project.MSG_DEBUG);\n }\n\n return inputSource;\n }", "@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }", "public void infectedBy(GeneticCode infectingCode) {\n\t\t_infectedGeneticCode = infectingCode;\n\t\t_world.organismHasBeenInfected(this, null);\n\t}", "public void callFamiliar() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t} else {\n\t\t\tc.getPA().sendSummOrbDetails(false, \"\");\n\t\t}\n\n\t\tif (!canWalk()) {\n\t\t\tif (!c.getInstance().summoned.canTeleport) {\n\t\t\t\tc.getInstance().summoned.isDead = true;\n\t\t\t\tc.getInstance().summoned.applyDead = true;\n\t\t\t\tc.getInstance().summoned.actionTimer = 0;\n\t\t\t\tc.getInstance().summoned.updateRequired = true;\n\t\t\t\tc.sendMessage(\"Your monster needs more space to teleport.\");\n\t\t\t\tc.getInstance().summoned.canTeleport = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tc.getInstance().summonedCanTeleport = false;\n\t\tc.getInstance().summoned.killerId = 0;\n\t\tc.getInstance().summoned.underAttackBy = 0;\n\t\tc.getInstance().summoned.npcTeleport(0, 0, 0);\n\t\tc.getInstance().summoned.npcTeleport(c.absX, c.absY + (summonedFamiliar.large ? 2 : 1), c.heightLevel);\n\t\tc.getInstance().summoned.updateRequired = true;\n\t}", "@Override\n\tprotected Vector2f decide(final List<IPerceivable> _surroundingEntities) {\n\t\treturn null;// TODO\n\t}", "@Override\r\n public void detectAndSendChanges()\r\n {\r\n super.detectAndSendChanges();\r\n\r\n for (int i = 0; i < this.crafters.size(); ++i)\r\n {\r\n ICrafting icrafting = (ICrafting)this.crafters.get(i);\r\n\r\n }\r\n }", "private void filterOnAffordances(\n\t\t\tArrayList<SocialPractice> candidateSocialPractices) {\n\t\tIterator<SocialPractice> iter = candidateSocialPractices.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tSocialPractice sp = iter.next();\n\t\t\tboolean contextAffordsSP = false;\n\n\t\t\tfor (PContext affordance : sp.getAffordances()) {\n\n\t\t\t\t/* check affordance location matches with current location */\n\t\t\t\tLocation locationToCheck = affordance.getPhysical()\n\t\t\t\t\t\t.getMyLocation();\n\t\t\t\tLocation l = getMyLocation();\n\t\t\t\tif (getMyLocation().getClass() == locationToCheck.getClass())\n\t\t\t\t\tcontextAffordsSP = true;\n\t\t\t\t// TODO: change affordances to list of classes. Problem though,\n\t\t\t\t// it is a context object right now.\n\t\t\t\t/* check affordance social matches with current socialcontext */\n\t\t\t}\n\t\t\tif (!contextAffordsSP)\n\t\t\t\titer.remove();\n\t\t}\n\t}", "public InputSource resolveEntity(String publicId, String systemId) {\r\n Log.log(Log.WARNING,\r\n \"Blocked attempt to resolve external entity at {0}.\", systemId);\r\n return new InputSource(new ByteArrayInputStream(new byte[0]));\r\n }", "public void resolve(){\n logger.log(Level.FINE,attacker.getName()+\" withering attacked \"+defender.getName());\n AttackState state=new AttackState();\n state.weaponDamage=weapon.getDamage();\n state.initialAttackpool=baseAttackdice+baseAccuracy-woundpenalty;\n attacker.declareWitheringAttack(state); // If the attacker wants to change the pool, he modifies the state accordingly.\n defender.declareWitheringDV(state); // Defender declares their dv against this specific attack. This sets both initialdv and changedDv\n state.initialAttackRoll= new DiceThrow(state.changedAttackpool);\n attacker.modifyWitheringAttackRollAttacker(state); //This sets stuff like modifiedAttackRollAttacker and AttackerRollValuation\n defender.modifyWitheringAttackRollDefender(state); //This sets defender modifiedAttackRollDefender\n state.attackRollSuccesses=state.modifiedAttackRollDefender.evaluateResults(state.AttackRollValuationAttacker);\n state.threshholdSuccesses=state.attackRollSuccesses-state.changedDv;\n logger.log(Level.FINE,attacker.getName()+\" rolled \"+state.changedAttackpool+\" dice against \"+defender.getName()+\"'s dv of \"+state.changedDv+\" and gained \"+state.attackRollSuccesses+\" successes.\");\n attacker.changeWitheringThreshholdAttacker(state); //This sets thresholdModifiedAttacker\n defender.changeWitheringThreshholdDefender(state); //This sets thresholdModifiedDefender\n if(state.thresholdModifiedDefender>=0) {\n logger.log(Level.FINE,attacker.getName()+\" hit \"+defender.getName()+\" with \"+state.thresholdModifiedDefender+\" threshhold successes.\");\n attacker.modifyWitheringRawDamageAttacker(state); //Sets normal raw damageType, based on strength and weapon damageType, and then sets rawDamagemModifiedAttacker\n defender.modifyWitheringRawDamageDefender(state); //this sets rawDamageModifiedDefender, and sets up the various soak values, so natural soak and armor soak.\n logger.log(Level.FINE, \"The raw damage of the attack is: \"+state.rawDamageModifiedDefender);\n state.totalSoak = Math.max(state.defenderArmorSoak - ignoredArmorSoak, 0) + state.defenderNaturalSoak; //\n attacker.modifyTotalSoakAttacker(state); //This sets totalSoakmodifiedAttacker. Don't think this actually has support in the solar charmset, but giving opportunities to work with.\n defender.modifyTotalSoakDefender(state); // This sets totalSoakmodifiedDefender.\n state.postSoakSuccesses=Math.max(state.rawDamageModifiedDefender-state.totalSoakModifiedDefender,weapon.getOverwhelming());\n logger.log(Level.FINE,state.totalSoakModifiedDefender+\" damage is soaked, leading to post soak dice of \"+state.postSoakSuccesses);\n attacker.declarePostSoakAttacker(state); //sets postSoakSuccessesModifiedAttacker\n defender.declarePostSoakDefender(state); //sets postSoakSuccessesModifiedDefender\n DiceThrow droll=new DiceThrow(state.postSoakSuccessesModifiedDefender);\n state.damageRoll=droll;\n attacker.modifyWitheringDamageRollAttacker(state); //sets damageRollmodifiedAttacker and damageRollvValuation\n defender.modifyWitheringDamageRollDefender(state); //sets damageRollmodifiedDefender\n state.initiativeDamageDone=state.damageRollModifiedDefender.evaluateResults(state.damageRollValuation);\n logger.log(Level.FINE,attacker.getName()+\" rolls \"+state.postSoakSuccessesModifiedDefender+\" dice and achieves \"+state.initiativeDamageDone+\" successes.\");\n attacker.modifyInitiativeDamageAttacker(state);\n defender.modifyInitiativeDamageDefender(state); //Since this is the last change of initiative, we can check whether the defender was crashed here.\n attacker.updateInitiativeAttacker(state);\n defender.updateInitiativeDefender(state);//Here we should handle all the initiative changes respectively, with checking if people are crashed etc.\n }\n else{\n attacker.failedWitheringAttackAttacker(state);\n defender.failedWitheringAttackDefender(state);\n }\n\n }", "public void attack() {\n //Grab an attacker.\n Territory attacker = potentialAttackers.remove(0);\n \n //Find the weakest adjacent territory\n int victimStrength = Integer.MAX_VALUE;\n Territory victim = null;\n List<Territory> adjs = gameController.getBoard().getAdjacentTerritories(attacker);\n for(Territory adj : adjs){\n \n //Verify that our odds are good enough for this attack to consider it.\n int aTroops = attacker.getNumTroops() - 1;\n int dTroops = adj.getNumTroops();\n double odds = MarkovLookupTable.getOddsOfSuccessfulAttack(aTroops, dTroops);\n boolean yes = Double.compare(odds, ACCEPTABLE_RISK) >= 0;\n \n //If we have a chance of winning this fight and its the weakest opponent.\n if(yes && adj.getNumTroops() < victimStrength && !adj.getOwner().equals(this)){\n victim = adj;\n victimStrength = adj.getNumTroops();\n }\n }\n \n //Resolve the Attack by building forces and settle the winner in Victim's land\n Force atkForce = attacker.buildForce(attacker.getNumTroops() - 1);\n Force defForce = victim.buildForce(victimStrength); //Guaranteed not null\n Force winner = atkForce.attack(defForce);\n victim.settleForce(winner);\n }", "private static void explore(\n final Deque<AbstractEntity<?>> frontier, \n final Set<String> explored) {\n \n if (frontier.isEmpty()) {\n throw new DefinersExecutorException(\"There is nothing to process.\");\n }\n\n final AbstractEntity<?> entity = frontier.pop();\n final String identity = getEntityIdentity(entity);\n if (explored.contains(identity) || !entity.isInstrumented()) {\n return;\n }\n\n if (!entity.isInitialising()) {\n throw new DefinersExecutorException(format(\"Entity [%s] of type [%s] is not in the 'initialising' phase.\", entity, entity.getClass()));\n }\n \n explored.add(identity);\n\n final boolean isEntityPersisted = entity.isPersisted();\n\n // FIXME please, consider applicability of the following logic (legacy code from EntityUtils.handleMetaProperties method):\n //------------------------------------------------------------------\n // if (!unionEntity && instance.getProperties().containsKey(\"key\")) {\n // final Object keyValue = instance.get(\"key\");\n // if (keyValue != null) {\n // // handle property \"key\" assignment\n // instance.set(\"key\", keyValue);\n // }\n // }\n //------------------------------------------------------------------\n\n // collect properties to process\n final Map<Boolean, List<Field>> propFieldsToProcess = streamRealProperties(entity.getType())\n .filter(field -> !isPropertyProxied(entity, field.getName()) && !isCritOnlySingle(entity.getType(), field.getName()) )\n .collect(partitioningBy(field -> isValueProxied(entity, field)));\n\n // process original values of properties that have id-only-proxy value if the entity is instrumented and persisted\n if (isEntityPersisted) {\n final List<Field> idOnlyProxyPropFields = propFieldsToProcess.get(true);\n for (final Field propField : idOnlyProxyPropFields) {\n final String propName = propField.getName();\n final Object propertyValue = entity.get(propName);\n entity.getProperty(propName).setOriginalValue(propertyValue);\n }\n }\n\n // process non-proxied properties, which excludes non-proxied properties that have id-only-proxy values\n final List<Field> nonProxiedPropFields = propFieldsToProcess.get(false);\n for (final Field propField : nonProxiedPropFields) {\n final String propName = propField.getName();\n final boolean isEntity = AbstractEntity.class.isAssignableFrom(propField.getType());\n final boolean isCollectional = Collection.class.isAssignableFrom(propField.getType());\n\n final Object propertyValue = entity.get(propName);\n\n if (isCollectional) { // handle collectional properties\n if (propertyValue != null) {\n final Collection<?> collection = (Collection<?>) propertyValue;\n for (final Object item: collection) {\n if (item != null && item instanceof AbstractEntity) {\n final AbstractEntity<?> value = (AbstractEntity<?>) item;\n frontier.push(value);\n explore(frontier, explored);\n }\n }\n }\n } else if (isEntity) { // handle entity-typed properties\n if (propertyValue != null) {\n final AbstractEntity<?> value = (AbstractEntity<?>) propertyValue;\n // produce fetch\n frontier.push(value);\n explore(frontier, explored);\n }\n }\n \n // original values and execution of ACE handlers is relevant only for instrumented entities\n handleOriginalValueAndACE(entity.getProperty(propName), propertyValue, isEntityPersisted);\n }\n\n entity.endInitialising();\n }", "public void infect()\n\t{\n\t\t//\tuse a traditional for loop here\n\t\tint maxHuman = humans.size();\n\t\tfor( int i=0; i<maxHuman; i++ )\n\t\t{\n\t\t\tif( humans.get(i).getInfect() )\n\t\t\t{\n\t\t\t\t//\tadd a zombie\n\t\t\t\tzombies.add( new Zombie(humans.get(i).x,humans.get(i).y,humans.get(i).facing,dp,humans.get(i).type));\n\t\t\t\thumans.remove(i);\n\n\t\t\t\t//\thandle indexes correctly to avoid a fault\n\t\t\t\tmaxHuman--;\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t}", "public static void checkForPeopleInShelters() {\n\t\tfor(int i=0; i<vertexMatrix.length; i++){\n\t\t\tif (shelters[i])\n\t\t\t\tpeopleToSave[i]=0;\t\t\n\t\t}\n\t}", "public void infect() {\n\t\tPlagueAgent current = this;\n\t\tif (!current.infected) {\n\t\t\tfor (PlagueAgent a : plagueWorld.getNeighbors(current, 5)) {\n\t\t\t\tif (a.infected) {\n\t\t\t\t\tint luck = Utilities.rng.nextInt(100);\n\t\t\t\t\tif (luck < plagueWorld.VIRULENCE) {\n\t\t\t\t\t\tthis.infected = true;\n\t\t\t\t\t\tplagueWorld.newInfection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplagueWorld.changed();\n\t}", "public static CraftEntity getEntity(CraftServer server, Entity entity) {\n/* 199 */ if (entity instanceof EntityLiving)\n/* */ \n/* 201 */ { if (entity instanceof EntityHuman) {\n/* 202 */ if (entity instanceof EntityPlayer) return new CraftPlayer(server, (EntityPlayer)entity); \n/* 203 */ return new CraftHumanEntity(server, (EntityHuman)entity);\n/* */ } \n/* */ \n/* 206 */ if (entity instanceof EntityWaterAnimal) {\n/* 207 */ if (entity instanceof EntitySquid) return new CraftSquid(server, (EntitySquid)entity); \n/* 208 */ if (entity instanceof EntityFish) {\n/* 209 */ if (entity instanceof EntityCod) return new CraftCod(server, (EntityCod)entity); \n/* 210 */ if (entity instanceof EntityPufferFish) return new CraftPufferFish(server, (EntityPufferFish)entity); \n/* 211 */ if (entity instanceof EntitySalmon) return new CraftSalmon(server, (EntitySalmon)entity); \n/* 212 */ if (entity instanceof EntityTropicalFish) return new CraftTropicalFish(server, (EntityTropicalFish)entity); \n/* 213 */ return new CraftFish(server, (EntityFish)entity);\n/* */ } \n/* 215 */ if (entity instanceof EntityDolphin) return new CraftDolphin(server, (EntityDolphin)entity); \n/* 216 */ return new CraftWaterMob(server, (EntityWaterAnimal)entity);\n/* */ } \n/* 218 */ if (entity instanceof EntityCreature)\n/* */ \n/* 220 */ { if (entity instanceof EntityAnimal)\n/* 221 */ { if (entity instanceof EntityChicken) return new CraftChicken(server, (EntityChicken)entity); \n/* 222 */ if (entity instanceof EntityCow) {\n/* 223 */ if (entity instanceof EntityMushroomCow) return new CraftMushroomCow(server, (EntityMushroomCow)entity); \n/* 224 */ return new CraftCow(server, (EntityCow)entity);\n/* */ } \n/* 226 */ if (entity instanceof EntityPig) return new CraftPig(server, (EntityPig)entity); \n/* 227 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityTameableAnimal) {\n/* 228 */ if (entity instanceof EntityWolf) return new CraftWolf(server, (EntityWolf)entity); \n/* 229 */ if (entity instanceof EntityCat) return new CraftCat(server, (EntityCat)entity); \n/* 230 */ if (entity instanceof EntityParrot) return new CraftParrot(server, (EntityParrot)entity); \n/* */ } else {\n/* 232 */ if (entity instanceof EntitySheep) return new CraftSheep(server, (EntitySheep)entity); \n/* 233 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseAbstract)\n/* 234 */ { if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseChestedAbstract)\n/* 235 */ { if (entity instanceof EntityHorseDonkey) return new CraftDonkey(server, (EntityHorseDonkey)entity); \n/* 236 */ if (entity instanceof EntityHorseMule) return new CraftMule(server, (EntityHorseMule)entity); \n/* 237 */ if (entity instanceof EntityLlamaTrader) return new CraftTraderLlama(server, (EntityLlamaTrader)entity); \n/* 238 */ if (entity instanceof EntityLlama) return new CraftLlama(server, (EntityLlama)entity); }\n/* 239 */ else { if (entity instanceof EntityHorse) return new CraftHorse(server, (EntityHorse)entity); \n/* 240 */ if (entity instanceof EntityHorseSkeleton) return new CraftSkeletonHorse(server, (EntityHorseSkeleton)entity); \n/* 241 */ if (entity instanceof EntityHorseZombie) return new CraftZombieHorse(server, (EntityHorseZombie)entity); }\n/* */ }\n/* 243 */ else { if (entity instanceof EntityRabbit) return new CraftRabbit(server, (EntityRabbit)entity); \n/* 244 */ if (entity instanceof EntityPolarBear) return new CraftPolarBear(server, (EntityPolarBear)entity); \n/* 245 */ if (entity instanceof EntityTurtle) return new CraftTurtle(server, (EntityTurtle)entity); \n/* 246 */ if (entity instanceof EntityOcelot) return new CraftOcelot(server, (EntityOcelot)entity); \n/* 247 */ if (entity instanceof EntityPanda) return new CraftPanda(server, (EntityPanda)entity); \n/* 248 */ if (entity instanceof EntityFox) return new CraftFox(server, (EntityFox)entity); \n/* 249 */ if (entity instanceof EntityBee) return new CraftBee(server, (EntityBee)entity); \n/* 250 */ if (entity instanceof EntityHoglin) return new CraftHoglin(server, (EntityHoglin)entity); \n/* 251 */ if (entity instanceof EntityStrider) return new CraftStrider(server, (EntityStrider)entity); \n/* 252 */ return new CraftAnimals(server, (EntityAnimal)entity); }\n/* */ \n/* */ } }\n/* 255 */ else { if (entity instanceof EntityMonster) {\n/* 256 */ if (entity instanceof EntityZombie) {\n/* 257 */ if (entity instanceof EntityPigZombie) return new CraftPigZombie(server, (EntityPigZombie)entity); \n/* 258 */ if (entity instanceof EntityZombieHusk) return new CraftHusk(server, (EntityZombieHusk)entity); \n/* 259 */ if (entity instanceof EntityZombieVillager) return new CraftVillagerZombie(server, (EntityZombieVillager)entity); \n/* 260 */ if (entity instanceof EntityDrowned) return new CraftDrowned(server, (EntityDrowned)entity); \n/* 261 */ return new CraftZombie(server, (EntityZombie)entity);\n/* */ } \n/* 263 */ if (entity instanceof EntityCreeper) return new CraftCreeper(server, (EntityCreeper)entity); \n/* 264 */ if (entity instanceof EntityEnderman) return new CraftEnderman(server, (EntityEnderman)entity); \n/* 265 */ if (entity instanceof EntitySilverfish) return new CraftSilverfish(server, (EntitySilverfish)entity); \n/* 266 */ if (entity instanceof EntityGiantZombie) return new CraftGiant(server, (EntityGiantZombie)entity); \n/* 267 */ if (entity instanceof EntitySkeletonAbstract) {\n/* 268 */ if (entity instanceof EntitySkeletonStray) return new CraftStray(server, (EntitySkeletonStray)entity); \n/* 269 */ if (entity instanceof EntitySkeletonWither) return new CraftWitherSkeleton(server, (EntitySkeletonWither)entity); \n/* 270 */ return new CraftSkeleton(server, (EntitySkeletonAbstract)entity);\n/* */ } \n/* 272 */ if (entity instanceof EntityBlaze) return new CraftBlaze(server, (EntityBlaze)entity); \n/* 273 */ if (entity instanceof EntityWitch) return new CraftWitch(server, (EntityWitch)entity); \n/* 274 */ if (entity instanceof EntityWither) return new CraftWither(server, (EntityWither)entity); \n/* 275 */ if (entity instanceof EntitySpider) {\n/* 276 */ if (entity instanceof EntityCaveSpider) return new CraftCaveSpider(server, (EntityCaveSpider)entity); \n/* 277 */ return new CraftSpider(server, (EntitySpider)entity);\n/* */ } \n/* 279 */ if (entity instanceof EntityEndermite) return new CraftEndermite(server, (EntityEndermite)entity); \n/* 280 */ if (entity instanceof EntityGuardian) {\n/* 281 */ if (entity instanceof EntityGuardianElder) return new CraftElderGuardian(server, (EntityGuardianElder)entity); \n/* 282 */ return new CraftGuardian(server, (EntityGuardian)entity);\n/* */ } \n/* 284 */ if (entity instanceof EntityVex) return new CraftVex(server, (EntityVex)entity); \n/* 285 */ if (entity instanceof EntityIllagerAbstract) {\n/* 286 */ if (entity instanceof EntityIllagerWizard) {\n/* 287 */ if (entity instanceof EntityEvoker) return new CraftEvoker(server, (EntityEvoker)entity); \n/* 288 */ if (entity instanceof EntityIllagerIllusioner) return new CraftIllusioner(server, (EntityIllagerIllusioner)entity); \n/* 289 */ return new CraftSpellcaster(server, (EntityIllagerWizard)entity);\n/* */ } \n/* 291 */ if (entity instanceof EntityVindicator) return new CraftVindicator(server, (EntityVindicator)entity); \n/* 292 */ if (entity instanceof EntityPillager) return new CraftPillager(server, (EntityPillager)entity); \n/* 293 */ return new CraftIllager(server, (EntityIllagerAbstract)entity);\n/* */ } \n/* 295 */ if (entity instanceof EntityRavager) return new CraftRavager(server, (EntityRavager)entity); \n/* 296 */ if (entity instanceof EntityPiglinAbstract) {\n/* 297 */ if (entity instanceof EntityPiglin) return new CraftPiglin(server, (EntityPiglin)entity); \n/* 298 */ if (entity instanceof EntityPiglinBrute) return new CraftPiglinBrute(server, (EntityPiglinBrute)entity); \n/* 299 */ return new CraftPiglinAbstract(server, (EntityPiglinAbstract)entity);\n/* */ } \n/* 301 */ if (entity instanceof EntityZoglin) return new CraftZoglin(server, (EntityZoglin)entity);\n/* */ \n/* 303 */ return new CraftMonster(server, (EntityMonster)entity);\n/* */ } \n/* 305 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityGolem) {\n/* 306 */ if (entity instanceof EntitySnowman) return new CraftSnowman(server, (EntitySnowman)entity); \n/* 307 */ if (entity instanceof EntityIronGolem) return new CraftIronGolem(server, (EntityIronGolem)entity); \n/* 308 */ if (entity instanceof EntityShulker) return new CraftShulker(server, (EntityShulker)entity); \n/* */ } else {\n/* 310 */ if (entity instanceof EntityVillagerAbstract) {\n/* 311 */ if (entity instanceof EntityVillager) return new CraftVillager(server, (EntityVillager)entity); \n/* 312 */ if (entity instanceof EntityVillagerTrader) return new CraftWanderingTrader(server, (EntityVillagerTrader)entity); \n/* 313 */ return new CraftAbstractVillager(server, (EntityVillagerAbstract)entity);\n/* */ } \n/* 315 */ return new CraftCreature(server, (EntityCreature)entity);\n/* */ } }\n/* */ }\n/* 318 */ else { if (entity instanceof EntitySlime) {\n/* 319 */ if (entity instanceof EntityMagmaCube) return new CraftMagmaCube(server, (EntityMagmaCube)entity); \n/* 320 */ return new CraftSlime(server, (EntitySlime)entity);\n/* */ } \n/* */ \n/* 323 */ if (entity instanceof EntityFlying) {\n/* 324 */ if (entity instanceof EntityGhast) return new CraftGhast(server, (EntityGhast)entity); \n/* 325 */ if (entity instanceof EntityPhantom) return new CraftPhantom(server, (EntityPhantom)entity); \n/* 326 */ return new CraftFlying(server, (EntityFlying)entity);\n/* */ } \n/* 328 */ if (entity instanceof EntityEnderDragon) {\n/* 329 */ return new CraftEnderDragon(server, (EntityEnderDragon)entity);\n/* */ }\n/* */ \n/* 332 */ if (entity instanceof EntityAmbient) {\n/* 333 */ if (entity instanceof EntityBat) return new CraftBat(server, (EntityBat)entity); \n/* 334 */ return new CraftAmbient(server, (EntityAmbient)entity);\n/* */ } \n/* 336 */ if (entity instanceof EntityArmorStand) return new CraftArmorStand(server, (EntityArmorStand)entity); \n/* 337 */ return new CraftLivingEntity(server, (EntityLiving)entity); }\n/* */ }\n/* 339 */ else { if (entity instanceof EntityComplexPart) {\n/* 340 */ EntityComplexPart part = (EntityComplexPart)entity;\n/* 341 */ if (part.owner instanceof EntityEnderDragon) return new CraftEnderDragonPart(server, (EntityComplexPart)entity); \n/* 342 */ return new CraftComplexPart(server, (EntityComplexPart)entity);\n/* */ } \n/* 344 */ if (entity instanceof EntityExperienceOrb) return new CraftExperienceOrb(server, (EntityExperienceOrb)entity); \n/* 345 */ if (entity instanceof EntityTippedArrow) return new CraftTippedArrow(server, (EntityTippedArrow)entity); \n/* 346 */ if (entity instanceof EntitySpectralArrow) return new CraftSpectralArrow(server, (EntitySpectralArrow)entity); \n/* 347 */ if (entity instanceof EntityArrow) {\n/* 348 */ if (entity instanceof EntityThrownTrident) return new CraftTrident(server, (EntityThrownTrident)entity); \n/* 349 */ return new CraftArrow(server, (EntityArrow)entity);\n/* */ } \n/* 351 */ if (entity instanceof EntityBoat) return new CraftBoat(server, (EntityBoat)entity); \n/* 352 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityProjectile) {\n/* 353 */ if (entity instanceof EntityEgg) return new CraftEgg(server, (EntityEgg)entity); \n/* 354 */ if (entity instanceof EntitySnowball) return new CraftSnowball(server, (EntitySnowball)entity); \n/* 355 */ if (entity instanceof EntityPotion) return new CraftThrownPotion(server, (EntityPotion)entity); \n/* 356 */ if (entity instanceof EntityEnderPearl) return new CraftEnderPearl(server, (EntityEnderPearl)entity); \n/* 357 */ if (entity instanceof EntityThrownExpBottle) return new CraftThrownExpBottle(server, (EntityThrownExpBottle)entity); \n/* */ } else {\n/* 359 */ if (entity instanceof EntityFallingBlock) return new CraftFallingBlock(server, (EntityFallingBlock)entity); \n/* 360 */ if (entity instanceof EntityFireball) {\n/* 361 */ if (entity instanceof EntitySmallFireball) return new CraftSmallFireball(server, (EntitySmallFireball)entity); \n/* 362 */ if (entity instanceof EntityLargeFireball) return new CraftLargeFireball(server, (EntityLargeFireball)entity); \n/* 363 */ if (entity instanceof EntityWitherSkull) return new CraftWitherSkull(server, (EntityWitherSkull)entity); \n/* 364 */ if (entity instanceof EntityDragonFireball) return new CraftDragonFireball(server, (EntityDragonFireball)entity); \n/* 365 */ return new CraftFireball(server, (EntityFireball)entity);\n/* */ } \n/* 367 */ if (entity instanceof EntityEnderSignal) return new CraftEnderSignal(server, (EntityEnderSignal)entity); \n/* 368 */ if (entity instanceof EntityEnderCrystal) return new CraftEnderCrystal(server, (EntityEnderCrystal)entity); \n/* 369 */ if (entity instanceof EntityFishingHook) return new CraftFishHook(server, (EntityFishingHook)entity); \n/* 370 */ if (entity instanceof EntityItem) return new CraftItem(server, (EntityItem)entity); \n/* 371 */ if (entity instanceof EntityLightning) return new CraftLightningStrike(server, (EntityLightning)entity); \n/* 372 */ if (entity instanceof EntityMinecartAbstract)\n/* 373 */ { if (entity instanceof EntityMinecartFurnace) return new CraftMinecartFurnace(server, (EntityMinecartFurnace)entity); \n/* 374 */ if (entity instanceof EntityMinecartChest) return new CraftMinecartChest(server, (EntityMinecartChest)entity); \n/* 375 */ if (entity instanceof EntityMinecartTNT) return new CraftMinecartTNT(server, (EntityMinecartTNT)entity); \n/* 376 */ if (entity instanceof EntityMinecartHopper) return new CraftMinecartHopper(server, (EntityMinecartHopper)entity); \n/* 377 */ if (entity instanceof EntityMinecartMobSpawner) return new CraftMinecartMobSpawner(server, (EntityMinecartMobSpawner)entity); \n/* 378 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityMinecartRideable) return new CraftMinecartRideable(server, (EntityMinecartAbstract)entity); \n/* 379 */ if (entity instanceof EntityMinecartCommandBlock) return new CraftMinecartCommand(server, (EntityMinecartCommandBlock)entity); }\n/* 380 */ else { if (entity instanceof EntityHanging) {\n/* 381 */ if (entity instanceof EntityPainting) return new CraftPainting(server, (EntityPainting)entity); \n/* 382 */ if (entity instanceof EntityItemFrame) return new CraftItemFrame(server, (EntityItemFrame)entity); \n/* 383 */ if (entity instanceof EntityLeash) return new CraftLeash(server, (EntityLeash)entity); \n/* 384 */ return new CraftHanging(server, (EntityHanging)entity);\n/* */ } \n/* 386 */ if (entity instanceof EntityTNTPrimed) return new CraftTNTPrimed(server, (EntityTNTPrimed)entity); \n/* 387 */ if (entity instanceof EntityFireworks) return new CraftFirework(server, (EntityFireworks)entity); \n/* 388 */ if (entity instanceof EntityShulkerBullet) return new CraftShulkerBullet(server, (EntityShulkerBullet)entity); \n/* 389 */ if (entity instanceof EntityAreaEffectCloud) return new CraftAreaEffectCloud(server, (EntityAreaEffectCloud)entity); \n/* 390 */ if (entity instanceof EntityEvokerFangs) return new CraftEvokerFangs(server, (EntityEvokerFangs)entity); \n/* 391 */ if (entity instanceof EntityLlamaSpit) return new CraftLlamaSpit(server, (EntityLlamaSpit)entity); }\n/* */ \n/* */ } }\n/* 394 */ throw new AssertionError(\"Unknown entity \" + ((entity == null) ? null : entity.getClass()));\n/* */ }", "public void checkInflected(Individual other)\n\t{\n\t\tdouble probability = world.getSpreadingFactor() * (1+(Math.max(other.getConversationTime(), getConversationTime()) / 10))\n\t\t\t\t* getMaskIndicator() * other.getMaskIndicator() * (1-(Math.min(other.getSocialDistance(), getSocialDistance()) / 10));\n\t\tif(Math.min(probability, 1) > 0.3)\n\t\t\tgetCovid();\n\t\t\t\n\t}", "public void pickupDevelopmentCardFromTower(Player player, FamilyMemberColor familyMemberColor, int servants, int indexTower, int indexCell, InformationCallback informationCallback) throws GameException{\n Tower tower = this.mainBoard.getTower(indexTower);\n TowerCell cell = tower.getTowerCell(indexCell);\n\n if(player.getPersonalBoard().getValuables().getResources().get(ResourceType.SERVANT) < servants)\n throw new GameException(GameErrorType.FAMILY_MEMBER_DICE_VALUE);\n\n int servantsValue = servants/player.getPersonalBoard().getExcommunicationValues().getNumberOfSlaves();\n\n LeaderCard leaderCardBrunelleschi = player.getPersonalBoard().getLeaderCardWithName(\"Filippo Brunelleschi\");\n\n if (cell.getPlayerNicknameInTheCell() == null || player.getPersonalBoard().getAlwaysPlaceFamilyMemberInsideActionSpace()){\n\n tower.familyMemberCanBePlaced(player, familyMemberColor);\n\n updateFamilyMemberValue(player, familyMemberColor, servantsValue);\n\n try {\n cell.familyMemberCanBePlaced(player, familyMemberColor);\n\n if (!tower.isFree() && (leaderCardBrunelleschi == null || !leaderCardBrunelleschi.getLeaderEffectActive())) {\n if(player.getPersonalBoard().getValuables().getResources().get(ResourceType.COIN) >= 3)\n player.getPersonalBoard().getValuables().decrease(ResourceType.COIN, 3);\n else\n throw new GameException(GameErrorType.TOWER_COST);\n }\n\n cell.developmentCardCanBeBought(player, informationCallback);\n\n DevelopmentCard card = cell.getDevelopmentCard();\n this.payValuablesToGetDevelopmentCard(player, card, informationCallback);\n\n player.getPersonalBoard().addCard(card);\n if(card.getImmediateEffect() != null)\n card.getImmediateEffect().runEffect(player,informationCallback);\n if(card.getColor().equals(DevelopmentCardColor.BLUE) && card.getPermanentEffect() != null)\n card.getPermanentEffect().runEffect(player, informationCallback);\n\n if(cell.getTowerCellImmediateEffect() != null && canRunTowerImmediateEffects(player, indexCell))\n cell.getTowerCellImmediateEffect().runEffect(player, informationCallback);\n\n player.getPersonalBoard().setFamilyMembersUsed(familyMemberColor);\n\n cell.setPlayerNicknameInTheCell(player.getUsername());\n } catch (GameException e){\n restoreFamilyMemberValue(player, familyMemberColor, servantsValue);\n\n if (!tower.isFree() && (leaderCardBrunelleschi == null || !leaderCardBrunelleschi.getLeaderEffectActive()) && !e.getError().equals(GameErrorType.TOWER_COST))\n player.getPersonalBoard().getValuables().increase(ResourceType.COIN, 3);\n throw e;\n }\n } else {\n throw new GameException(GameErrorType.TOWER_CELL_BUSY);\n }\n }", "private ArrayList<SocialPractice> filterOnTriggers(\n\t\t\tArrayList<SocialPractice> candidateSocialPractices) {\n\t\tArrayList<SocialPractice> newCandidates=new ArrayList<SocialPractice>();\n\t\thabitStrengths.clear();\n\t\thabitStrengthsWeighted.clear();\n\t\t\n\t\tRandomHelper.createNormal(1, 0.5);\n\t\tdouble randomAttention = Math.min(2, Math.max(0, RandomHelper.getNormal().nextDouble()));\n\t\tRandomHelper.createNormal(1, 0.25);\n\t\t\n\t\tfor(SocialPractice sp:mySocialPractices){\n\t\t\t\tdouble HI =sp.calculateFrequency(myContext,getOCweight());\n\t\t\t\tdouble ro = CFG.getEvaluationCorrelation();\n\t\t\t\t//Ro moet nog negatief!\n\t\t\t\tdouble evaluation = sp.calculateEvaluation(myContext, CFG.OUTSIDE_CONTEXT(getOCweight()));\n\t\t\t\tdouble EVvalue =\n\t\t\t\t\t\t\t((ro * evaluation)+\n\t\t\t\t\t\t\t(Math.sqrt(1-(ro*ro)) * randomAttention));\n\t\t\t\tdouble Attention = 2- Helper.normalize(EVvalue, 1, 0.5);\n\t\t\t\tdouble habitThreshold = CFG.HTR(getHabitWeight());\n\t\t\t\t\n\t\t\t\tif(HI > Attention * habitThreshold) newCandidates.add(sp);\n\t\t\t\t\n\t\t\t\t//System.out.println(sp.getClass() + \"HI\"+ HI + \"Thr:\" + Attention*habitThreshold);\n\t\t\t\t//System.out.println(sp.getClass() + \"EV\"+ evaluation + \"Attention:\" + Attention + \"HW\"+ getHabitWeight());\n\t\t\t\t//data\n\t\t\t\thabitStrengths.put(sp, HI);\n\t\t\t\thabitStrengthsWeighted.put(sp, habitStrengths.get(sp) - CFG.HTR(getHabitWeight()));//data\n\t\t\t}\n\t\t//Data\n\t\thabitStrengthsMeat.put(CFG.getTime(),dataHabitStrength(MeatEatingPractice.class));//For Data purposes\n\t\treturn newCandidates;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//System.out.println(\"HI\"+ pair.getValue() + \"EV:\" + getEvaluationInContext());\n\t\t//System.out.println(\"HTR\"+ CFG.HTR(1) + \"HW\"+ getHabitWeight() + \"Attention\" + attention);\n\t\t\n\t\t\n\t\t//Entry<ArrayList<SocialPractice>, Double> pair = relativeHabitFilter(habitStrengths);\n//\t\tif(pair.getValue() * \n//\t\t\t\tpair.getKey().get(0).calculateEvaluation(myContext, CFG.OUTSIDE_CONTEXT(getOCweight())) //NB:Kan alleen nu omdat er twee practices zijn.\n//\t\t\t\t> CFG.HTR(getHabitWeight())*attention){\n//\t\t\t\n//\t\t\t//System.out.println(\"I agentnr. \" + getID() + \" am doing a\" + pair.getKey().get(0) + \"habit at tick: \" + CFG.getTime());\n//\t\t\t\n//\t\t\tnewCandidates = pair.getKey();\n//\t\t}\n//\t\treturn newCandidates;\n\t}", "void findInstantiations (final Buffers buffers)\n\t{\n\t\tbuffers.removeDecayedChunks();\n\n\t\tHashSet<Instantiation> set = new HashSet<Instantiation>();\n\t\tbuffers.sortGoals();\n\n\t\tif (buffers.numGoals() == 0)\n\t\t{\n for (Production p : productions.values()) {\n Instantiation inst = p.instantiate(buffers);\n if (inst != null) set.add(inst);\n }\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i=0 ; set.isEmpty() && i<buffers.numGoals() ; i++)\n\t\t\t{\n\t\t\t\tbuffers.tryGoal (i);\n\t\t\t\tif (threadedCognitionTrace)\n\t\t\t\t\tmodel.output (\"*** (tct) trying goal \" + buffers.get(Symbol.goal));\n for (Production p : productions.values()) {\n Instantiation inst = p.instantiate(buffers);\n if (inst != null) set.add(inst);\n }\n\t\t\t}\n\t\t}\n\n\t\tif (threadedCognitionTrace)\n\t\t\tmodel.output (\"*** (tct) found \"+set.size()+\" match\"+(set.size()==1 ? \"\" : \"es\"));\n\n\t\tif (!set.isEmpty())\n\t\t{\n\t\t\tif (conflictSetTrace) model.output (\"Conflict Set:\");\n\t\t\tIterator<Instantiation> itInst = set.iterator();\n\t\t\tInstantiation highestU = itInst.next();\n\t\t\tif (conflictSetTrace) model.output (\"* (\" + String.format(\"%.3f\",highestU.getUtility()) + \") \" + highestU);\n\t\t\twhile (itInst.hasNext())\n\t\t\t{\n\t\t\t\tInstantiation inst = itInst.next();\n\t\t\t\tif (conflictSetTrace) model.output (\"* (\" + String.format(\"%.3f\",inst.getUtility()) + \") \" + inst);\n\t\t\t\tif (inst.getUtility() > highestU.getUtility()) highestU = inst;\n\t\t\t}\n\n\t\t\tfinal Instantiation finalInst = highestU;\n\t\t\tif (conflictSetTrace) model.output (\"-> (\" + String.format(\"%.3f\",finalInst.getUtility()) + \") \" + finalInst);\n\n\t\t\tif (finalInst.getProduction().isBreakPoint())\n\t\t\t{\n\t\t\t\tmodel.addEvent (new Event (model.getTime() + .049,\n\t\t\t\t\t\t\"procedural\", \"about to fire \" + finalInst.getProduction().getName().getString().toUpperCase())\n\t\t\t\t{\n\t\t\t\t\tpublic void action() {\n\t\t\t\t\t\tmodel.output (\"------\", \"break\");\n\t\t\t\t\t\tmodel.stop();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tString extra = \"\";\n\t\t\tif (buffers.numGoals() > 1)\n\t\t\t{\n\t\t\t\tChunk goal = buffers.get(Symbol.goal);\n\t\t\t\textra = \" [\" + ((goal!=null) ? goal.getName().getString() : \"nil\") + \"]\";\n\t\t\t}\n\n\t\t\tmodel.addEvent (new Event (model.getTime() + .050,\n\t\t\t\t\t\"procedural\", \"** \" + finalInst.getProduction().getName().getString().toUpperCase() + \" **\" + extra)\n\t\t\t{\n\t\t\t\tpublic void action() {\n\t\t\t\t\tfire (finalInst, buffers);\n\t\t\t\t\tfindInstantiations (buffers);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "default void recover(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.RECOVERED, count);\n }", "@Override\n public InputSource resolveEntity (final String _publicId,\n final String _systemId)\n throws IOException, SAXException\n {\n return new InputSource(new StringReader(\"\"));\n }", "GameObject findSeaweed(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Seaweed)return g;\r\n\t\t}\r\n\treturn nullSeaweed;\r\n\t}", "@Override\n public boolean shouldRiderSit()\n {\n return entityData.get(SHOULD_SIT);\n }", "private FlowAbstraction isInTaintedSet(Object o, Set<FlowAbstraction> taintedSet) {\n for (Iterator<FlowAbstraction> iterator = taintedSet.iterator(); iterator.hasNext();) {\n FlowAbstraction taint = iterator.next();\n \n if(o instanceof Local) {\n if(taint.getLocal() != null && taint.getLocal().equals(o)) {\n return taint;\n }\n } else if(o instanceof FieldRef) {\n SootField f = ((FieldRef)o).getField();\n if(taint.getField() != null && taint.getField().equals(f)) {\n return taint;\n }\n }\n }\n return null;\n }", "@Override\n\tprotected void onImpact(MovingObjectPosition p_70184_1_) {\n\t\tif (p_70184_1_.entityHit != null) {\n\t\t\tp_70184_1_.entityHit.attackEntityFrom(\n\t\t\t\t\tDamageSource.causeThrownDamage(this, getThrower()), 0.0F);\n\t\t}\n\n\t\tfor (int var2 = 0; var2 < 32; ++var2) {\n\t\t\tworldObj.spawnParticle(\"portal\", posX, posY + rand.nextDouble()\n\t\t\t\t\t* 2.0D, posZ, rand.nextGaussian(), 0.0D,\n\t\t\t\t\trand.nextGaussian());\n\t\t}\n\n\t\tif (!worldObj.isClient) {\n\t\t\tif (getThrower() != null && getThrower() instanceof EntityPlayerMP) {\n\t\t\t\tfinal EntityPlayerMP var3 = (EntityPlayerMP) getThrower();\n\n\t\t\t\tif (var3.playerNetServerHandler.func_147362_b().isChannelOpen()\n\t\t\t\t\t\t&& var3.worldObj == worldObj) {\n\t\t\t\t\tif (getThrower().isRiding()) {\n\t\t\t\t\t\tgetThrower().mountEntity((Entity) null);\n\t\t\t\t\t}\n\n\t\t\t\t\tgetThrower().setPositionAndUpdate(posX, posY, posZ);\n\t\t\t\t\tgetThrower().fallDistance = 0.0F;\n\t\t\t\t\tgetThrower().attackEntityFrom(DamageSource.fall, 5.0F);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetDead();\n\t\t}\n\t}", "public static boolean castAI(Thing caster, Thing s) {\r\n \t\t// bail out if we have insufficient energy to cast\r\n \t\tif (!canCast(caster,s)) {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\t\r\n \r\n \t\tMap map = caster.getMap();\r\n \r\n \t\tif (s.getStat(\"SpellUsage\") == SPELL_OFFENCE) {\r\n \r\n \t\t\tif (map == null)\r\n \t\t\t\treturn false;\r\n \r\n \t\t\t// find enemy to shoot at\r\n \t\t\tThing p = map.findNearestFoe(caster);\r\n \r\n \t\t\tif ((p!=null)) {\r\n \t\t\t\t// check if friend is too close!!\r\n \t\t\t\t// if not, then cast at target as planned\r\n \t\t\t\tThing f = map.findNearestFoe( p);\r\n \t\t\t\tif ((f == null) || (RPG.distSquared(f.x, f.y, p.x, p.y) > s.getStat(\"Radius\"))) {\r\n \t\t\t\t\tif (p.isVisible(Game.hero())||caster.isVisible(Game.hero())) {\r\n \t\t\t\t\t\tGame.message(caster.getTheName()+ \" casts \"+s.name()+\" at \"+p.getTheName());\r\n \t\t\t\t\t}\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\tcastAtLocation(s,caster, map, p.x, p.y);\r\n \t\t\t\t\tSpell.castCost(caster,s);\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn false;\r\n \r\n \t\t} else if ((s.getStat(\"SpellUsage\") == SPELL_DEFENCE)\r\n \t\t\t\t&& (caster.getStat(RPG.ST_HPS) < caster.getStat(RPG.ST_HPSMAX))) {\r\n \r\n \t\t\t// we're wounded, so cast a defensive spell\r\n \t\t\tcaster.visibleMessage(caster.getTheName()\r\n \t\t\t\t\t+ \" casts \"+s.name());\r\n \t\t\tSpell.castAtSelf(s,caster);\r\n \t\t\tSpell.castCost(caster,s);\r\n \t\t\treturn true;\r\n \r\n \t\t} else if ((s.getStat(\"SpellUsage\") == SPELL_SUMMON) && caster.isVisible(Game.hero())) {\r\n \r\n \t\t\t// cast summon spell between caster and nearest foe\r\n \t\t\tThing f = map.findNearestFoe(caster);\r\n \t\t\tif (f != null) {\r\n \r\n \t\t\t\tint tx = (caster.x + f.x) / 2;\r\n \t\t\t\tint ty = (caster.y + f.y) / 2;\r\n \r\n \t\t\t\tif (!map.isBlocked(tx, ty)) {\r\n \t\t\t\t\tGame.message(caster.getTheName()\r\n \t\t\t\t\t\t\t+ \" shouts words of summoning!\");\r\n \t\t\t\t\tSpell.castAtLocation(s,caster, map, tx, ty);\r\n \t\t\t\t\tSpell.castCost(caster,s);\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\r\n \t}", "public void checkEntityOverlap(){\n for(Entity entity:entityList){\n if(entity.getEntityType().equals(\"Sandwich\")) {\n if (player.getPlayerCoordinates() == entity.getEntityCoordinates()) {\n player.eatSandwich();\n entityList.remove(entity);\n }\n }\n }\n }", "private void fixPeople(NameInfo nameInfo) {\n\t\tString type = nameInfo.getType();\n\t\tif (type.equals(NameInfo.GENERIC_TYPE)) {\n\t\t\tString name = nameInfo.getName();\n\t\t\tString tokens[] = name.split(\"\\\\s+\");\n\t\t\tboolean isPeople = false;\n\t\t\tfor (String token : tokens) {\n\t\t\t\tif (peopleMan.isValidPeopleName(token)) {\n\t\t\t\t\tisPeople = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isPeople == true)\n\t\t\t\tnameInfo.setType(\"PER\");\n\t\t}\n\t}", "public void reproduceVirus() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < 1; i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "void doEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 87 */ if ((!target.isMailBox() && !target.isSpringFilled() && !target.isPuppet() && \n/* 88 */ !target.isUnenchantedTurret() && !target.isEnchantedTurret()) || (target\n/* 89 */ .hasDarkMessenger() && !target.isEnchantedTurret())) {\n/* */ \n/* 91 */ performer.getCommunicator().sendNormalServerMessage(\"The spell fizzles.\", (byte)3);\n/* */ return;\n/* */ } \n/* 94 */ if (target.isUnenchantedTurret() || target.isEnchantedTurret()) {\n/* */ \n/* 96 */ int spirit = Zones.getSpiritsForTile(performer.getTileX(), performer.getTileY(), performer.isOnSurface());\n/* 97 */ String sname = \"no spirits\";\n/* 98 */ int templateId = 934;\n/* 99 */ if (spirit == 4) {\n/* */ \n/* 101 */ templateId = 942;\n/* 102 */ sname = \"There are plenty of air spirits at this height.\";\n/* */ } \n/* 104 */ if (spirit == 2) {\n/* */ \n/* 106 */ templateId = 968;\n/* 107 */ sname = \"Some water spirits were closeby.\";\n/* */ } \n/* 109 */ if (spirit == 3) {\n/* */ \n/* 111 */ templateId = 940;\n/* 112 */ sname = \"Earth spirits are everywhere below ground.\";\n/* */ } \n/* 114 */ if (spirit == 1) {\n/* */ \n/* 116 */ sname = \"Some nearby fire spirits are drawn to your contraption.\";\n/* 117 */ templateId = 941;\n/* */ } \n/* 119 */ if (templateId == 934) {\n/* */ \n/* 121 */ performer.getCommunicator().sendAlertServerMessage(\"There are no spirits nearby. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* 125 */ if (target.isUnenchantedTurret()) {\n/* */ \n/* 127 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* 128 */ target.setTemplateId(templateId);\n/* 129 */ target.setAuxData(performer.getKingdomId());\n/* */ }\n/* 131 */ else if (target.isEnchantedTurret()) {\n/* */ \n/* 133 */ if (target.getTemplateId() != templateId) {\n/* */ \n/* 135 */ performer.getCommunicator().sendAlertServerMessage(\"The nearby spirits ignore your contraption. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 140 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* */ } \n/* */ } \n/* */ \n/* 144 */ ItemSpellEffects effs = target.getSpellEffects();\n/* 145 */ if (effs == null)\n/* 146 */ effs = new ItemSpellEffects(target.getWurmId()); \n/* 147 */ SpellEffect eff = effs.getSpellEffect(this.enchantment);\n/* 148 */ if (eff == null) {\n/* */ \n/* 150 */ performer.getCommunicator().sendNormalServerMessage(\"You summon nearby spirits into the \" + target\n/* 151 */ .getName() + \".\", (byte)2);\n/* */ \n/* 153 */ eff = new SpellEffect(target.getWurmId(), this.enchantment, (float)power, 20000000);\n/* 154 */ effs.addSpellEffect(eff);\n/* 155 */ Server.getInstance().broadCastAction(performer\n/* 156 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 157 */ .getName() + \".\", performer, 5);\n/* 158 */ if (!target.isEnchantedTurret()) {\n/* 159 */ target.setHasCourier(true);\n/* */ \n/* */ }\n/* */ }\n/* 163 */ else if (eff.getPower() > power) {\n/* */ \n/* 165 */ performer.getCommunicator().sendNormalServerMessage(\"You frown as you fail to summon more spirits into the \" + target\n/* 166 */ .getName() + \".\", (byte)3);\n/* */ \n/* 168 */ Server.getInstance().broadCastAction(performer.getName() + \" frowns.\", performer, 5);\n/* */ }\n/* */ else {\n/* */ \n/* 172 */ performer.getCommunicator().sendNormalServerMessage(\"You succeed in summoning more spirits into the \" + this.name + \".\", (byte)2);\n/* */ \n/* */ \n/* 175 */ eff.improvePower(performer, (float)power);\n/* 176 */ if (!target.isEnchantedTurret())\n/* 177 */ target.setHasCourier(true); \n/* 178 */ Server.getInstance().broadCastAction(performer\n/* 179 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 180 */ .getName() + \".\", performer, 5);\n/* */ } \n/* */ }", "private ServiceResponseTransform<JsonElement, ResponseResult> getPhysiciansResponseTransform(\n final boolean sponsors)\n {\n return new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result = checkResultFromAuthService(json);\n final JsonElement response = getResponseFromJson(json);\n if (result.success)\n {\n if (checkResultFromDataService(json))\n {\n if (response != null && response.isJsonArray())\n {\n final ArrayList<Physician> physicians =\n new ArrayList<Physician>();\n for (final JsonElement element : response\n .getAsJsonArray())\n {\n if (element.isJsonObject())\n {\n final JsonObject jsonObject =\n element.getAsJsonObject();\n // Append specialties separated by commas.\n String specialties = null;\n if (getJsonArrayFromJson(jsonObject,\n SPECIALTIES) != null)\n {\n for (final JsonElement specialtyElement : getJsonArrayFromJson(\n jsonObject, SPECIALTIES))\n {\n if (specialtyElement.isJsonObject())\n {\n final JsonObject specialtyJson =\n specialtyElement\n .getAsJsonObject();\n final String name =\n getStringFromJson(\n specialtyJson, NAME);\n if (!StringHelper\n .isNullOrEmpty(name))\n {\n if (specialties == null)\n {\n specialties = name;\n }\n else\n {\n specialties +=\n \", \" + name;\n }\n }\n }\n }\n }\n\n // Get insurance plans and carriers.\n final ArrayList<InsurancePlanAndCarrier> insurancePlansAndCarriers =\n new ArrayList<InsurancePlanAndCarrier>();\n if (getJsonArrayFromJson(jsonObject,\n INSURANCE_PLANS) != null)\n {\n for (final JsonElement insuranceElement : getJsonArrayFromJson(\n jsonObject, INSURANCE_PLANS))\n {\n if (insuranceElement.isJsonObject())\n {\n final JsonObject insuranceJson =\n insuranceElement\n .getAsJsonObject();\n final String planId =\n getStringFromJson(\n insuranceJson, PLAN_ID);\n final String planName =\n getStringFromJson(\n insuranceJson,\n PLAN_NAME);\n final String carrierId =\n getStringFromJson(\n insuranceJson,\n CARRIER_ID);\n final String carrierName =\n getStringFromJson(\n insuranceJson,\n CARRIER_NAME);\n final InsurancePlanAndCarrier insurancePlanAndCarrier =\n new InsurancePlanAndCarrier(\n planId, planName,\n carrierId, carrierName);\n insurancePlansAndCarriers\n .add(insurancePlanAndCarrier);\n }\n }\n }\n\n final String avatarURL =\n getStringFromJson(jsonObject,\n AVATAR_URI);\n final String city =\n getStringFromJson(jsonObject, CITY);\n final String country =\n getStringFromJson(jsonObject, COUNTRY);\n final double distance =\n getDoubleFromJson(jsonObject, DISTANCE,\n 0);\n final String firstName =\n getStringFromJson(jsonObject,\n FIRST_NAME);\n final String physicianID =\n getStringFromJson(jsonObject, ID);\n final String lastName =\n getStringFromJson(jsonObject, LAST_NAME);\n final double lat =\n getDoubleFromJson(jsonObject, LAT, 0);\n final double lng =\n getDoubleFromJson(jsonObject, LNG, 0);\n final String middleInitial =\n getStringFromJson(jsonObject,\n MIDDLE_INITIAL);\n final String clinic =\n getStringFromJson(jsonObject,\n PRACTICE_NAME);\n final String state =\n getStringFromJson(jsonObject, STATE);\n final String streetAddress1 =\n getStringFromJson(jsonObject,\n STREET_ADDRESS_ONE);\n final String streetAddress2 =\n getStringFromJson(jsonObject,\n STREET_ADDRESS_TWO);\n final String suffix =\n getStringFromJson(jsonObject, SUFFIX);\n final String zip =\n getStringFromJson(jsonObject, ZIP);\n\n // Parse raw phone number.\n String phoneNumber =\n getStringFromJson(jsonObject,\n PHONE_NUMBER);\n phoneNumber =\n phoneNumber.replaceAll(\"[^\\\\d]\", \"\");\n\n final OfficeLocation officeLocation =\n new OfficeLocation(lat, lng,\n streetAddress1, streetAddress2,\n city, state, zip, country);\n final Physician physician =\n new Physician(physicianID, firstName,\n lastName, middleInitial, suffix,\n avatarURL, specialties, clinic,\n officeLocation, distance,\n phoneNumber, sponsors,\n insurancePlansAndCarriers);\n physicians.add(physician);\n if (sponsors && physicians.size() >= 3)\n {\n break;\n }\n }\n }\n if (physicians.size() > 0)\n {\n // Removes duplicate physicians, I think.\n @SuppressWarnings(\"unchecked\")\n final ArrayList<Physician> duplicate =\n (ArrayList<Physician>)physicians.clone();\n for (final Physician physician : physicians)\n {\n for (final Physician test : physicians)\n {\n if (physician.lastName != null\n && physician.lastName\n .equalsIgnoreCase(test.lastName)\n && physician.firstName != null\n && physician.firstName\n .equalsIgnoreCase(test.firstName))\n {\n if (physician != test)\n { // Remove\n // if\n // not\n // same\n // object\n // reference.\n duplicate.remove(physician);\n }\n }\n\n }\n }\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(PHYSICIAN, duplicate);\n result.parameters = parameters;\n }\n }\n }\n else\n {\n if (response != null)\n {\n try\n {\n result.errorMessage = response.getAsString();\n }\n catch (final ClassCastException e)\n {\n// Crashlytics.logException(e);\n }\n }\n result.success = false;\n result.responseCode =\n ServiceClientConstants.SERVICE_RESPONSE_STATUS_CODE_SERVER_ERROR;\n }\n }\n else if (response != null)\n {\n try\n {\n result.errorMessage = response.getAsString();\n }\n catch (final ClassCastException e)\n {\n// Crashlytics.logException(e);\n }\n }\n LogError(\"getPhysiciansResponseTransform\", result);\n return result;\n }\n };\n }", "private void processAttack(Figure currentFigure) {\n\n if (desiredField.isObstacle() && currentFigure.isAttackValid(currentField.getY(), currentField.getX(), desiredField.getY(), desiredField.getX())) {\n desiredField.setObstacle(false);\n showMessageOnScreen(\"The obstacle is destroyed!\");\n } else if ( desiredField.getCurrentFigure() !=null && !desiredField.getCurrentFigure().getOwner().equals(currentPlayer)) {\n\n Figure attackedFigure = desiredField.getCurrentFigure();\n\n if (currentFigure.isAttackValid(currentField.getY(), currentField.getX(), desiredField.getY(), desiredField.getX())) {\n attack(currentFigure, attackedFigure);\n } else {\n showMessageOnScreen(\"Invalid attack\");\n }\n\n\n } else {\n showMessageOnScreen(\"Invalid\");\n\n\n }\n clearChosenFields();\n }", "@Override\n public Element senseElement(World world, int agentX, int agentY, int squareX, int squareY) {\n Element e = world.getSquare(squareX, squareY).getElement();\n if (e.isAgent()) return null; // there is no food but there might be an agent\n \n \n double distance = Math.sqrt(Math.pow(squareX - agentX, 2) + Math.pow(squareY - agentY, 2));\n int random = new Random().nextInt(100);\n double decimalDistance = (distance/this.getElementRange()); // something like 0.80\n double cutoff = 5*decimalDistance; // the closer we are, the smaller the cutoff, the smaller the chances of sensing incorrectly\n if (random > cutoff) // we sense correctly\n {\n return e; // return whether theres food or not\n }\n else {\n if (e == null)\n return new Food(); // it thinks there's food but theres not\n else\n return null; // it thinks theres no food but there is\n }\n \n }", "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n JCas viewJCas = jCas;\n if (!view.equals(VIEW_SYSTEM)) {\n try {\n viewJCas = jCas.getView(view);\n } catch (CASException e) {// just rethrow\n throw new AnalysisEngineProcessException(e);\n }\n }\n\n Collection<de.julielab.jules.types.Sentence> sentences = select(\n viewJCas, de.julielab.jules.types.Sentence.class);\n\n for (de.julielab.jules.types.Sentence julesSentence : sentences) {\n int sentence_start = julesSentence.getBegin();\n\n if (julesSentence.getCoveredText().length() > 0) {\n\n try {\n Sentence sentence = new Sentence(\n julesSentence.getCoveredText());\n bannerTokenizer.tokenize(sentence);\n crfTagger.tag(sentence);// error\n if (postProcessor != null)\n postProcessor.postProcess(sentence);\n\n for (Mention mention : sentence.getMentions()) {\n\n int startChar = mention.getStartChar() + sentence_start;\n int endChar = mention.getEndChar() + sentence_start;\n // LOG.debug(\"found NE:\" + mention.getText() + \" \" +\n // startChar\n // + \":\" + endChar);\n Protein prot = new Protein(viewJCas, startChar, endChar);\n prot.setName(mention.getText());\n prot.setTextualRepresentation(\"⊂PROT⊃\");\n prot.addToIndexes();\n }\n\n } catch (Throwable t) {\n // not sure why, but this happens sometimes after some time\n int docId = getHeaderIntDocId(viewJCas);\n LOG.warn(\"Banner exception at docId {}, skipping. {}\",\n docId, StringUtils.print(t));\n try {\n GarbageCollectorAnnotator.runGC();\n loadTagger(); // reload\n } catch (Exception e) {\n throw new AnalysisEngineProcessException(e);\n }\n }\n }\n }\n }", "@Test\n void respectsStillSuitFamiliar() {\n setupFakeClient();\n var cleanups =\n new Cleanups(\n withFamiliar(FamiliarPool.GROUPIE),\n withEquipped(EquipmentManager.FAMILIAR, ItemPool.STILLSUIT),\n withFamiliarInTerrarium(FamiliarPool.BOWLET),\n withFamiliarInTerrarium(FamiliarPool.GREY_GOOSE),\n withProperty(\"stillsuitFamiliar\", \"Bowlet\"));\n\n try (cleanups) {\n var newFamiliar = FamiliarData.registerFamiliar(FamiliarPool.GREY_GOOSE, 0);\n var req = new FamiliarRequest(newFamiliar);\n req.responseText = \"You take\";\n req.processResults();\n var requests = getRequests();\n\n assertThat(requests, hasSize(2));\n assertPostRequest(\n requests.get(0),\n \"/familiar.php\",\n \"famid=\" + FamiliarPool.GROUPIE + \"&action=unequip&ajax=1\");\n assertPostRequest(\n requests.get(1),\n \"/familiar.php\",\n \"action=equip&whichfam=\" + FamiliarPool.BOWLET + \"&whichitem=10932&ajax=1\");\n }\n }", "@Override\r\n public void collideEffect(Spatial s) {\n }", "@Override\n\tpublic boolean attackEntityFrom(DamageSource src, float par2) {\n\t\tif (isInvulnerableTo(src)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// don't just sit there!\n\t\taiSit.setSitting(false);\n\n\t\treturn super.attackEntityFrom(src, par2);\n\t}", "@Override\n public boolean isUsableEffectOne() {\n return getEffectsEnable()[0] && getUsableEffect()[0] && ((TargetSquareRequestEvent) getTargetEffectOne()).getPossibleTargetsX().length != 0;\n }", "private void smell() {\n try {\n this.console.println(MapControl.checkSmell(FireSwamp.getPlayer().getPlayerPosition(),\n FireSwamp.getCurrentGame().getGameMap()));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void doEncounters() {\r\n \t\r\n \tIterator<String> populationIter = population.keySet().iterator();\r\n\t\twhile (populationIter.hasNext()) { \r\n\t String pos = populationIter.next();\r\n\t ArrayList<Critter> critterList = population.get(pos);\r\n\t if(critterList.size() > 1) {\r\n\t \tint[] coords = stringToPos(pos);\r\n\t \t//get the integer value of the coordinates from the String key\r\n\t \tint x_copy = coords[0];\r\n\t \tint y_copy = coords[1];\r\n\t \t\r\n\t \tfor(int i = 0; i < critterList.size(); i++) {\r\n\t \t\tfor (int j = i+1; j < critterList.size(); j++) {\r\n\t \t\t\tCritter A = critterList.get(i);\r\n\t \t\t\tCritter B = critterList.get(j);\r\n\t \t\t\tif(A.getEnergy() > 0 && B.getEnergy() > 0 && A.x_coord == x_copy && A.y_coord == y_copy && B.x_coord == x_copy && B.y_coord == y_copy) {\r\n\t \t\t\t\t\r\n\t \t\t\t\t//Critters A and B are fighting\r\n\t \t\t\t\tA.isFight = true;\r\n\t \t\t\t\tB.isFight = true;\r\n\t \t\t\t\t\r\n\t \t\t\t\t//boolean AWantsToFight = A.fight(B.toString());\r\n\t \t\t\t\t//boolean BWantsToFight = B.fight(A.toString());\r\n\t \t\t\t\tint skillA = 0;\r\n\t \t\t\t\tint skillB = 0;\r\n\t \t\t\t\t\r\n\t \t\t\t\t//determine how A wants to respond\r\n\t \t\t\t\tif(A.fight(B.toString()) == true) {\r\n\t \t\t\t\t\tskillA = getRandomInt(A.energy);\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\t//determine how B wants to respond\r\n\t \t\t\t\tif(B.fight(A.toString()) == true) {\r\n\t \t\t\t\t\tskillB = getRandomInt(B.energy);\r\n\t \t\t\t\t}\r\n\t \t\t\t\tif(A.x_coord == x_copy && B.x_coord == x_copy && A.y_coord == y_copy && B.y_coord == y_copy) {\r\n\t \t\t\t\t\tif(skillA > skillB) { // A wins\r\n\t \t\t\t\t\t\tA.energy += (int) Math.floor(B.energy*1.0*0.5);\r\n\t \t\t\t\t\t\tB.energy = 0;\r\n\t \t\t\t\t\t} else if (skillB > skillA) {\r\n\t \t\t\t\t\t\tB.energy += (int) Math.floor(A.energy*1.0*0.5); //B wins\r\n\t \t\t\t\t\t\tA.energy = 0;\r\n\t \t\t\t\t\t} else {\r\n\t \t\t\t\t\t\tif(getRandomInt(1) == 0) { // A wins\r\n\t\t \t\t\t\t\t\tA.energy += (int) Math.floor(B.energy*1.0*0.5);\r\n\t\t \t\t\t\t\t\tB.energy = 0;\r\n\t \t\t\t\t\t\t} else {\r\n\t\t \t\t\t\t\t\tB.energy += (int) Math.floor(A.energy*1.0*0.5); //B wins\r\n\t\t \t\t\t\t\t\tA.energy = 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\t\r\n\t \t\t\t\t//Critters A and B have completed their fight\r\n\t \t\t\t\tA.isFight = false;\r\n\t \t\t\t\tB.isFight = false;\r\n\t \t\t\t\t\r\n\t \t\t\t\tcritterList.set(i, A);\r\n\t \t\t\t\tcritterList.set(j, B);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t}\r\n\t \t\r\n\t \t//Iterate through the critters in that position\r\n\t \tIterator<Critter> crittIter = critterList.iterator();\r\n\t \twhile(crittIter.hasNext()) {\r\n\t \t\tCritter c = crittIter.next();\r\n\t \t\t//remove critters who have moved out of that grid position or who have died\r\n\t \t\tif(c.x_coord != x_copy || c.y_coord != y_copy || (c.energy <= 0)) {\r\n\t \t\t\tcrittIter.remove();\r\n\t \t\t}\r\n\t \t}\r\n\t \tpopulation.replace(pos, critterList);\r\n\t }\r\n\t\t}\r\n }", "Fish findFish(){\r\n\t\t//step through GameCollection using iterator to find first instance of a fish\r\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Fish)return (Fish)g;\r\n\t\t}\r\n\treturn nullFish;\r\n\t}", "@Override\n public InputSource resolveEntity(final String publicId, final String systemId) throws SAXException, IOException {\n final String fileName = new File(URI.create(systemId).getPath()).getName();\n if (/* fileName.equals(\"person.xsd\") || */fileName.equals(\"name.xsd\") || fileName.equals(\"address.xsd\")) {\n final String path = \"/read-xml-tests/\" + fileName;\n final FileObject xsdFileObject = sourceFile.resolveFile(path);\n if (!xsdFileObject.exists()) {\n System.err.println(\"File does not exist: \" + xsdFileObject);\n throw new IllegalStateException(\n \"Schema \" + path + \" not found in file \" + containerFile + \" parsing \" + sourceFile);\n }\n // System.out.println(\"Opening input stream on \" + xsdFileObject);\n return new InputSource(xsdFileObject.getContent().getInputStream());\n }\n return null;\n }", "private void propagatedSafetyResolve(Cell cell) {\n\t\timmediateSafetyResolve(cell, true);\n\t}", "private void initializeEntities() {\n arrAttack = new ArrayList<>();\n arrCollidable = new ArrayList<>();\n entities = new ArrayList<>();\n\n arrAttack = scene.entityManager.getEntitiesWithComponents(attackComponent.getClass(), tool.getClass());\n\n arrCollidable = scene.entityManager.getEntitiesWithComponents(collidable.getClass(), Playable.class);\n\n for (int i = 0; i < arrAttack.size(); i++) {\n\n tool = scene.entityManager.getEntityComponentInstance(arrAttack.get(i), tool.getClass());\n\n //A -1 means that the entity is not attacking, at least with that weapon\n if (tool.currentActive != -1) {\n entities.add(arrAttack.get(i));\n }\n }\n\n //adding collidables to entities\n for (int i = 0; i < arrCollidable.size(); i++) {\n entities.add(arrCollidable.get(i));\n }\n }", "@Override\n protected void doCheckEffect ()\n {\n // check all the stationary spells in the location of the projectile for a Colloportus\n List<O2StationarySpell> inside = new ArrayList<>();\n for (O2StationarySpell spell : Ollivanders2API.getStationarySpells(p).getStationarySpellsAtLocation(location))\n {\n if (spell instanceof COLLOPORTUS)\n {\n inside.add(spell);\n }\n }\n\n // remove the colloportus spells found\n if (inside.size() > 0)\n {\n for (O2StationarySpell spell : inside)\n {\n spell.kill();\n spell.flair(10);\n }\n\n kill();\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "public void familiarTick() {\n\t\tattacked = false;\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tif (!c.goodDistance(c.getX(), c.getY(), c.getInstance().summoned.getX(), c.getInstance().summoned.getY(),\n\t\t\t\t\t8)) {\n\t\t\t\tcallOnTeleport();\n\t\t\t}\n\t\t\tif (!c.goodDistance(c.getX(), c.getY(), c.getInstance().summoned.getX(), c.getInstance().summoned.getY(),\n\t\t\t\t\t8)) {\n\t\t\t\tc.getSummoning().callFamiliar();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (c.getInstance().playerIndex != 0\n\t\t\t\t\t&& NPCHandler.npcs[c.getInstance().summoningMonsterId].spawnedBy == c.getId()) {\n\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].isAttackingAPerson = true;\n\t\t\t} else if (c.getInstance().playerIndex == 0\n\t\t\t\t\t&& NPCHandler.npcs[c.getInstance().summoningMonsterId].spawnedBy == c.getId()) {\n\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].isAttackingAPerson = false;\n\t\t\t}\n\t\t\tif (c.getInstance().underAttackBy != 0\n\t\t\t\t\t&& NPCHandler.npcs[c.getInstance().summoningMonsterId].spawnedBy == c.getId()) {\n\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].isAttackedByPerson = true;\n\t\t\t} else if (c.getInstance().underAttackBy == 0\n\t\t\t\t\t&& NPCHandler.npcs[c.getInstance().summoningMonsterId].spawnedBy == c.getId()) {\n\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].isAttackedByPerson = false;\n\t\t\t}\n\t\t\tif (c.getInstance().npcIndex != 0\n\t\t\t\t\t&& !NPCHandler.npcs[c.getInstance().summoningMonsterId].isAttackingAPerson\n\t\t\t\t\t&& NPCHandler.npcs[c.getInstance().summoningMonsterId].spawnedBy == c.getId()) {\n\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].IsAttackingNPC = true;\n\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].facePlayer(0);\n\t\t\t} else if (NPCHandler.npcs[c.getInstance().summoningMonsterId].spawnedBy == c.getId()) {\n\t\t\t\tif (NPCHandler.npcs[c.getInstance().summoningMonsterId].IsAttackingNPC == true)\n\t\t\t\t\tcallFamiliar();\n\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].IsAttackingNPC = false;\n\t\t\t}\n\t\t\tif (c.getInstance().summoned.killerId != 0 && c.getInstance().summoned.underAttackBy == 0) {\n\t\t\t\tc.getInstance().summoned.killerId = 0;\n\t\t\t\tc.getInstance().summoned.underAttackBy = 0;\n\t\t\t\tc.getSummoning().callFamiliar();\n\t\t\t}\n\t\t\tif (attacked != true) {\n\t\t\t\tif (NPCHandler.npcs[c.getInstance().summoningMonsterId].isAttackedByPerson == true) {\n\t\t\t\t\tattacked = true;\n\t\t\t\t\tPlayer o = PlayerHandler.players[c.getInstance().underAttackBy];\n\t\t\t\t\tif (o != null) {\n\t\t\t\t\t\tif (o.getInstance().inMulti()) {\n\t\t\t\t\t\t\tif (actionTimer == 0) {\n\t\t\t\t\t\t\t\tServer.npcHandler.followPlayer(c.getInstance().summoningMonsterId, o.playerId,\n\t\t\t\t\t\t\t\t\t\tc.playerId);\n\t\t\t\t\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].facePlayer(o.playerId);\n\t\t\t\t\t\t\t\tServer.npcHandler.attackPlayer(o, c.getInstance().summoningMonsterId);\n\t\t\t\t\t\t\t\tc.getInstance().summoned.updateRequired = true;\n\t\t\t\t\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].index = o.playerId;\n\t\t\t\t\t\t\t\tactionTimer = 7;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tactionTimer--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (attacked != true) {\n\t\t\t\tif (NPCHandler.npcs[c.getInstance().summoningMonsterId].isAttackingAPerson == true) {\n\t\t\t\t\tattacked = true;\n\t\t\t\t\tPlayer o = PlayerHandler.players[c.getInstance().playerIndex];\n\t\t\t\t\tif (o != null) {\n\t\t\t\t\t\tif (o.getInstance().inMulti()) {\n\t\t\t\t\t\t\tif (actionTimer == 0) {\n\t\t\t\t\t\t\t\tServer.npcHandler.followPlayer(c.getInstance().summoningMonsterId, o.playerId,\n\t\t\t\t\t\t\t\t\t\tc.playerId);\n\t\t\t\t\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].facePlayer(o.playerId);\n\t\t\t\t\t\t\t\tServer.npcHandler.attackPlayer(o, c.getInstance().summoningMonsterId);\n\t\t\t\t\t\t\t\tc.getInstance().summoned.updateRequired = true;\n\t\t\t\t\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].index = o.playerId;\n\t\t\t\t\t\t\t\tactionTimer = 7;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tactionTimer--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (attacked != true) {\n\t\t\t\tif (NPCHandler.npcs[c.getInstance().summoningMonsterId].IsAttackingNPC == true) {\n\t\t\t\t\tattacked = true;\n\t\t\t\t\tNPC n = NPCHandler.npcs[c.getInstance().npcIndex];\n\t\t\t\t\tif (n != null) {\n\t\t\t\t\t\t// if(n.inMulti()) {\n\t\t\t\t\t\tNPCHandler.npcs[c.getInstance().summoningMonsterId].IsAttackingNPC = true;\n\t\t\t\t\t\tNPCHandler.npcs[c.getInstance().npcIndex].IsUnderAttackNpc = true;\n\t\t\t\t\t\tNPCHandler.npcs[c.getInstance().npcIndex].randomWalk = false;\n\t\t\t\t\t\t// GameEngine.npcHandler.attackNPC(c.npcIndex,\n\t\t\t\t\t\t// c.getVariables().summoningMonsterId, c);\n\t\t\t\t\t\tServer.npcHandler.NpcVersusNpc(c.getInstance().summoningMonsterId,\n\t\t\t\t\t\t\t\tc.getInstance().npcIndex, c);\n\t\t\t\t\t\t// }\n\t\t\t\t\t} else {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tspeakTimer++;\n\t\t\tif (speakTimer == 100) {\n\t\t\t\tc.getInstance().summoned.forceChat(summonedFamiliar.speakText);\n\t\t\t\tspeakTimer = 0;\n\t\t\t}\n\t\t\tc.getInstance().specRestoreTimer -= 1;\n\t\t\tint hours = (c.getInstance().specRestoreTimer / 2) / 3600;\n\t\t\tint minutes = ((c.getInstance().specRestoreTimer / 2) - hours * 3600) / 60;\n\t\t\tint seconds = ((c.getInstance().specRestoreTimer / 2) - (hours * 3600 + minutes * 60));\n\n\t\t\tString timer = String.format(\"%02d:%02d\", minutes, seconds);\n\t\t\tc.getPA().sendString(timer, 17021);\n\t\t\tif (c.getInstance().specRestoreTimer == 100) {\n\t\t\t\tc.sendMessage(\"@red@Your familiar will run out in approximately 1 minute.\");\n\t\t\t\tc.sendMessage(\"@red@Warning! Item's stored in familiar will be dropped upon death!\");\n\t\t\t} else if (c.getInstance().specRestoreTimer == 50) {\n\t\t\t\tc.sendMessage(\"@red@Your familiar will run out in approximately 30 seconds.\");\n\t\t\t\tc.sendMessage(\"@red@Warning! Item's stored in familiar will be dropped upon death!\");\n\t\t\t} else if (c.getInstance().specRestoreTimer == 25) {\n\t\t\t\tc.sendMessage(\"@red@Your familiar will run out in approximately 15 seconds.\");\n\t\t\t\tc.sendMessage(\"@blu@ You can renew your familiar with a new pouch by clicking @red@ Renew pouch\");\n\t\t\t\tc.sendMessage(\"@red@Warning! Item's stored in familiar will be dropped upon death!\");\n\t\t\t} else if (c.getInstance().specRestoreTimer <= 0) {\n\t\t\t\tdismissFamiliar(false);\n\t\t\t}\n\t\t\tif (familiarSpecialEnergy != 60) {\n\t\t\t\tspecialRestoreCycle++;\n\t\t\t\tif (specialRestoreCycle == 50) {\n\t\t\t\t\tif (familiarSpecialEnergy != 60) {\n\t\t\t\t\t\tfamiliarSpecialEnergy += 15;\n\t\t\t\t\t\tif (familiarSpecialEnergy >= 60) {\n\t\t\t\t\t\t\tfamiliarSpecialEnergy = 60;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tspecialRestoreCycle = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tspecialTimer--;\n\t\t}\n\t\tif (renewTimer > 0) {\n\t\t\trenewTimer--;\n\t\t\tif (renewTimer == 0 && c.getInstance().summoned == null && summonedFamiliar != null) {\n\t\t\t\tc.getInstance().summoned = Server.npcHandler.summonNPC(c, summonedFamiliar.npcId, c.getX(),\n\t\t\t\t\t\tc.getY() + (summonedFamiliar.large ? 2 : 1), c.heightLevel, 0,\n\t\t\t\t\t\tSummoningData.getSummonHealth(summonedFamiliar.npcId), 1, 1, 1);\n\t\t\t\tcallFamiliar();\n\t\t\t}\n\t\t}\n\t\tif (loginCycle > 0) {\n\t\t\tloginCycle--;\n\t\t\tif (loginCycle == 0 && c.getInstance().summoned == null && summonedFamiliar != null) {\n\t\t\t\tc.getInstance().summoned = Server.npcHandler.summonNPC(c, summonedFamiliar.npcId, c.getX(),\n\t\t\t\t\t\tc.getY() + (summonedFamiliar.large ? 2 : 1), c.heightLevel, 0,\n\t\t\t\t\t\tSummoningData.getSummonHealth(summonedFamiliar.npcId), 1, 1, 1);\n\t\t\t\tcallFamiliar();\n\t\t\t}\n\t\t}\n\t}", "protected Entity findPlayerToAttack() {\n/* 339 */ double var1 = 8.0D;\n/* 340 */ return getIsSummoned() ? null : this.field_70170_p.func_72890_a(this, var1);\n/* */ }", "IntPair findSafety(IntPair position, IntPair pacman)\n {\n // TODO: Implement function\n return null;\n }", "private Character select_Aim(Character attacker, HashSet set) {\n destination = null;\n if (!(attacker.getEquiped_Weapon() instanceof Staff)) {\n for (Object o : set) {\n if (o instanceof Character) {\n ((Character) o).first_Weapon();\n for (Weapon weapon : attacker.getWeapons()) {\n if (weapon.isDominant(((Character) o).getEquiped_Weapon()) && compare_Range(weapon, (Character) o)) {\n //check position\n for (Node n : generate_SafePosition(weapon, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n attacker.equip(weapon);\n return (Character) o;\n }\n }\n\n }\n }\n }\n }\n for (Object o : set) {\n if (o instanceof Character) {\n for (Weapon weapon : attacker.getWeapons()) {\n if (weapon.isDominant(((Character) o).getEquiped_Weapon())) {\n for (Node n : generate_AttackPosition(weapon, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n attacker.equip(weapon);\n return (Character) o;\n }\n }\n }\n }\n }\n }\n for (Object o : set) {\n if (o instanceof Character) {\n for (Weapon weapon : attacker.getWeapons()) {\n if (compare_Range(weapon, (Character) o)) {\n for (Node n : generate_SafePosition(weapon, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n attacker.equip(weapon);\n return (Character) o;\n }\n }\n }\n }\n }\n }\n //No suitable aim but still aim_set is not empty, so select the weakest one.\n\n return getWeakest(attacker, set);\n\n } else {\n Character aim = null;\n Staff staff = (Staff) attacker.getEquiped_Weapon();\n switch (staff.getMagicEffect().getClass().getName()) {\n case \"Item.HealMagic\":\n int hp = 61;\n for (Object o : set) {\n if (((Character) o).gethp() < hp) {\n for (Node n : generate_AttackPosition(staff, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n hp = ((Character) o).gethp();\n aim = (Character) o;\n }\n }\n }\n }\n System.out.println(\"temp aim is \" + aim.getName());\n return aim;\n case \"Item.OffensiveMagic\":\n int Hit = 0;\n for (Object o : set) {\n int hit = bottom_screen.calculate_StaffHit((Staff) attacker.getEquiped_Weapon(), attacker, (Character) o);\n if (hit > Hit) {\n Hit = hit;\n aim = (Character) o;\n }\n }\n return aim;\n default:\n return null;\n }\n }\n\n }", "private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}", "private final void touchEffects(Organism org, int seg, int oseg, boolean firstCall) {\n\t\tdouble takenEnergy = 0;\n\t\tint i;\n\t\thandleMySegment(org, seg, oseg);\n\t\tif ((((_parentID == org._ID || _ID == org._parentID) && !_geneticCode.getGenerationBattle() && !org._geneticCode.getGenerationBattle()) ||\n\t\t\t(_parentID == org._parentID && !_geneticCode.getSiblingBattle() && !org._geneticCode.getSiblingBattle() && _parentID != -1 ) ||\n\t\t\t(_transfersenergy && org._transfersenergy && ((_geneticCode.getPeaceful() && org._geneticCode.getPeaceful()) ||\n\t\t\t((_lengthfriend == org._lengthfriend || _thetafriend == org._thetafriend) && _geneticCode.getSocial() && org._geneticCode.getSocial())))) && org.alive) {\n\t\t\tfor (i=_segments-1; i>=0; i--) {\n\t\t\t\tswitch (getTypeColor(_segColor[i])) {\n\t\t\t\t// Teal segment: React on other organisms\n\t\t\t\tcase TEAL:\n\t\t\t\t\tswitch (getTypeColor(_segColor[seg])) {\n\t\t\t\t\tdefault:\n\t\t switch (getTypeColor(org._segColor[oseg])) {\n\t\t default:\n\t\t\t\t\t\t\t if (_segfriendReaction[seg] == -2) {\n\t\t\t\t\t\t\t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t \tdx=0;\n\t\t\t\t\t\t\t \tdy=0;\n\t\t\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t\t\t }} else\n\t\t\t\t\t\t\t if (_segfriendReaction[seg] == -1) {\n\t\t\t\t\t\t\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t }} else \n\t\t\t if (_segfriendReaction[seg] == 1) {\n\t\t\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t }} else\n\t\t\t if (_segfriendReaction[seg] == 2) {\n\t\t\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t }} else\n\t\t\t \t break;\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\t break;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}}\n\t\t\tswitch (getTypeColor(_segColor[seg])) {\n\t\t\tcase MINT:\n\t\t\t\t// Mint segment: Remove an infection\n\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\tcase MINT:\n\t\t\t\t\tif ((_infectedGeneticCode != null) || (org._infectedGeneticCode != null)) {\n\t\t\t\t\t if (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t_infectedGeneticCode = null;\n\t\t\t\t\t\t\torg._infectedGeneticCode = null;\n\t\t\t\t\t\t\torg.setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._infectedGeneticCode != null)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._infectedGeneticCode = null;\n\t\t\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((_geneticCode.getFamilial()) && ((_lengthfriend == org._lengthfriend) || (_thetafriend == org._thetafriend) ||\n\t\t\t\t\t\t\t(_parentID == org._ID) || (_ID == org._parentID) || (_parentID == org._parentID && _parentID != -1 ))) {\n\t\t\t\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._infectedGeneticCode != null)) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\torg._infectedGeneticCode = null;\n\t\t\t\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MAGENTA:\n\t\t\t\t// Magenta segment: Heal all sick segments\n\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\tcase MAGENTA:\n\t\t\t\t\tfor (int j = 0; j < org._segments; j++) {\n\t\t\t\t \tif ((org._segColor[j] == Utils.ColorLIGHTBROWN) || (org._segColor[j] == Utils.ColorGREENBROWN) || (org._segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t\t|| (org._segColor[j] == Utils.ColorBROKEN) || (org._segColor[j] == Utils.ColorLIGHT_BLUE) || (org._segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t\t|| (org._segColor[j] == Utils.ColorDARKJADE) || (org._segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t\t\t if (useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._segColor[j] = org._geneticCode.getGene(j%org._geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t\t\t\torg.setColor(Color.MAGENTA);\n\t\t\t\t\t\t\t\tsetColor(Color.MAGENTA);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t for (int j = 0; j < org._segments; j++) {\n\t\t\t\t \tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t \t\tif ((org._segColor[j] == Utils.ColorLIGHTBROWN) || (org._segColor[j] == Utils.ColorGREENBROWN) || (org._segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t\t\t|| (org._segColor[j] == Utils.ColorBROKEN) || (org._segColor[j] == Utils.ColorLIGHT_BLUE) || (org._segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t\t\t|| (org._segColor[j] == Utils.ColorDARKJADE) || (org._segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t\t\t if (useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org._segColor[j] = org._geneticCode.getGene(j%org._geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t\t\t\t setColor(Color.MAGENTA);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((_geneticCode.getFamilial()) && ((_lengthfriend == org._lengthfriend) || (_thetafriend == org._thetafriend) ||\n\t\t\t\t\t\t\t\t(_parentID == org._ID) || (_ID == org._parentID) || (_parentID == org._parentID && _parentID != -1 ))) {\n\t\t\t\t\t\t\t\tif ((org._segColor[j] == Utils.ColorLIGHTBROWN) || (org._segColor[j] == Utils.ColorGREENBROWN) || (org._segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t\t\t || (org._segColor[j] == Utils.ColorBROKEN) || (org._segColor[j] == Utils.ColorLIGHT_BLUE) || (org._segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t\t\t || (org._segColor[j] == Utils.ColorDARKJADE) || (org._segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t\t\t\t\t if (useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\t\torg._segColor[j] = org._geneticCode.getGene(j%org._geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t\t\t\t\t\tsetColor(Color.MAGENTA);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ((_transfersenergy) && (alive)) {\n\t\t\t\tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t\tif ((_growthRatio==1) && (_energy > (org._energy+1)) && (useEnergy(Utils.ROSE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Transfers energy\n\t\t\t\t\t\ttakenEnergy = Utils.between(Utils.ORGANIC_OBTAINED_ENERGY, 0, (_energy - (org._energy+1)));\n\t\t\t\t\t\t// The other organism will be shown in cyan\n\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t// This organism will be shown in rose\n\t\t\t\t\t\tsetColor(Utils.ColorROSE);\n\t\t\t\t\t\torg._energy += takenEnergy;\n\t\t\t\t\t\t_energy -= takenEnergy;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((_geneticCode.getFamilial()) && ((_lengthfriend == org._lengthfriend) || (_thetafriend == org._thetafriend) ||\n\t\t\t\t\t\t(_parentID == org._ID) || (_ID == org._parentID) || (_parentID == org._parentID && _parentID != -1 ))) {\n\t\t\t\t\t\tif ((_growthRatio==1) && (_energy > (org._energy+1)) && (useEnergy(Utils.ROSE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t// Transfers energy\n\t\t\t\t\t\t\ttakenEnergy = Utils.between(Utils.ORGANIC_OBTAINED_ENERGY, 0, (_energy - (org._energy+1)));\n\t\t\t\t\t\t\t// The other organism will be shown in cyan\n\t\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t\t// This organism will be shown in rose\n\t\t\t\t\t\t\tsetColor(Utils.ColorROSE);\n\t\t\t\t\t\t\torg._energy += takenEnergy;\n\t\t\t\t\t\t\t_energy -= takenEnergy;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((_geneticCode.getPeaceful()) && (org._transfersenergy) && (!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\t\t\tif ((_isaplant) || (_isaconsumer)) {\n\t\t\t\t\t\t\t\tif ((_growthRatio==1) && (_energy > (org._energy+1)) && (useEnergy(Utils.ROSE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t\t\t// Transfers energy\n\t\t\t\t\t\t\t\t\ttakenEnergy = Utils.between(Utils.ORGANIC_OBTAINED_ENERGY, 0, (_energy - (org._energy+1)));\n\t\t\t\t\t\t\t\t\t// The other organism will be shown in cyan\n\t\t\t\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t\t\t\t// This organism will be shown in rose\n\t\t\t\t\t\t\t\t\tsetColor(Utils.ColorROSE);\n\t\t\t\t\t\t\t\t\torg._energy += takenEnergy;\n\t\t\t\t\t\t\t\t\t_energy -= takenEnergy;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\tfor (i=_segments-1; i>=0; i--) {\n\t\tswitch (getTypeColor(_segColor[i])) {\n\t\t// Teal segment: React on other organisms\n\t\tcase TEAL:\n\t\t\tswitch (getTypeColor(_segColor[seg])) {\n\t\t\tcase SPIKE:\n\t\t\tcase DARKOLIVE:\n\t\t\tcase BROKEN:\n\t\t\tcase DARKJADE:\n\t\t\tcase POISONEDJADE:\n\t\t\tcase DARKFIRE:\n\t\t\tcase LIGHTBROWN:\n\t\t\tcase GREENBROWN:\n\t\t\tcase LIGHT_BLUE:\n\t\t\tcase DEADBARK:\n\t\t\tcase ICE:\n\t\t\t\t switch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\t default:\n\t\t\t\t\t if (_segsickReaction[seg] == -2) {\n\t\t\t\t\t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n\t\t\t\t\t if (_segsickReaction[seg] == -1) {\n\t\t\t\t\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_segsickReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segsickReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\t \n\t\t\t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t }} else\n\t \t break;\t \n\t\t\t\t }\n\t\t\t\t break;\n\t\t\tdefault:\n switch (getTypeColor(org._segColor[oseg])) {\n case RED:\n \t if (_segredReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segredReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_segredReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segredReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\t \n\t \t\t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t }} else\n\t \t break;\t \n case GREEN:\n case SPRING:\n case LIME:\n case FOREST:\n case C4:\n case JADE:\n case DARKJADE:\n case GRASS:\n \t if (_seggreenReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n if (_seggreenReaction[seg] == -1) {\n if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_seggreenReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\t \n\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_seggreenReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t \t }} else\n\t \t break; \n case BLUE:\n \t if (_segblueReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segblueReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else \n \t if (_segblueReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segblueReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n case WHITE:\n case PLAGUE:\n case BROKEN:\n \t if (org._isaplant) {\n \t if (_segwhiteReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segwhiteReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segwhiteReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segwhiteReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n \t } else if ((org._isfrozen) || (org._isplague) || (org._isenhanced) || (org._isaconsumer)) {\n \t\tif (_segplagueReaction[seg] == -2) {\n \t\tif (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t dx=0;\n \t\t\t\t\t dy=0;\n \t\t\t\t\t dtheta=0;\n \t\t\t\t\t}} else\n if (_segplagueReaction[seg] == -1) {\n if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segplagueReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segplagueReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t dx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n \t } else {\n \t\tif (_segvirusReaction[seg] == -2) {\n \t\tif (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t \tdx=0;\n \t\t\t\t\t \tdy=0;\n \t\t\t\t\t \tdtheta=0;\n \t\t\t\t\t }} else\n \tif (_segvirusReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segvirusReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segvirusReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t dx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n \t }\n \t break;\n case SILVER:\n \t if (org._isaconsumer) {\n \t if (_segsilverReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segsilverReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segsilverReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segsilverReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n \t } else if (org._isaplant) {\n \t\tif (_segwhiteReaction[seg] == -2) {\n \t\tif (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t dx=0;\n \t\t\t\t\t dy=0;\n \t\t\t\t\t dtheta=0;\n \t\t\t\t\t}} else\n if (_segwhiteReaction[seg] == -1) {\n if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segwhiteReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segwhiteReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t dx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n \t } else {\n \t\tif (_segplagueReaction[seg] == -2) {\n \t\tif (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t \tdx=0;\n \t\t\t\t\t \tdy=0;\n \t\t\t\t\t \tdtheta=0;\n \t\t\t\t\t }} else\n \tif (_segplagueReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segplagueReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segplagueReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t dx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n \t }\n \t break;\n case GRAY:\n \t if (_seggrayReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_seggrayReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else \t \n \t if (_seggrayReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_seggrayReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n case MAGENTA:\n case ROSE:\n \t if (_segmagentaReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segmagentaReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else \t \n \t if (_segmagentaReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segmagentaReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t \t break;\n case PINK:\n \t if (_segpinkReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segpinkReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else \t \n \t if (_segpinkReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segpinkReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case ORANGE:\n \t if (_segorangeReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segorangeReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else \n \t if (_segorangeReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segorangeReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case BARK:\n case OLDBARK:\n \t if (_segbarkReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segbarkReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_segbarkReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segbarkReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t \t }} else\n\t break;\n case VIOLET:\n \t if (_segvioletReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segvioletReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segvioletReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segvioletReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case MAROON:\n \t if (_segmaroonReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segmaroonReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segmaroonReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segmaroonReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case OLIVE:\n \t if (_segoliveReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segoliveReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_segoliveReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segoliveReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t }} else\n\t break;\n case MINT:\n \t if (_segmintReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segmintReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segmintReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segmintReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case CREAM:\n \t if (_segcreamReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segcreamReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segcreamReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segcreamReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case SPIKEPOINT:\n \t if (_segspikepointReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segspikepointReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segspikepointReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segspikepointReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case SPIKE:\n \t if (_segspikeReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segspikeReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segspikeReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segspikeReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case DARKOLIVE:\n case LIGHT_BLUE:\n \t if (_seglightblueReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_seglightblueReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else \n \t if (_seglightblueReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_seglightblueReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case OCHRE:\n \t if (_segochreReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segochreReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else \n \t if (_segochreReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segochreReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n case SKY:\n case DEEPSKY:\n \t if (_segskyReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segskyReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_segskyReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segskyReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t }} else\n\t break;\n case ICE:\n case DEADBARK:\n \t if (_segiceReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segiceReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segiceReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segiceReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t \t }} else\n\t break;\n case LILAC:\n case DARKLILAC:\n \t if (_seglilacReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_seglilacReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_seglilacReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_seglilacReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t }} else\n\t break;\n case CORAL:\n \t if (_segcoralReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segcoralReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segcoralReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segcoralReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t \t }} else\n\t break;\n case FIRE:\n \t if (_segfireReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segfireReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_segfireReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segfireReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t }} else\n\t break;\n case LIGHTBROWN:\n case DARKFIRE:\n \t if (_seglightbrownReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_seglightbrownReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_seglightbrownReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_seglightbrownReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t \t }} else\n\t break;\n case GREENBROWN:\n case POISONEDJADE:\n \t if (_seggreenbrownReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_seggreenbrownReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_seggreenbrownReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_seggreenbrownReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t \t }} else\n\t break;\n case BROWN:\n \t if (_segbrownReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \tif (_segbrownReaction[seg] == -1) {\n \tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segbrownReaction[seg] == 1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\tdx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t }} else\n \t if (_segbrownReaction[seg] == 2) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n \t \t }} else\n \t break;\n default:\n \t if (_segdefaultReaction[seg] == -2) {\n \t if (useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tdx=0;\n\t\t\t\t\t \tdy=0;\n\t\t\t\t\t \tdtheta=0;\n\t\t\t\t\t }} else\n \t if (_segdefaultReaction[seg] == -1) {\n \t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x1[seg]-x2[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y1[seg]-y2[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else \n\t if (_segdefaultReaction[seg] == 1) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n \t\t\t\t\t\t dx=Utils.between((x2[seg]-x1[seg])*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dy=Utils.between((y2[seg]-y1[seg])*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n \t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t }} else\n\t if (_segdefaultReaction[seg] == 2) {\n\t if (Utils.random.nextInt(2)<1 && useEnergy(Utils.TEAL_ENERGY_CONSUMPTION)) {\n\t \t\t\t\t\tdx=Utils.between((org._dCenterX-_dCenterX)*(_m[i]*_m[i]/_mass)+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdy=Utils.between((org._dCenterY-_dCenterY)*(_m[i]*_m[i]/_mass)+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t \t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t \t }} else\n\t \t break;\n }\n break;\n }\n\t\t\tbreak;\n\t\t}}\n\t\tswitch (getTypeColor(_segColor[seg])) {\n\t\tcase ORANGE:\n\t\t// Orange segment: try to get energy from the other organism\n\t\t\t// If the other segment is blue, it acts as a shield\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase JADE:\n\t\t\tcase TEAL:\n\t\t\tcase CYAN:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase INDIGO:\n\t\t\tcase BLOND:\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GRASS:\n\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((0.5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in green brown\n\t\t\t\t\t\torg.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t setColor(Color.ORANGE);\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Color.BLUE);\n\t\t\t\t} else {\n\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LIGHT_BLUE:\n\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\torg.setColor(Utils.ColorLIGHT_BLUE);\n\t\t\t\t} else {\n\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SKY:\n\t\t\t\tif (org.useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t} else {\n\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DEEPSKY:\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\tbreak;\n\t\t\tcase ORANGE:\n\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t// The other organism will be shown in orange\n\t\t\t\t\torg.setColor(Color.ORANGE);\n\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FIRE:\n\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t// The other organism will be shown in fire\n\t\t\t\t\torg.setColor(Utils.ColorFIRE);\n\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SILVER:\n \tif ((org._nTotalKills > 0) || (org._isenhanced)) {\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in gold\n\t\t\t\t\t\torg.setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MINT:\n\t\t\tcase MAGENTA:\n\t\t\tcase ROSE:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n break;\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WHITE:\n\t\t\t\tif ((org._isaplant) || (org._isaconsumer) || (org._isplague) || (org._isenhanced) || (org._isfrozen)) {\t\t\t \n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\t\t\t\t\t \n\t\t\t\t }\n\t\t\t }\n\t\t\t\tbreak;\n\t\t\tcase ICE:\n\t\t\tcase DEADBARK:\n\t\t\t\tif ((_isafreezer) || (_isenhanced)) {\n\t\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\t\tsetColor(Color.ORANGE);\t\t\t\t\t \n\t\t\t\t }\n\t\t\t }\n\t\t\t\tbreak;\n\t\t\tcase BARK:\n\t\t \torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t \tbreak;\n\t\t\tcase OLDBARK:\n\t\t\t\tbreak;\n\t\t\tcase RED:\n\t\t\t\tbreak;\n\t\t\tcase MAROON:\n\t\t\t\tbreak;\n\t\t\tcase CREAM:\n\t\t\t\tbreak;\n\t\t\tcase OCHRE:\n\t\t\t\tbreak;\n\t\t\tcase OLIVE:\n\t\t\t\tbreak;\n\t\t\tcase DARKOLIVE:\n\t\t\t\tbreak;\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tbreak;\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\t\n\t\t\tdefault:\n\t\t\t\tif (useEnergy(Utils.ORANGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t// This organism will be shown in orange\n\t\t\t\t\tsetColor(Color.ORANGE);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// energy interchange\n\t\t\torg._energy -= takenEnergy;\n\t\t\t_energy += takenEnergy;\n\t\t\tdouble CO2freed = takenEnergy * Utils.ORGANIC_SUBS_PRODUCED;\n\t\t\tuseEnergy(CO2freed);\n\t\t\torg._hasdodged =true;\n\t\t\tbreak;\n\t\tcase FIRE:\n\t\t\t// Fire segment: omnivore between red and orange\n\t\t\t\t// If the other segment is blue, it acts as a shield\n\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\tcase GREEN:\n\t\t\t\tcase FOREST:\n\t\t\t\tcase SPRING:\n\t\t\t\tcase LIME:\n\t\t\t\tcase C4:\n\t\t\t\tcase JADE:\n\t\t\t\tcase TEAL:\n\t\t\t\tcase CYAN:\n\t\t\t\tcase YELLOW:\n\t\t\t\tcase AUBURN:\n\t\t\t\tcase INDIGO:\n\t\t\t\tcase BLOND:\n\t\t\t\tcase DARKGRAY:\n\t\t\t\tcase GOLD:\n\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((org._dodge) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRASS:\n\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in green brown\n\t\t\t\t\t\t\torg.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((org._dodge) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.1 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in green brown\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BLUE:\n\t\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\torg.setColor(Color.BLUE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIGHT_BLUE:\n\t\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\torg.setColor(Utils.ColorLIGHT_BLUE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t break;\n\t\t\t\tcase SKY:\n\t\t\t\t\tif (org.useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t\tbreak;\n\t case RED:\n\t \tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in red\n\t\t\t\t\t\torg.setColor(Color.RED);\n\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t case FIRE:\n\t \tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in fire\n\t\t\t\t\t\torg.setColor(Utils.ColorFIRE);\n\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t}\n\t \tbreak;\n\t case ORANGE:\n\t \tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in orange\n\t\t\t\t\t\torg.setColor(Color.ORANGE);\n\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t case SILVER:\n\t \tif ((org._nTotalKills > 0) || (org._isenhanced)) {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in gold\n\t\t\t\t\t\t\torg.setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else \n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t case PINK:\n\t \tif (org._geneticCode.getModifiespink()) {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t \tbreak;\n\t\t\t\tcase MAROON:\n\t\t\t\tcase CREAM:\n\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase ICE:\n\t\t\t\tcase DEADBARK:\n\t\t\t\t\tif ((_isafreezer) && (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BARK:\n\t\t\t \torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t \tbreak;\n\t\t\t\tcase OLDBARK:\n\t\t\t\t\tbreak;\n\t\t\t\tcase OCHRE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase OLIVE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKOLIVE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase SPIKEPOINT:\n\t\t\t\t\tbreak;\n\t\t\t\tcase BROWN:\n\t\t\t\tcase GREENBROWN:\n\t\t\t\tcase POISONEDJADE:\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t\tbreak;\n\t\t\t\tcase MINT:\n\t\t\t\tcase MAGENTA:\n\t\t\t\tcase ROSE:\n\t\t\t\t\tif (_geneticCode.getAltruist()) {\n\t break;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((org._dodge) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.FIRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t\t// energy interchange\n\t\t\t\torg._energy -= takenEnergy;\n\t\t\t\t_energy += takenEnergy;\n\t\t\t\tdouble CO2freed7 = takenEnergy * Utils.ORGANIC_SUBS_PRODUCED;\n\t\t\t\tuseEnergy(CO2freed7);\n\t\t\t\torg._hasdodged =true;\n\t\t\t\tbreak;\n\t\tcase RED:\n\t\t\t// Red segment: try to get energy from other consumers\n\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\tcase RED:\n\t\t\t\t\tif (useEnergy(Utils.RED_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in red\n\t\t\t\t\t\torg.setColor(Color.RED);\n\t\t\t\t\t\t// This organism will be shown in red\n\t\t\t\t\t\tsetColor(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase FIRE:\n\t\t\t\t\tif (useEnergy(Utils.RED_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in fire\n\t\t\t\t\t\torg.setColor(Utils.ColorFIRE);\n\t\t\t\t\t\t// This organism will be shown in red\n\t\t\t\t\t\tsetColor(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase ORANGE:\n\t\t\t\tcase MAROON:\n\t\t\t\tcase PINK:\n\t\t\t\t\tif (useEnergy(Utils.RED_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in red\n\t\t\t\t\t\tsetColor(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SILVER:\n\t\t\t\t\tif ((org._nTotalKills > 0) || (org._isenhanced)) {\n\t\t\t\t\t\tif (useEnergy(Utils.RED_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in gold\n\t\t\t\t\t\t\torg.setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t\t// This organism will be shown in red\n\t\t\t\t\t\t\tsetColor(Color.RED);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SPIKE:\n\t\t\t\t\tif ((org._isenhanced) && (useEnergy(Utils.RED_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in red\n\t\t\t\t\t\tsetColor(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SPIKEPOINT:\n\t\t\t\t\tif ((_isenhanced) && (org._isenhanced) && (useEnergy(Utils.RED_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in red\n\t\t\t\t\t\tsetColor(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LILAC:\n\t\t\t\tcase DARKLILAC:\n\t\t\t\tcase GRAY:\n\t\t\t\t\tif ((_isenhanced) && (org._isaconsumer) && (useEnergy(Utils.RED_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase CREAM:\n\t\t\t\t\tif ((_isenhanced) && (useEnergy(Utils.RED_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BARK:\n\t\t\t \torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t \tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// energy interchange\n\t\t\t\torg._energy -= takenEnergy;\n\t\t\t\t_energy += takenEnergy;\n\t\t\t\tdouble CO2freed2 = takenEnergy * Utils.ORGANIC_SUBS_PRODUCED;\n\t\t\t\tuseEnergy(CO2freed2);\n\t\t\t\tbreak;\t\n\t\tcase PINK:\n\t\t\t// Pink segment: try to get energy from corpses, weak organisms, viruses and parasites\n\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\tcase PINK:\n\t\t\t\t\tif (_geneticCode.getModifiespink()) {\n\t\t\t\t\t\tif (org._geneticCode.getModifiespink()) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in pink\n\t\t\t\t\t\t\t org.setColor(Color.PINK);\n\t\t\t\t\t\t\t\t// This organism will be shown in pink\n\t\t\t\t\t\t\t\tsetColor(Color.PINK);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in dark fire\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t\t// This organism will be shown in pink\n\t\t\t\t\t\t\t\tsetColor(Color.PINK);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (org._geneticCode.getModifiespink()) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in pink\n\t\t\t\t\t\t\t org.setColor(Color.PINK);\n\t\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in dark fire\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase CREAM:\n\t\t\t\t\tif (_geneticCode.getModifiespink()) {\n\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in pink\n\t\t\t\t\t\t\tsetColor(Color.PINK);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.2 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in dark fire\n\t\t\t\t\t\t\tsetColor(Utils.ColorDARKFIRE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SILVER:\n\t\t\t\t\tif (org._nTotalInfected > 0) {\n\t\t\t\t\t\tif ((org._nTotalKills > 0) || (org._isenhanced)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in gold\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t\t\t// This organism will be shown in pink\n\t\t\t\t\t\t\t\tsetColor(Color.PINK);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in pink\n\t\t\t\t\t\t\t\tsetColor(Color.PINK);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase WHITE:\n\t\t\t\tcase PLAGUE:\n\t\t\t\tcase CORAL:\n\t\t\t\tcase DARKOLIVE:\n\t\t\t\tcase DARKFIRE:\n\t\t\t\tcase LIGHTBROWN:\n\t\t\t\tcase GREENBROWN:\n\t\t\t\tcase POISONEDJADE:\n\t\t\t\tcase BROKEN:\n\t\t\t\tcase LIGHT_BLUE:\n\t\t\t\tcase DEEPSKY:\n\t\t\t\tcase ICE:\n\t\t\t\tcase DEADBARK:\n\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in pink\n\t\t\t\t\t\tsetColor(Color.PINK);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BROWN:\n\t\t\t\t\tif ((_isakiller < 2) || (_geneticCode.getModifiespink())) {\n\t\t\t\t\t if (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in pink\n\t\t\t\t\t\t setColor(Color.PINK);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase OLDBARK:\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\tif (useEnergy(Utils.PINK_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.1 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in green brown\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t // This organism will be shown in pink\n\t\t\t\t\t\t setColor(Color.PINK);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BARK:\n\t\t\t \torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\t\n\t\t\t\t}\n\t\t\t\t// energy interchange\n\t\t\t\torg._energy -= takenEnergy;\n\t\t\t\t_energy += takenEnergy;\n\t\t\t\tdouble CO2freed3 = takenEnergy * Utils.ORGANIC_SUBS_PRODUCED;\n\t\t\t\tuseEnergy(CO2freed3);\n\t\t\t\tbreak;\n\t\tcase MAROON:\n\t\t\t// Maroon segment: try to get energy from plants and feed on ochre, sky, darkolive and cracked light blue segments\n\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\tcase BLUE:\n\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t if (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tif (org._isenhanced) {\n\t\t\t\t\t\t\t useEnergy(Utils.between((0.1 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t org.setColor(Color.BLUE);\n\t\t\t\t\t } else {\n\t\t\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\t\t\tif (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase WHITE:\n\t\t\t\tcase PLAGUE:\n\t\t\t\tcase SPIKE:\n\t\t\t\tcase BROKEN:\n\t\t\t\tcase LIGHT_BLUE:\n\t\t\t\tcase DEEPSKY:\n\t\t\t\tcase DARKOLIVE:\n\t\t\t\tcase OCHRE:\n\t\t\t\tcase DARKJADE:\n\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\tif (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION)) { \n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in maroon\n\t\t\t\t\t\t setColor(Utils.ColorMAROON);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase OLDBARK:\n\t\t\t\t\tif (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION)) { \n\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.1 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in green brown\n\t\t\t\t\t\t\torg.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t}\n\t\t\t\t\t // This organism will be shown in maroon\n\t\t\t\t\t setColor(Utils.ColorMAROON);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase BARK:\n\t\t\t \torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t \tbreak;\n\t\t\t\tcase GREEN:\n\t\t\t\tcase FOREST:\n\t\t\t\tcase SPRING:\n\t\t\t\tcase LIME:\n\t\t\t\tcase C4:\n\t\t\t\tcase JADE:\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRASS:\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((0.5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in green brown\n\t\t\t\t\t\t\torg.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase CYAN:\n\t\t\t\tcase TEAL:\n\t\t\t\tcase YELLOW:\n\t\t\t\tcase AUBURN:\n\t\t\t\tcase INDIGO:\n\t\t\t\tcase BLOND:\n\t\t\t\tcase DARKGRAY:\n\t\t\t\tcase GOLD:\n\t\t\t\t\tif ((_isenhanced) && (org._isaplant)) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase ICE:\n\t\t\t\tcase DEADBARK:\n\t\t\t\t\tif ((_isafreezer) && (org._isaplant) && (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase RED:\n\t\t\t\t\tbreak;\n\t\t\t\tcase FIRE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase ORANGE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase MAROON:\n\t\t\t\t\tbreak;\n\t\t\t\tcase PINK:\n\t\t\t\t\tbreak;\n\t\t\t\tcase CREAM:\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tcase LILAC:\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKLILAC:\n\t\t\t\t\tbreak;\n\t\t\t\tcase SPIKEPOINT:\n\t\t\t\t\tbreak;\n\t\t\t\tcase SKY:\n\t\t\t\t\tbreak;\n\t\t\t\tcase OLIVE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase BROWN:\n\t\t\t\t\tbreak;\n\t\t\t\tcase SILVER:\n\t\t\t\t\tif ((org._nTotalKills > 0) || (org._isenhanced)) {\n\t\t break;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((org._isaplant) && (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase MINT:\n\t\t\t\tcase MAGENTA:\n\t\t\t\tcase ROSE:\n\t\t\t\t\tif (_geneticCode.getAltruist()) {\n\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((_isenhanced) && (org._isaplant)) {\n\t\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ((_isenhanced) && (org._isaplant) && (useEnergy(Utils.MAROON_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t// This organism will be shown in maroon\n\t\t\t\t\t\tsetColor(Utils.ColorMAROON);\t\t\t\t\t\t\t\t \n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t// energy interchange\n\t\t\t\torg._energy -= takenEnergy;\n\t\t\t\t_energy += takenEnergy;\n\t\t\t\tdouble CO2freed4 = takenEnergy * Utils.ORGANIC_SUBS_PRODUCED;\n\t\t\t\tuseEnergy(CO2freed4);\n\t\t\t\torg._hasdodged =true;\n\t\t\t\tbreak;\n\t\tcase CREAM:\n\t\t\t// Cream segment: Parasitize on other organisms\n\t\t\ttakenEnergy = handleCream(org, seg, oseg, takenEnergy);\n\t\t\t// energy interchange\n\t\t\t\torg._energy -= takenEnergy;\n\t\t\t\t_energy += takenEnergy;\n\t\t\t\tdouble CO2freed5 = takenEnergy * Utils.CREAM_ORGANIC_SUBS_PRODUCED;\n\t\t\t\tuseEnergy(CO2freed5);\n\t\t\t\torg._hasdodged =true;\n\t\t\t\tbreak;\n\t\tcase LILAC:\n\t\t\t// Lilac segment: Weaken organisms\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase JADE:\n\t\t\tcase TEAL:\n\t\t\tcase CYAN:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase INDIGO:\n\t\t\tcase BLOND:\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t \tif ((_geneticCode.getModifieslilac()) || (org._isaconsumer)) {\n\t\t \t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((10 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t// This organism will be shown in lilac\n\t\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \t}\n\t\t \tbreak;\n\t\t\tcase GRASS:\n\t\t\t\tif ((_geneticCode.getModifieslilac()) || (org._isaconsumer)) {\n\t\t \t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t // This organism will be shown in lilac\n\t\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \t}\n\t\t \tbreak;\n\t\t case BLUE:\n\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Color.BLUE);\n\t\t\t\t} else {\n\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((10 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t// This organism will be shown in lilac\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t case DARKJADE:\n\t\t case OLDBARK:\n\t\t case WHITE:\n\t\t case BROWN:\n\t\t \tif ((_geneticCode.getModifieslilac()) || ((org._isaconsumer) && (org.alive))) {\n\t\t \t\tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((10 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t// This organism will be shown in lilac\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \t}\n\t\t\t\tbreak;\n\t\t case RED:\n\t\t \tif (org._isenhanced) {\n\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((10 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t// This organism will be shown in lilac\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t case OLIVE:\n\t\t\t\tif ((!org._isaplant) || (org._isenhanced)) {\n\t break;\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((10 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t// This organism will be shown in lilac\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\n\t\t case MINT:\n\t\t case MAGENTA:\n\t\t case ROSE:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n break;\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((10 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t// This organism will be shown in lilac\n\t\t\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t case SPIKEPOINT:\n\t\t \tbreak;\n\t\t case BARK:\n\t\t\t\torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\tbreak;\n\t\t default:\n\t\t \tif (useEnergy(Utils.LILAC_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\ttakenEnergy = Utils.between((10 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t// This organism will be shown in lilac\n\t\t\t\t\tsetColor(Utils.ColorLILAC);\n\t\t\t\t\t// Organism has to recharge\n\t\t\t\t\tif (!_isenhanced) {\n\t\t\t\t\t\t_segColor[seg] = Utils.ColorDARKLILAC;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t// energy interchange\n\t\t\torg._energy -= takenEnergy;\n\t\t\t_energy += takenEnergy;\n\t\t\tdouble CO2freed6 = takenEnergy;\n\t\t\tuseEnergy(CO2freed6);\n\t\t\torg._hasdodged =true;\n\t\t\tbreak;\n\t\tcase SPIKEPOINT:\n\t\t\t// Spike segment: Hurts organisms, if it hits with its end point, enhanced SPIKE can feed on other organisms\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase JADE:\n\t\t\tcase TEAL:\n\t\t\tcase CYAN:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase INDIGO:\n\t\t\tcase BLOND:\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t\t\tif (_isenhanced) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((0.75 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GRASS:\n\t\t\t\tif (_isenhanced) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((0.375 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in green brown\n\t\t\t\t\t\t org.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((2.5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Color.BLUE);\n\t\t\t\t} else {\n\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((0.75 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SKY:\n\t\t\t\tif (org.useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t} else {\n\t\t\t\t\t// Doesn't have energy to use the shield\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((0.75 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DEEPSKY:\n\t\t\t\t setColor(Utils.ColorSPIKE);\n\t\t\t org.setColor(Utils.ColorDEEPSKY);\n\t\t\t\tbreak;\n\t\t\tcase RED:\n\t\t \tif (org._isenhanced) {\n\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((0.75 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t \tbreak;\n\t\t\tcase MINT:\n\t\t case MAGENTA:\n\t\t case ROSE:\n\t\t \tif (_geneticCode.getAltruist()) {\n break;\n\t\t\t\t} else {\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t\t takenEnergy = Utils.between((0.75 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t case WHITE:\n\t\t \tif (_isenhanced) {\n\t\t \t\tif ((org._isaplant) || (org._isaconsumer) || (org._isplague) || (org._isenhanced) || (org._isfrozen)) {\n\t\t \t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t\t takenEnergy = Utils.between((0.75 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t \tbreak;\n\t\t case BARK:\n\t\t \torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\tbreak;\n\t\t case OLDBARK:\n\t\t \tbreak;\n\t\t case CREAM:\n\t\t \tbreak;\n\t\t case SPIKEPOINT:\n\t\t \tbreak;\n\t\t case OLIVE:\n\t\t \tbreak;\n\t\t case BROWN:\n\t\t \tbreak;\n\t\t\tdefault:\n\t\t\t\tif (_isenhanced) {\n\t\t\t\t\tif (useEnergy(Utils.DARKGRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length\n\t\t\t\t\t takenEnergy = Utils.between((0.75 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.SPIKE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t// Get energy depending on segment length\n\t\t\t\t\t\ttakenEnergy = Utils.between((5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t// The other organism will be shown in dark lilac\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t // This organism will be shown in spike\n\t\t\t\t\t\tsetColor(Utils.ColorSPIKE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// energy interchange\n\t\t\torg._energy -= takenEnergy;\n\t\t\t_energy += takenEnergy;\n\t\t\tif (_isenhanced) {\n\t\t\t\tdouble CO2freed9 = takenEnergy * Utils.ORGANIC_SUBS_PRODUCED;\n\t\t\t\tuseEnergy(CO2freed9);\n\t\t\t} else {\n\t\t\t double CO2freed9 = takenEnergy;\n\t\t\t useEnergy(CO2freed9);\n\t\t\t}\n\t\t\torg._hasdodged =true;\n\t\t\tbreak;\n\t\tcase OCHRE:\n\t\t\t// Ochre segment: Push other organisms away\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase BROWN:\n\t\t \tbreak;\n\t\t\tcase OLIVE:\n\t\t\t\tif ((!org._isaplant) || (org._isenhanced)) {\n\t break;\n\t\t\t\t} else {\n\t\t\t\t\tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.OCHRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tdx=0;\n\t\t\t\t\t\tdy=0;\n\t\t\t\t\t\tdtheta=0;\n\t\t\t\t\t\torg.dx=Utils.between((org._dCenterX-_dCenterX)*_m[seg]*_m[seg]*_m[seg]/org._mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\torg.dy=Utils.between((org._dCenterY-_dCenterY)*_m[seg]*_m[seg]*_m[seg]/org._mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\torg.dtheta=0;\n\t\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\t\torg.useEnergy(Utils.between((FastMath.abs(org.dx) + FastMath.abs(org.dy)) * (Utils.ORGANIC_OBTAINED_ENERGY/14), 0, org._energy));\n\t\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetColor(Utils.ColorOCHRE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OCHRE:\n\t\t\t\tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.OCHRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tdx=0;\n\t\t\t\t\tdy=0;\n\t\t\t\t\tdtheta=0;\n\t\t\t\t\torg.dx=Utils.between((org._dCenterX-_dCenterX)*_m[seg]*_m[seg]*_m[seg]/org._mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\torg.dy=Utils.between((org._dCenterY-_dCenterY)*_m[seg]*_m[seg]*_m[seg]/org._mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\torg.dtheta=0;\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\torg.useEnergy(Utils.between((FastMath.abs(org.dx) + FastMath.abs(org.dy)) * (Utils.ORGANIC_OBTAINED_ENERGY/140), 0, org._energy));\n\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t}\n\t\t\t\t\tsetColor(Utils.ColorOCHRE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (Utils.random.nextInt(2)<1 && useEnergy(Utils.OCHRE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tdx=0;\n\t\t\t\t\tdy=0;\n\t\t\t\t\tdtheta=0;\n\t\t\t\t\torg.dx=Utils.between((org._dCenterX-_dCenterX)*_m[seg]*_m[seg]*_m[seg]/org._mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\torg.dy=Utils.between((org._dCenterY-_dCenterY)*_m[seg]*_m[seg]*_m[seg]/org._mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\torg.dtheta=0;\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\torg.useEnergy(Utils.between((FastMath.abs(org.dx) + FastMath.abs(org.dy)) * (Utils.ORGANIC_OBTAINED_ENERGY/14), 0, org._energy));\n\t\t\t\t\t\torg.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t}\n\t\t\t\t\tsetColor(Utils.ColorOCHRE);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t_hasdodged =true;\n\t\t\tbreak;\n\t\tcase WHITE:\n\t\t\t// White segment: try to infect the other organism\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase GRASS:\n\t\t\tcase TEAL:\n\t\t\tcase CYAN:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase BLOND:\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t if (!org._isenhanced) {\n\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\t if (!_dodge) {\n\t\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase JADE:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t if (!org._isenhanced) {\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t if (!_dodge) {\n\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t \t\torg._segColor[oseg] = Utils.ColorDARKJADE;\n\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \t\torg._segColor[oseg] = Utils.ColorDARKJADE;\n\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DARKJADE:\n\t\t\tcase POISONEDJADE:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((_nChildren > 1) && (!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t if (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \tif (org._isenhanced) {\n\t\t\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetColor(Color.WHITE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t org.setColor(Color.BLUE);\n\t\t\t\t } else {\n\t\t\t\t \tif (_isaplant) {\n\t\t\t\t \t\tif (!_dodge) {\n\t\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LIGHT_BLUE:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif ((!_isenhanced) && (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t org.setColor(Utils.ColorLIGHT_BLUE);\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (!_dodge) {\n\t\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SKY:\n\t\t\t\tif (!_isfrozen) {\n\t\t\t\t\tif (org.useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\t\tsetColor(Color.WHITE);\n\t\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t } else {\n\t\t\t \tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t \t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\t\t if (_isaplant) {\n\t\t\t\t\t\t\t \tif (!_dodge) {\n\t\t\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DEEPSKY:\n\t\t\t\tif (!_isfrozen) {\n\t\t\t\t\tsetColor(Color.WHITE);\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OLIVE:\n\t\t\tcase DARKOLIVE:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t if (_isaplant) {\n\t\t\t\t\t \tif (_isenhanced) {\n\t\t\t\t\t \t\tif (!_dodge) {\n\t\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WHITE:\n\t\t\tcase PLAGUE:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (!_dodge) {\n\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((org._indigo > 0) && (!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t org.setColor(Utils.ColorINDIGO);\n\t\t\t\t \t setColor(Color.WHITE);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t } else {\n\t\t\t\t \tif ((_indigo == 0) || (_isaconsumer)) {\n\t\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t\t\t \t setColor(Color.WHITE);\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SILVER:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (_nTotalInfected >= org._nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t if (_isaplant) {\n\t\t\t\t\t \tif (!_dodge) {\n\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((org._indigo > 0) && (!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t org.setColor(Utils.ColorINDIGO);\n\t\t\t\t \t setColor(Color.WHITE);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t } else {\n\t\t\t\t \tif ((_indigo == 0) || (_isaconsumer)) {\n\t\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t\t\t \t setColor(Color.WHITE);\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIGO:\n\t\t\t\tif (_isaplant) {\n\t\t\t\t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t \t org.setColor(Utils.ColorINDIGO);\n\t\t\t \t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t } else {\n\t\t\t \tif ((_indigo == 0) || (_isaconsumer)) {\n\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t\t \t setColor(Color.WHITE);\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\tbreak;\n\t\t\tcase CORAL:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t if (_isaplant) {\n\t\t\t\t\t \tif (!_dodge) {\n\t\t\t\t\t \t\tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t if ((!org._isenhanced) && (!_isaconsumer) && (org.useEnergy(Utils.CORAL_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t \torg.setColor(Utils.ColorCORAL);\n\t\t\t\t\t\t\t\t org._energy += _energy;\n\t\t\t\t\t\t\t\t\t_energy -= _energy;\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \torg.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t\t }\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MAGENTA:\n\t\t\tcase ROSE:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (!_geneticCode.getAltruist())) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t if (!org._isenhanced) {\n\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\t\tif (!_dodge) {\n\t\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PINK:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif (org._geneticCode.getModifiespink()) {\n\t\t\t\t\t if (_isaplant) {\n\t\t\t\t\t \tif (!_dodge) {\n\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((!org._isantiviral) && (_isenhanced) && (!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase CREAM:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t if (_isaplant) {\n\t\t\t\t\t \tif (_isenhanced) {\n\t\t\t\t\t \t\tif (!_dodge) {\n\t\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((!org._isantiviral) && (_isenhanced) && (!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t\tif ((!org._isantiviral) && (_isenhanced) && (!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MINT:\n\t\t\t\tbreak;\n\t\t\tcase BARK:\n\t\t\t\torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\tbreak;\n\t\t\tcase OLDBARK:\n\t\t\t\tbreak;\n\t\t\tcase OCHRE:\n\t\t\t\tbreak;\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (org._infectedGeneticCode != _geneticCode) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t if (_isaplant) {\n\t\t\t\t\t \tif (!_dodge) {\n\t\t\t\t\t\t \tif (useEnergy(Utils.WHITE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \t_hasdodged =true;\n\t\t\t\t\t\t \tif (!org._isenhanced) {\n\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t \tif (useEnergy(Utils.VIRUS_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorLIGHTBROWN);\n\t\t\t\t\t setColor(Color.WHITE);\n\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PLAGUE:\n\t\t\t// Force reproduction of infected victims\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase GRASS:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (!org._isantiviral)) {\n\t\t\t\t\tif (!_geneticCode.getPlague()) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase JADE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (!org._isantiviral)) {\n\t\t\t\t\tif (!_geneticCode.getPlague()) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKJADE;\n\t\t\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKJADE;\n\t\t\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DARKJADE:\n\t\t\tcase POISONEDJADE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (!org._isantiviral)) {\n\t\t\t\t\tif (!_geneticCode.getPlague()) {\n\t\t\t\t\t\tif ((_nChildren > 1) && (!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (!org._isantiviral)) {\n\t\t\t\t\tif ((!_geneticCode.getPlague()) && (org._isaplant)) {\n\t\t\t\t if (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \tif (org._isenhanced) {\n\t\t\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t org.setColor(Color.BLUE);\n\t\t\t\t } else {\n\t\t\t\t \tif (_isaplant) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OCHRE:\n\t\t\tcase BARK:\n\t\t\tcase OLDBARK:\n\t\t\tcase LIGHT_BLUE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (!org._isantiviral)) {\n\t\t\t\t\tif ((!_geneticCode.getPlague()) && (org._isaplant)) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SKY:\n\t\t\tcase DEEPSKY:\n\t\t\tcase OLIVE:\n\t\t\tcase DARKOLIVE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (_isenhanced) && (!org._isantiviral)) {\n\t\t\t\t\tif ((!_geneticCode.getPlague()) && (org._isaplant)) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MAROON:\n\t\t\tcase ORANGE:\n\t\t\tcase FIRE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (_geneticCode.getPlague()) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RED:\n\t\t\tcase CREAM:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (_isenhanced) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (_geneticCode.getPlague()) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PINK:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && ((org._geneticCode.getModifiespink()) || (_isenhanced)) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (_geneticCode.getPlague()) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LIGHTBROWN:\n\t\t\tcase GREENBROWN:\n\t\t\tcase DARKFIRE:\n\t\t\tcase BROKEN:\n\t\t\tcase ICE:\n\t\t\tcase DEADBARK:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (((_geneticCode.getPlague()) && (org._isaconsumer)) || ((!_geneticCode.getPlague()) && (org._isaplant))) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WHITE:\n\t\t\tcase PLAGUE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (((_geneticCode.getPlague()) && (org._isaconsumer)) || ((!_geneticCode.getPlague()) && (org._isaplant))) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((org._indigo > 0) && (!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t org.setColor(Utils.ColorINDIGO);\n\t\t\t\t \t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t } else {\n\t\t\t\t \tif ((_indigo == 0) || (_isaconsumer)) {\n\t\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t\t \t\t\t\tsetColor(Utils.ColorPLAGUE);\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SILVER:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (_nTotalInfected >= org._nTotalInfected) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (((_geneticCode.getPlague()) && (org._isaconsumer)) || ((!_geneticCode.getPlague()) && (org._isaplant))) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((org._indigo > 0) && (!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t org.setColor(Utils.ColorINDIGO);\n\t\t\t\t \t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t } else {\n\t\t\t\t \tif ((_indigo == 0) || (_isaconsumer)) {\n\t\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t\t \t\t\t\tsetColor(Utils.ColorPLAGUE);\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIGO:\n\t\t\t\tif (_isaplant) {\n\t\t\t\t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t \t org.setColor(Utils.ColorINDIGO);\n\t\t\t \t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t } else {\n\t\t\t \tif ((_indigo == 0) || (_isaconsumer)) {\n\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t \t\t\t\tsetColor(Utils.ColorPLAGUE);\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\tbreak;\n\t\t\tcase CYAN:\n\t\t\tcase TEAL:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase BLOND:\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (((_geneticCode.getPlague()) && (org._isaconsumer)) || ((!_geneticCode.getPlague()) && (org._isaplant))) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MAGENTA:\n\t\t\tcase ROSE:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (!_geneticCode.getAltruist()) && ((!org._isantiviral) || (org._indigo == 0))) {\n\t\t\t\t\tif (((_geneticCode.getPlague()) && (org._isaconsumer)) || ((!_geneticCode.getPlague()) && (org._isaplant))) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase MINT:\n\t\t\t\tbreak;\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tbreak;\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif ((org._infectedGeneticCode == _geneticCode) && (!org._isantiviral)) {\n\t\t\t\t\tif (((_geneticCode.getPlague()) && (org._isaconsumer)) || ((!_geneticCode.getPlague()) && (org._isaplant))) {\n\t\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.PLAGUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SCOURGE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.reproduceVirus();\n\t\t\t\t\t org.setColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t setColor(Utils.ColorPLAGUE);\n\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SILVER:\n\t\t\t// Silver segment: infects all other organism, if it has more infections , duels with other absorbing segments\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase TEAL:\n\t\t\tcase CYAN:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase BLOND:\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\tsetColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t } \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t} else {\n\t\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t\ttakenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in gold\n\t\t\t\t\t\t\tsetColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase JADE:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \t\torg._segColor[oseg] = Utils.ColorDARKJADE;\n\t\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t } \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t} else {\n\t\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t\ttakenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in gold\n\t\t\t\t\t\t\tsetColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DARKJADE:\n\t\t\tcase POISONEDJADE:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((_nChildren > 1) && (!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GRASS:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t } \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t} else {\n\t\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t\ttakenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(0.5 * FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in green brown\n\t\t\t\t\t\t\torg.setColor(Utils.ColorGREENBROWN);\n\t\t\t\t\t\t\t// This organism will be shown in gold\n\t\t\t\t\t\t\tsetColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RED:\n\t\t\t if ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t \tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t if ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in red\n\t\t\t\t\t org.setColor(Color.RED);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FIRE:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in fire\n\t\t\t\t\t org.setColor(Utils.ColorFIRE);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ORANGE:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in orange\n\t\t\t\t\t org.setColor(Color.ORANGE);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PINK:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif (org._geneticCode.getModifiespink()) {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t \t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\tif (_nTotalInfected > 0) {\n\t\t\t\t\t\tif (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in pink\n\t\t\t\t\t\t org.setColor(Color.PINK);\n\t\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SILVER:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t \t}\n\t\t\t\t}\n\t\t\t\tif ((org._indigo > 0) && (_nTotalInfected > 0) && (!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\tif ((_indigo == 0) || (_isaplant) || (_isaconsumer)) {\n\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t \t\t\t\tsetColor(Color.LIGHT_GRAY);\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\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\tif ((org._nTotalKills > 0) || (org._isenhanced)) {\n\t\t\t\t\t\tif (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in gold\n\t\t\t\t\t\t org.setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WHITE:\n\t\t\tcase PLAGUE:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t \t}\n\t\t\t\t}\n\t\t\t\tif ((org._indigo > 0) && (_nTotalInfected > 0) && (!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\tif ((_indigo == 0) || (_isaplant) || (_isaconsumer)) {\n\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t \t\t\t\tsetColor(Color.LIGHT_GRAY);\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\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer) || (org._isplague) || (org._isenhanced) || (org._isfrozen)) {\n\t\t\t\t\t\tif (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIGO:\n\t\t\t\tif (_nTotalInfected > 0) {\n\t\t\t\t\tif ((_indigo == 0) || (_isaplant) || (_isaconsumer)) {\n\t\t\t \t\tif (org.useEnergy(Utils.INDIGO_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t \t\t\t\torg.setColor(Utils.ColorINDIGO);\n\t\t\t \t\t\t\tsetColor(Color.LIGHT_GRAY);\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\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t } else {\n\t\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t// Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t\ttakenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t// This organism will be shown in gold\n\t\t\t\t\t\t\tsetColor(Utils.ColorGOLD);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORAL:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t if ((!org._isenhanced) && (!_isaplant) && (!_isaconsumer) && (org.useEnergy(Utils.CORAL_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t \torg.setColor(Utils.ColorCORAL);\n\t\t\t\t\t\t\t\t org._energy += _energy;\n\t\t\t\t\t\t\t\t\t_energy -= _energy;\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t \torg.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t }\n\t\t\t\t}\n\t\t break;\n\t\t\tcase ICE:\n\t\t\tcase DEADBARK:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t if ((_isafreezer) && (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MINT:\n\t\t\tcase MAGENTA:\n\t\t\tcase ROSE:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n break;\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t\t\tsetColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\t// Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t\t\t\ttakenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t\t\t\t// The other organism will be shown in yellow\n\t\t\t\t\t\t\t\torg.setColor(Color.YELLOW);\n\t\t\t\t\t\t\t\t// This organism will be shown in gold\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorGOLD);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CREAM:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t \tif (org._isaplant) {\n\t\t\t \t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MAROON:\n\t\t\tcase BLUE:\n\t\t\tcase LIGHT_BLUE:\n\t\t\tcase SKY:\n\t\t\tcase DEEPSKY:\n\t\t\tcase OCHRE:\n\t\t\tcase OLIVE:\n\t\t\tcase DARKOLIVE:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BARK:\n\t\t\tcase OLDBARK:\n\t\t\t\torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tbreak;\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._nTotalInfected < _nTotalInfected)) {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer)) {\n\t\t\t\t\t\tif ((!_dodge) || (!_isaplant)) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.SILVER_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org.infectedBy(this);\n\t\t\t\t\t\t org.setColor(Utils.ColorBLOND);\n\t\t\t\t\t\t setColor(Color.LIGHT_GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t \t_hasdodged =true;\t\t\t\t\t\t \t\n\t\t\t\t\t\t\torg._hasdodged =true;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\t if (useEnergy(Utils.EXPERIENCE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t // Get energy depending on segment length and relation between kills of both organisms\n\t\t\t\t\t takenEnergy = Utils.between(((_nTotalKills+18)/(org._nTotalKills+18))*(FastMath.log10(_m[seg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, org._energy);\n\t\t\t\t\t // The other organism will be shown in yellow\n\t\t\t\t\t org.setColor(Color.YELLOW);\n\t\t\t\t\t // This organism will be shown in gold\n\t\t\t\t\t setColor(Utils.ColorGOLD);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t\t// energy interchange\n\t\t\torg._energy -= takenEnergy;\n\t\t\t_energy += takenEnergy;\n\t\t\tdouble CO2freed8 = takenEnergy * Utils.ORGANIC_SUBS_PRODUCED;\n\t\t\tuseEnergy(CO2freed8);\n\t\t\tif ((_nTotalKills > 0) || (_isenhanced)) {\n\t\t\t\torg._hasdodged =true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase CORAL:\n\t\t\t// Transform viruses and particles into children\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase WHITE:\n\t\t\tcase PLAGUE:\n\t\t\tcase SILVER:\n\t\t\t\tif ((!org._isaplant) && (!org._isaconsumer) && (!org._isauburn)) {\n\t\t\t\t\tif (((!_isaplant) && (!_isaconsumer)) || (_isenhanced)) {\n\t\t\t\t\t\tif (useEnergy(Utils.CORAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tsetColor(Utils.ColorCORAL);\n\t\t\t\t\t\t\torg.infectedBy(this);\n\t\t\t\t\t\t\torg.transform();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MAGENTA:\n\t\t\tcase ROSE:\n\t\t\t\tif ((!org._isaplant) && (!org._isaconsumer) && (!_geneticCode.getAltruist())) {\n\t\t\t\t\tif (((!_isaplant) && (!_isaconsumer)) || (_isenhanced)) {\n\t\t\t\t\t\tif (useEnergy(Utils.CORAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tsetColor(Utils.ColorCORAL);\n\t\t\t\t\t\t\torg.infectedBy(this);\n\t\t\t\t\t\t\torg.transform();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\tcase SKY:\n\t\t\tcase DEEPSKY:\n\t\t\tcase OCHRE:\n\t\t\tcase CORAL:\n\t\t\tcase VIOLET:\n\t\t\tcase GRAY:\n\t\t\tcase LILAC:\n\t\t\tcase DARKLILAC:\n\t\t\tcase SPIKEPOINT:\n\t\t\tcase MINT:\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif ((!org._isaplant) && (!org._isaconsumer)) {\n\t\t\t\t\tif (((!_isaplant) && (!_isaconsumer)) || (_isenhanced)) {\n\t\t\t\t\t\tif (useEnergy(Utils.CORAL_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tsetColor(Utils.ColorCORAL);\n\t\t\t\t\t\t\torg.infectedBy(this);\n\t\t\t\t\t\t\torg.transform();\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\tbreak;\n\t\tcase MINT:\n\t\t\t// Mint segment: Remove an infection, corrupt all white and cream segments.\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tcase MINT:\n\t\t\t\tif ((_infectedGeneticCode != null) || (org._infectedGeneticCode != null)) {\n\t\t\t\t if (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_infectedGeneticCode = null;\n\t\t\t\t\t\torg._infectedGeneticCode = null;\n\t\t\t\t\t\torg.setColor(Utils.ColorMINT);\n\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CREAM:\n\t\t\t\tif (org._isaplant) {\n\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org._segColor[oseg] = Utils.ColorBROKEN;\n\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (org._isregenerative) {\n\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorDARKFIRE;\n\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t}\n\t\t\t\t } else {\n\t\t\t\t \tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._infectedGeneticCode != null)) {\n\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._infectedGeneticCode = null;\n\t\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase WHITE:\n\t\t\tcase PLAGUE:\n\t\t\tcase CORAL:\n\t\t\t\tfor (int a = 0; a < org._segments; a++) {\n\t\t\t\t\tswitch (getTypeColor(org._segColor[a])) {\n\t\t\t\t\tcase WHITE:\n\t\t\t\t\tcase PLAGUE:\n\t\t\t\t\tcase CORAL:\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorBROKEN;\n\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ((!org._isantiviral) || (_isaplant) || (_isaconsumer) || (_iscoral)) {\n\t\t\t\t\t\t\t\t\tif ((org._isregenerative) && (!org._iscoral)) {\n\t\t\t\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorDARKFIRE;\n\t\t\t\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t \tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._infectedGeneticCode != null)) {\n\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._infectedGeneticCode = null;\n\t\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif ((!_isaplant) || (_isenhanced)) {\n\t\t\t\t\tfor (int a = 0; a < org._segments; a++) {\n\t\t\t\t\t\tswitch (getTypeColor(org._segColor[a])) {\n\t\t\t\t\t\tcase WHITE:\n\t\t\t\t\t\tcase PLAGUE:\n\t\t\t\t\t\tcase CORAL:\n\t\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorBROKEN;\n\t\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (org._isaconsumer) {\n\t\t\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif ((!org._isantiviral) || (_isaplant) || (_isaconsumer) || (_iscoral)) {\n\t\t\t\t\t\t\t\t\t\tif ((org._isregenerative) && (!org._iscoral)) {\n\t\t\t\t\t\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorDARKFIRE;\n\t\t\t\t\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t \tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION/8)) {\n\t\t\t\t\t\t\t\t\t\t\t org._segColor[a] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t\t\t\t\t\t setColor(Utils.ColorMINT);\n\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t\tif ((org._infectedGeneticCode != _geneticCode) && (org._infectedGeneticCode != null)) {\n\t\t\t\t\t\tif (useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._infectedGeneticCode = null;\n\t\t\t\t\t\t\torg.setColor(Color.CYAN);\n\t\t\t\t\t\t\tsetColor(Utils.ColorMINT);\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\tbreak;\n\t\tcase MAGENTA:\n\t\t\t// Magenta segment: Heal all sick segments\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tcase MAGENTA:\n\t\t\t for (int j = 0; j < org._segments; j++) {\n\t\t\t \tif ((org._segColor[j] == Utils.ColorLIGHTBROWN) || (org._segColor[j] == Utils.ColorGREENBROWN) || (org._segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t|| (org._segColor[j] == Utils.ColorBROKEN) || (org._segColor[j] == Utils.ColorLIGHT_BLUE) || (org._segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t|| (org._segColor[j] == Utils.ColorDARKJADE) || (org._segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t\t if (useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._segColor[j] = org._geneticCode.getGene(j%org._geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t\t\torg.setColor(Color.MAGENTA);\n\t\t\t\t\t\t\tsetColor(Color.MAGENTA);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t for (int j = 0; j < org._segments; j++) {\n\t\t\t \tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t\t\tif ((org._segColor[j] == Utils.ColorLIGHTBROWN) || (org._segColor[j] == Utils.ColorGREENBROWN) || (org._segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t || (org._segColor[j] == Utils.ColorBROKEN) || (org._segColor[j] == Utils.ColorLIGHT_BLUE) || (org._segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t || (org._segColor[j] == Utils.ColorDARKJADE) || (org._segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t if (useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t org._segColor[j] = org._geneticCode.getGene(j%org._geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t\t setColor(Color.MAGENTA);\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t \n\t\t\t}\n\t\t\tbreak;\n\t\tcase ROSE:\n\t\t\t// Rose segment: Transfers energy\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (_geneticCode.getAltruist() && org._geneticCode.getAltruist()) {\n\t\t\t\t\tif ((_energy > (org._energy+1)) && (_energy > (_geneticCode._reproduceEnergy/2)) && (org._energy < (org._geneticCode._reproduceEnergy/2))) {\n\t\t\t\t\t\tif ((_growthRatio==1) && (useEnergy(Utils.ROSE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t // Transfers energy\n\t\t\t\t\t\t takenEnergy = Utils.between(0.1 * Utils.ORGANIC_OBTAINED_ENERGY, 0, (_energy - (org._energy+1)));\n\t\t\t\t\t\t // The other organism will be shown in cyan\n\t\t\t\t\t\t org.setColor(Color.CYAN);\n\t\t\t\t\t\t // This organism will be shown in rose\n\t\t\t\t\t\t setColor(Utils.ColorROSE);\n\t\t\t\t\t\t org._energy += takenEnergy;\n\t\t\t\t\t\t _energy -= takenEnergy;\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\tbreak;\n\t\tcase SKY:\n\t\t\t// Sky segment: Freeze another organism by disabling its photosynthetic and movement segments, protects itself with a frost shield\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\t\tif ((!_isenhanced) && (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Color.BLUE);\n\t\t\t\t} else {\n\t\t\t\t\tfor (int y = 0; y < org._segments; y++) {\n\t\t\t\t\tswitch (getTypeColor(org._segColor[y])) {\n\t\t\t\t\tcase SKY:\n\t\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorLIGHT_BLUE;\n\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase CYAN:\n\t\t\t\t\tcase TEAL:\n\t\t\t\t\tcase SPRING:\n\t\t\t\t\tcase LIME:\n\t\t\t\t\tcase GREEN:\n\t\t\t\t\tcase FOREST:\n\t\t\t\t\tcase C4:\n\t\t\t\t\tcase GRASS:\n\t\t\t\t\tcase JADE:\n\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\tcase POISONEDJADE:\n\t\t\t\t\tcase GREENBROWN:\n\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorICE;\n\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase OLDBARK:\n\t\t\t\t\tcase BARK:\n\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorDEADBARK;\n\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t }}}\n\t\t\t break;\n\t\t\tcase SKY:\n\t\t\t\tif ((useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) && (org.useEnergy(Utils.SKY_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t_segColor[seg] = Utils.ColorDEEPSKY;\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\tsetColor(Utils.ColorDEEPSKY);\n\t\t\t\t org.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t break;\n\t\t\tcase OLIVE:\n\t\t\t\tif ((!org._isaplant) || (org._isenhanced)) {\n\t break;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (int y = 0; y < org._segments; y++) {\n\t\t\t\t\t\tswitch (getTypeColor(org._segColor[y])) {\n\t\t\t\t\t\tcase SKY:\n\t\t\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorLIGHT_BLUE;\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase CYAN:\n\t\t\t\t\t\tcase TEAL:\n\t\t\t\t\t\tcase SPRING:\n\t\t\t\t\t\tcase LIME:\n\t\t\t\t\t\tcase GREEN:\n\t\t\t\t\t\tcase FOREST:\n\t\t\t\t\t\tcase C4:\n\t\t\t\t\t\tcase GRASS:\n\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\tcase POISONEDJADE:\n\t\t\t\t\t\tcase GREENBROWN:\n\t\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorICE;\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase OLDBARK:\n\t\t\t\t\t\tcase BARK:\n\t\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorDEADBARK;\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t}}}\n\t\t\t\tbreak;\n\t\t\tcase MINT:\n\t\t\tcase MAGENTA:\n\t\t\tcase ROSE:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n\t break;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (int y = 0; y < org._segments; y++) {\n\t\t\t\t\t\tswitch (getTypeColor(org._segColor[y])) {\n\t\t\t\t\t\tcase SKY:\n\t\t\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorLIGHT_BLUE;\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase CYAN:\n\t\t\t\t\t\tcase TEAL:\n\t\t\t\t\t\tcase SPRING:\n\t\t\t\t\t\tcase LIME:\n\t\t\t\t\t\tcase GREEN:\n\t\t\t\t\t\tcase FOREST:\n\t\t\t\t\t\tcase C4:\n\t\t\t\t\t\tcase GRASS:\n\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\tcase POISONEDJADE:\n\t\t\t\t\t\tcase GREENBROWN:\n\t\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorICE;\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase OLDBARK:\n\t\t\t\t\t\tcase BARK:\n\t\t\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg._segColor[y] = Utils.ColorDEADBARK;\n\t\t\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t}}}\n\t\t\t\tbreak;\n\t\t\tcase JADE:\n\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKJADE;\n\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfor (int y = 0; y < org._segments; y++) {\n\t\t\t\tswitch (getTypeColor(org._segColor[y])) {\n\t\t\t\tcase SKY:\n\t\t\t\tcase DEEPSKY:\n\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[y] = Utils.ColorLIGHT_BLUE;\n\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase CYAN:\n\t\t\t\tcase TEAL:\n\t\t\t\tcase SPRING:\n\t\t\t\tcase LIME:\n\t\t\t\tcase GREEN:\n\t\t\t\tcase FOREST:\n\t\t\t\tcase C4:\n\t\t\t\tcase GRASS:\n\t\t\t\tcase JADE:\n\t\t\t\tcase DARKJADE:\n\t\t\t\tcase POISONEDJADE:\n\t\t\t\tcase GREENBROWN:\n\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[y] = Utils.ColorICE;\n\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase OLDBARK:\n\t\t\t\tcase BARK:\n\t\t\t\t\tif (useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[y] = Utils.ColorDEADBARK;\n\t\t\t\t\t\tsetColor(Utils.ColorSKY);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t }}}\n\t\t break;\t\t\t\t\t\t\t\n\t\tcase GRAY:\n\t\t\t// Gray segment: Kill an organism\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase GRASS:\n\t\t\tcase TEAL:\n\t\t\tcase CYAN:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase INDIGO:\n\t\t\tcase BLOND:\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase JADE:\n\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKJADE;\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Color.BLUE);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SKY:\n\t\t\t\tif (org.useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DEEPSKY:\n\t\t\t\tif (_isaconsumer) {\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MINT:\n\t\t\tcase ROSE:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n break;\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MAGENTA:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n\t break;\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((org._isenhanced) && (org.useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t org.setColor(Color.MAGENTA);\n\t\t\t\t\t\t setColor(Color.GRAY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RED:\n\t\t\t\tif (org._isenhanced) {\n\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SILVER:\n\t\t\t\tif (_nTotalKills >= org._nTotalKills) {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OLIVE:\n\t\t\t\tif (org.useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t _segColor[seg] = Utils.ColorBROKEN;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_segColor[seg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Utils.ColorDARKOLIVE);\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKOLIVE;\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKOLIVE;\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OLDBARK:\n\t\t\t\tif ((_isenhanced) && (!_isaconsumer)) {\n\t\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg.die(this);\n\t\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BARK:\n\t\t\t\torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\tbreak;\n\t\t\tcase PINK:\n\t\t\t\tbreak;\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tbreak;\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (useEnergy(Utils.GRAY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\torg.die(this);\n\t\t\t\t\tsetColor(Color.GRAY);\n\t\t\t\t}\n\t\t\t}\n\t\t\torg._hasdodged =true;\n\t\t\tbreak;\t\t\t\t\n\t\tcase VIOLET:\n\t\t\t// Violet segment: Poison another segment and make it useless\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\tcase GREEN:\n\t\t\tcase FOREST:\n\t\t\tcase SPRING:\n\t\t\tcase LIME:\n\t\t\tcase C4:\n\t\t\tcase GRASS:\n\t\t\tcase TEAL:\n\t\t\tcase CYAN:\n\t\t\tcase YELLOW:\n\t\t\tcase AUBURN:\n\t\t\tcase INDIGO:\n\t\t\tcase BLOND:\n\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase JADE:\n\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t org._segColor[oseg] = Utils.ColorPOISONEDJADE;\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t\torg._remember =true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DARKJADE:\n\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t org._segColor[oseg] = Utils.ColorPOISONEDJADE;\n\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\torg._remember =true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\t\tif (org.useEnergy(Utils.BLUE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isenhanced) {\n\t\t\t\t\t useEnergy(Utils.between((0.5 * FastMath.log10(org._m[oseg])) * Utils.ORGANIC_OBTAINED_ENERGY, 0, _energy));\n\t\t\t\t\t\tsetColor(Utils.ColorDARKLILAC);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Color.BLUE);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SKY:\n\t\t\t\tif (org.useEnergy(Utils.SKY_ENERGY_CONSUMPTION)) {\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEEPSKY;\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DEEPSKY:\n\t\t\t\t\torg.setColor(Utils.ColorDEEPSKY);\n\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\tbreak;\n\t\t\tcase ROSE:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n break;\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MINT:\n\t\t\tcase MAGENTA:\n\t\t\t\tif (_geneticCode.getAltruist()) {\n\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t\t\torg._remember =true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DARKGRAY:\n\t\t\tcase GOLD:\n\t\t\t\tif ((org._dodge) && (!org._isaconsumer) && (org._isakiller == 0) && (org.useEnergy(Utils.DODGE_ENERGY_CONSUMPTION))) {\n\t\t\t\t\torg.setColor(Utils.ColorTEAL);\n\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t\torg._remember =true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OLIVE:\n\t\t\t\tif (org.useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (_isaplant) {\n\t\t\t\t\t _segColor[seg] = Utils.ColorBROKEN;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_segColor[seg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t}\n\t\t\t\t\torg.setColor(Utils.ColorDARKOLIVE);\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKOLIVE;\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKOLIVE;\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WHITE:\n\t\t\t\tif ((!_isaconsumer) && ((_isaplant) || (!org._ispoisonous) || (_iscoral) || (org._iscoral))) {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((org._isaplant) || (org._isaconsumer) || (org._isplague) || (org._isenhanced) || (org._isfrozen)) {\n\t\t\t\t\t if (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t \tif (org._isaplant) {\n\t\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t setColor(Utils.ColorVIOLET);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SILVER:\n\t\t\t\tif ((!_isaconsumer) || (_nTotalKills >= org._nTotalKills)) {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t setColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FIRE:\n\t\t\t\tif ((!_isaconsumer) || (org._isenhanced)) {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKFIRE;\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CREAM:\n\t\t\t\tif ((!_isaconsumer) && (org._isaplant)) {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t setColor(Utils.ColorVIOLET);\n\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDARKFIRE;\n\t\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LILAC:\n\t\t\tcase DARKLILAC:\n\t\t\tcase DARKOLIVE:\n\t\t\t\tif ((!_isaconsumer) || (_isenhanced)) {\n\t\t\t\t if (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t \tif (org._isaplant) {\n\t\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t setColor(Utils.ColorVIOLET);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BARK:\n\t\t\tcase OLDBARK:\n\t\t\t\torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\tif ((_isenhanced) || ((!_isaplant) && (!_isaconsumer))) {\n\t\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\t\t\t\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorDEADBARK;\n\t\t\t\t\t setColor(Utils.ColorVIOLET);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OCHRE:\n\t\t\t\tbreak;\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tbreak;\n\t\t\tcase ICE:\n\t\t\t\tbreak;\n\t\t\tcase DEADBARK:\n\t\t\t\tbreak;\n\t\t\tcase DARKFIRE:\n\t\t\t\tbreak;\n\t\t\tcase LIGHTBROWN:\n\t\t\t\tbreak;\n\t\t\tcase GREENBROWN:\n\t\t\t\tbreak;\n\t\t\tcase POISONEDJADE:\n\t\t\t\tbreak;\n\t\t\tcase BROWN:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (useEnergy(Utils.VIOLET_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t org._segColor[oseg] = Utils.ColorGREENBROWN;\n\t\t\t\t\t} else {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t}\n\t\t\t\t\tsetColor(Utils.ColorVIOLET);\n\t\t\t\t}\n\t\t\t}\n\t\t\torg._hasdodged =true;\n\t\t\tbreak;\n\t\tcase OLIVE:\n\t\t\t// Olive segment: Crack defense\n\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\t\t\t\n\t\t\tcase OLIVE:\n\t\t\t\tif (org._isaplant) {\n\t\t\t\t\tif (!_isaplant) {\n\t\t\t\t\t\tif (useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHT_BLUE;\n\t\t\t\t\t\t\tsetColor(Utils.ColorOLIVE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t if (useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t org._segColor[oseg] = Utils.ColorDARKOLIVE;\n\t\t\t\t setColor(Utils.ColorOLIVE);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DARKOLIVE:\n\t\t\t\tif (org._isaplant) {\n\t\t\t\t\tif (!_isaplant) {\n\t\t\t\t\t\tif (useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHT_BLUE;\n\t\t\t\t\t\t\tsetColor(Utils.ColorOLIVE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BLUE:\n\t\t\tcase OCHRE:\n\t\t\tcase SKY:\n\t\t\tcase DEEPSKY:\n\t\t\t\tif (useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHT_BLUE;\n\t\t\t\t\tsetColor(Utils.ColorOLIVE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GRAY:\n\t\t\tcase VIOLET:\n\t\t\t\tif (useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t org._segColor[oseg] = Utils.ColorBROKEN;\n\t\t\t\t\t} else {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t}\n\t\t\t\t\tsetColor(Utils.ColorDARKOLIVE);\n\t\t\t\t\t_segColor[seg] = Utils.ColorDARKOLIVE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LILAC:\n\t\t\tcase DARKLILAC:\n\t\t\tcase SPIKE:\n\t\t\tcase SPIKEPOINT:\n\t\t\t\tif (useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\tif (org._isaplant) {\n\t\t\t\t\t org._segColor[oseg] = Utils.ColorBROKEN;\n\t\t\t\t\t} else {\n\t\t\t\t\t\torg._segColor[oseg] = Utils.ColorLIGHTBROWN;\n\t\t\t\t\t}\n\t\t\t\t\tsetColor(Utils.ColorOLIVE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BARK:\n\t\t\t\torg._segColor[oseg] = Utils.ColorOLDBARK;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\torg._hasdodged =true;\n\t\t\tbreak;\n\t\t}}\n\t\tif ((_isaplant) && ((org._isaplant) || ((org._transfersenergy) && (!org._isaconsumer)))) {\n\t\tfor (i=_segments-1; i>=0; i--) {\n\t\t\tswitch (getTypeColor(_segColor[i])) {\n\t\t\tcase FOREST:\n\t\t\t\t// Enhance photosynthesis in a colony\n\t\t\t\tdouble photosynthesis = 0;\n\t\t\t\tswitch (getTypeColor(_segColor[seg])) {\n\t\t\t\tcase DARKGRAY:\n\t\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\tcase BROWN:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 4 * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase FOREST:\n\t\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\t\tcase FOREST:\t\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GREEN:\n\t\t\t\t\tcase SPRING:\n\t\t\t\t\tcase LIME:\n\t\t\t\t\tcase C4:\n\t\t\t\t\tcase JADE:\t\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.9 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GRASS:\n\t\t\t\t\tcase BARK:\n\t\t\t\t\tcase OLDBARK:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.7 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\tcase BROWN:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\t\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.6 * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GREEN:\n\t\t\t\tcase SPRING:\n\t\t\t\tcase LIME:\n\t\t\t\tcase C4:\n\t\t\t\tcase JADE:\n\t\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\t\tcase FOREST:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.9 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GREEN:\n\t\t\t\t\tcase SPRING:\n\t\t\t\t\tcase LIME:\n\t\t\t\t\tcase C4:\n\t\t\t\t\tcase JADE:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.8 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GRASS:\n\t\t\t\t\tcase BARK:\n\t\t\t\t\tcase OLDBARK:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.6 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\tcase BROWN:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\t\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.5 * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRASS:\n\t\t\t\tcase BARK:\n\t\t\t\tcase OLDBARK:\n\t\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\t\tcase FOREST:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.7 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GREEN:\n\t\t\t\t\tcase SPRING:\n\t\t\t\t\tcase LIME:\n\t\t\t\t\tcase C4:\n\t\t\t\t\tcase JADE:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.6 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GRASS:\n\t\t\t\t\tcase BARK:\n\t\t\t\t\tcase OLDBARK:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.4 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\tcase BROWN:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.3 * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tswitch (getTypeColor(org._segColor[oseg])) {\n\t\t\t\t\tcase FOREST:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.6 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GREEN:\n\t\t\t\t\tcase SPRING:\n\t\t\t\t\tcase LIME:\n\t\t\t\t\tcase C4:\n\t\t\t\t\tcase JADE:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.5 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GRASS:\n\t\t\t\t\tcase BARK:\n\t\t\t\t\tcase OLDBARK:\t\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.3 * _mphoto[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\tcase BROWN:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\t\t\t\t\n\t\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * 0.3 * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\t\n\t\t\t\t}\n\t\t\t\t_energy += _world.photosynthesis(photosynthesis);\n\t\t\t\tbreak;\t\n\t\t\t}}}\n\t\t// Check if the other organism has died\n\t\tif (org.isAlive() && org._energy < Utils.tol) {\n\t\t\torg.die(this);\n\t\t}\n\t\tif (firstCall)\n\t\t\torg.touchEffects(this, oseg, seg, false);\n\t}", "public static void event5(Sociograph sociograph, String you, String crush) {\n ArrayList<String> possibleStrangers = new ArrayList<>();\n for (Student student : sociograph.getAllStudents()) {\n if (!(student.getName().equals(you) || student.getName().equals(crush))) {\n possibleStrangers.add(student.getName());\n }\n }\n final String stranger = possibleStrangers.get(rd.nextInt(possibleStrangers.size()));\n\n System.out.println(\"That stranger: \" + stranger);\n\n // Find all the path between stranger and crush\n List<List<String>> allPaths = sociograph.dfTraversal(stranger, crush);\n System.out.println(allPaths + \"\\n\");\n\n // Rumors can't spread if the path is empty\n // Start spreading if it's not empty\n if (!allPaths.isEmpty()) {\n // Declare pplKnewSecret to keep the ppl who knows the secret according to their respective path\n List<List<String>> pplKnewSecret = new ArrayList<>();\n for (int i = 0; i < allPaths.size(); i++) {\n pplKnewSecret.add(new ArrayList<>());\n }\n // Add stranger to every path of pplKnewSecret first\n pplKnewSecret.forEach(list -> list.add(stranger));\n\n // Remove stranger from every path to mark as visited\n allPaths.forEach(list -> list.remove(stranger));\n\n int day = 1;\n\n // Spreading process start, this process will stop if crush know the rumor or you stop the rumor successfully\n for (boolean terminate = false; !terminate; day++) {\n System.out.println(\"Day \" + day);\n System.out.println(\"===================================\");\n\n// System.out.println(\"Path today \" + allPaths);\n// System.out.println(\"PplKnewSecret today \" + pplKnewSecret);\n\n // If day 1, spreading process not started yet\n if (day == 1) {\n System.out.println(\"Stranger \" + stranger + \" is going to start spreading your secret tomorrow! Get ready!\");\n } else {\n // After day 1, stranger starts to spread the rumors to his neighbouring friends, his friends also will spread\n // to his own friends in the consecutive days\n\n // Return true if the rumor reaches crush, else false\n boolean reachCrush = spreadRumor(allPaths, crush, pplKnewSecret);\n\n // Terminate loop if reachCrush\n if (reachCrush) {\n terminate = true;\n continue;\n }\n }\n\n // Input ppl to convince\n System.out.print(\"Who would you want to convince today?: \");\n String pplToConvince = sc.next();\n\n // Return true if all rumor chains are broken\n boolean allChainStopped = convince(allPaths, pplToConvince, pplKnewSecret, crush);\n\n // Terminate loop if all rumor chains are broken\n if (allChainStopped) {\n terminate = true;\n System.out.println(\"You've break all the rumors chain\");\n continue;\n }\n System.out.println();\n }\n } else { // Exit if the path is empty\n System.out.println(\"No path from \" + stranger + \" to \" + crush);\n }\n\n }", "protected Entity findPlayerToAttack()\n {\n EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);\n return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;\n }", "private void performHarvestProductionSimple(Player player, ActionSpace actionSpace, FamilyMemberColor familyMemberColor, int servants, InformationCallback informationCallback) throws GameException{\n if(player.getPersonalBoard().getValuables().getResources().get(ResourceType.SERVANT) < servants)\n throw new GameException(GameErrorType.FAMILY_MEMBER_DICE_VALUE);\n int servantsValue = servants/player.getPersonalBoard().getExcommunicationValues().getNumberOfSlaves();\n\n if (actionSpace.isEmpty() || player.getPersonalBoard().getAlwaysPlaceFamilyMemberInsideActionSpace()){\n updateFamilyMemberValue(player, familyMemberColor, servantsValue);\n try {\n this.mainBoard.getProductionExtended().checkAccessibility(player, familyMemberColor);\n actionSpace.familyMemberCanBePlaced(player, familyMemberColor);\n\n if (actionSpace.getActionSpaceType().equals(ActionType.HARVEST)){\n player.getPersonalBoard().getPersonalBoardTile().getHarvestEffect().runEffect(player, informationCallback);\n performHarvest(player, informationCallback);\n }\n\n if (actionSpace.getActionSpaceType().equals(ActionType.PRODUCTION)){\n player.getPersonalBoard().getPersonalBoardTile().getProductionEffect().runEffect(player, informationCallback);\n performProduction(player, informationCallback);\n }\n\n actionSpace.setEmpty(false);\n } catch (GameException e){\n restoreFamilyMemberValue(player, familyMemberColor, servantsValue);\n throw e;\n }\n }else\n throw new GameException(GameErrorType.ACTIONS_SPACE_NOT_ACCESSIBLE);\n }", "private Pit getPit(List<Entity> entities) {\r\n for (Entity e : entities) {\r\n if (e instanceof Pit) return (Pit) e;\r\n }\r\n return null;\r\n }", "public void refillMissiles(Iterator<ICollider> psIterator, ICollider curObj, ICollider ship)\n\t{\n\t\tif(((SpaceStation)curObj).getVisibility())\n\t\t{\n\t\t\tif(ship instanceof PlayerShip)\n\t\t\t\t((PlayerShip)ship).reload();\n\t\t\telse if (ship instanceof NonPlayerShip)\n\t\t\t\t((NonPlayerShip)ship).reload();\n\t\t\tSystem.out.println(\"Ammo refilled\");\n\t\t}else\n\t\t\tSystem.out.println(\"SpaceStation is blinking\");\n\t\tpsIterator.remove();\n\t\t\n\t}", "public boolean inflictStaffTrance() {\n /**\n * A Staff has 20% chance of inflicting trance.\n */\n if (this.getWeapon() instanceof Staff) {\n int seed = 100;\n Random random = new Random(seed);\n int value = random.nextInt(seed);\n return value < 21;\n }\n\n return false;\n }", "private void immediateSafetyResolve(Cell cell, boolean propagate) {\n\t\tif (cell == null) {\n\t\t\tLOG.warn(\"called immediateSafetyResolve on cell NULL\");\n\t\t\treturn;\n\t\t}\n\n\t\tPoint pos = cell.getPosition();\n\t\tPoint[] adjacents = pos.allAdjacent();\n\t\tif (!cell.isTypeIn(CellType.FREE, CellType.START)) {\n\t\t\tLOG.warn(\"called immediateSafetyResolve on invalid cell of type {} at {}\", pos, cell.getType());\n\t\t\treturn;\n\t\t}\n\n\t\t// count adjacent pits and unsafe cells\n\t\tint pits = 0;\n\t\tSet<Cell> unsafes = new HashSet<Cell>();\n\t\tfor (Point adjPos : adjacents) {\n\t\t\tCell adjacent = map.get(adjPos);\n\t\t\tswitch (adjacent.getType()) {\n\t\t\tcase PIT:\n\t\t\t\t++pits;\n\t\t\t\tbreak;\n\t\t\tcase UNSAFE_UNKNOWN:\n\t\t\t\tunsafes.add(adjacent);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//\n\t\t\t}\n\t\t}\n\n\t\t// change cells, if possible\n\t\tint stench = cell.getStench();\n\t\tif (pits == stench) {\n\t\t\tfor (Cell unsafe : unsafes) {\n\t\t\t\tLOG.debug(\"changed cell type at {} from {} to {}\", unsafe.getPosition(), CellType.UNSAFE_UNKNOWN,\n\t\t\t\t\t\tCellType.SAFE_UNKNOWN);\n\t\t\t\tsetCellType(unsafe, CellType.SAFE_UNKNOWN);\n\t\t\t}\n\t\t} else if (pits + unsafes.size() == stench) {\n\t\t\tfor (Cell unsafe : unsafes) {\n\t\t\t\tLOG.debug(\"changed cell type at {} from {} to {}\", unsafe.getPosition(), CellType.PIT,\n\t\t\t\t\t\tCellType.SAFE_UNKNOWN);\n\t\t\t\tsetCellType(unsafe, CellType.PIT);\n\t\t\t}\n\t\t} else if (propagate) {\n\t\t\tfor (Cell unsafe : unsafes) {\n\t\t\t\tpos = unsafe.getPosition();\n\t\t\t\tadjacents = pos.allAdjacent();\n\t\t\t\tLOG.debug(\"calling immediateSafetyResolve for adjacents of {}\", pos);\n\t\t\t\tfor (Point adjPos : adjacents) {\n\t\t\t\t\tCell adjacent = map.get(adjPos);\n\t\t\t\t\tif (adjacent != null && adjacent.isTypeIn(CellType.FREE, CellType.START)) {\n\t\t\t\t\t\tLOG.debug(\"propagating safety resolve to {}\", adjPos);\n\t\t\t\t\t\timmediateSafetyResolve(adjacent, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void attemptDeclareAttack (SummonedMonster AttackingMonster){\r\n // if the monster exists at all, is in attack mode, and has not attacked at this turn (if it's battle phase has already been checked when calling this method)\r\n if (AttackingMonster.canStillAttackThisBattlePhase()) {\r\n if (Game.isVeryFirstTurn()) {\r\n YuGiOhJi.errorDialog(\"You can not declare an attack during first turn.\", \"Error.\");\r\n }\r\n else {\r\n if (SummonedMonster.countOwnSummonedMonsters(false)==0) { // if CPU has no monsters, one can only attack directly\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Attack opponent's life points directly with \" + AttackingMonster.att + \" attack points?\", \"\", new String[]{\"yes\", \"no\"}, \"no\");\r\n if (intDialogResult==0) {\r\n Game.ActiveAttackingMonster = AttackingMonster;\r\n updateDeclareAttackStatistic();\r\n declareDirectAttack(AttackingMonster);\r\n }\r\n }\r\n else {\r\n String piercing = \"\";\r\n if (AttackingMonster.hasPiercingDamageAbility()) {piercing = \" (piercing)\";}\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Attack with \" + AttackingMonster.att + \" att\" + piercing + \"? Click on the monster you want to attack.\", \"\", new String[]{\"yes\", \"no\"}, \"no\");\r\n if (intDialogResult==0) {\r\n Game.ActiveAttackingMonster = AttackingMonster;\r\n }\r\n }\r\n }\r\n }\r\n \r\n }", "private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}", "private void handleAttackOnAnotherClient(Battle battle, Coordinates coordinates, String name)\n throws GameOverException, NoSuchUserException {\n Pair<String> users = GAME_DAO.getRegisteredPair(name);\n FiringResult firingResult;\n if (Objects.equals(users.getFirst(), name)) {\n firingResult = battle.shootAtSecondPlayer(coordinates);\n sendMessage(Response.attackResultResponse(users.getFirst(), firingResult));\n sendMessage(Response.attackResultResponse(users.getSecond(), firingResult));\n } else if (Objects.equals(users.getSecond(), name)) {\n firingResult = battle.shootAtFirstPlayer(coordinates);\n sendMessage(Response.attackResultResponse(users.getFirst(), firingResult));\n sendMessage(Response.attackResultResponse(users.getSecond(), firingResult));\n }\n\n }", "public void classifyAndRepairUnsatisfiability() throws Exception{\n\t\n\t\t\n\t\tinit = Calendar.getInstance().getTimeInMillis();\n\t\t\n\n\t\t//Reason\n\t\tLogOutput.printAlways(\"\\nCLASSIFYING\");\n\t\t\n\t\t//Transform mappings 2 owl\n\t\tgetOWLAxioms4Mappings();\n\t\t\n\t\tsetUpReasoner(true);\t\t\n\t\tsetUpBlackBosExplanationManager();\n\t\t\n\t\t//Will be reused\n\t\tstrctReasoner = new StructuralReasonerExtended(reasoner_access.getOntology());\n\t\t\n\t\t//ONLY Statistics\n\t\t//LogOutput.printAlways(\"\\nSTATISTICS EXPLANATIONS (UNSAT: \" + reasoner_access.getUnsatisfiableClasses().size() + \").\");\n\t\t//repairUnsatisfiability(50);\n\t\t\n\t\t\n\t\tint it=0;\n\t\t\n\t\tLogOutput.printAlways(\"\\nREPAIR GREEDY ALGO:\");\n\t\t\n\t\twhile (reasoner_access.hasUnsatisfiableClasses()){\n\t\t\t\n\t\t\tLogOutput.printAlways(\"\\tUNSAT CLASSES iter \" + it + \": \" + reasoner_access.getUnsatisfiableClasses().size());\n\t\t\t\n\t\t\t//Split unsat and solve!!\n\t\t\tif (!repairUnsatisfiability())\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tapplyBestRepairPlan();\n\t\t\t\n\t\t\t//Clear previous structures\n\t\t\tclearStructures();\n\t\t\t\n\t\t\t//Trasnform mappings 2 owl\n\t\t\tgetOWLAxioms4Mappings();\n\t\t\t\n\t\t\t//Reason\n\t\t\t//setUpReasoner(false);\t\t\t\n\t\t\t//Any unsat\n\t\t\t//if (checkIfAnyUnsat()){ //classify and reinit blackbox\n\t\t\t//\treasoner_access.classifyOntology();\n\t\t\t//\tsetUpBlackBosExplanationManager();\n\t\t\t//}\n\t\t\t//else{ //We are done\n\t\t\t//\treasoner_access.getUnsatisfiableClasses().clear();\n\t\t\t//}\n\t\t\t\n\t\t\t//Reason\n\t\t\tLogOutput.printAlways(\"\\tCLASSIFYING\");\n\t\t\tsetUpReasoner(true);\n\t\t\tsetUpBlackBosExplanationManager();\n\t\t\t\n\t\t\tit++;\n\t\t\t\n\t\t}\n\t\t\n\t\tfin = Calendar.getInstance().getTimeInMillis();\n\t\t\n\t\tdouble time = (float)((double)fin-(double)init)/1000.0;\n\t\tLogOutput.printAlways(\"\\tTIME GREEDY Repair Algorithm (s): \" + time);\n\t\tLogOutput.printAlways(\"\\tUNSAT CLASSES after cleaning: \" + reasoner_access.getUnsatisfiableClasses().size());\n\t\t\n\t\t//We do not clean last reasoner\n\t\t//It is necessary for index\n\t\t\n\t}", "void broadCastMessageLocal(Message message) {\n/* 1691 */ if (this.creatures != null)\n/* 1692 */ for (Iterator<Creature> it = this.creatures.iterator(); it.hasNext(); ) {\n/* */ \n/* 1694 */ Creature creature = it.next();\n/* 1695 */ if (!creature.getCommunicator().isInvulnerable()) {\n/* 1696 */ creature.getCommunicator().sendMessage(message);\n/* */ }\n/* */ } \n/* */ }", "public InputSource resolveEntity(String publicId, String systemId) \n\t throws SAXException, IOException {\n\t String entityPath = \"/home/username/java/xxe/file\"; \n\t if (systemId.equals(entityPath)) { \n\t \n\t return new InputSource(entityPath); \n\t } else { \n\t return new InputSource(); // Disallow unknown entities \n\t // by returning a blank path \n\t } \n\t }", "private RequirementElement parseAttackElementInfo(List<String> factors) {\n\t\t/*\n\t\t * this part is exclusively for requirement elements 0)notation,element; 1)id,51670; 2)shape,Hexagon; 3)name,Calculate price; 4)Layer, Layer 1 by default; 5)thickness,;\n\t\t * 6)double stroke; 7)size: 117.945899963379 43.817626953125; 8)no fill; 9)0.0 corner radius 10) stroke pattern: 0 11) origin: 87.234039306641 1084.06665039062 12) owner:\n\t\t * xx 13) Canvas, Actor association; 14) user data\n\t\t */\n\n\t\tRequirementElement new_elem = new RequirementElement();\n\t\t// no additional constraints\n//\t\tif (!factors.get(13).equals(\"HSGM\")) {\n//\t\t\tCommandPanel.logger.fine(\"Canvas HSGM is supposed to be processed\");\n//\t\t}\n\n\t\t// anti goals\n\t\t// we only capture the overall information here\n\t\tif (factors.get(2).equals(\"Circle\") && !factors.get(3).equals(\"empty\")) {\n\t\t\tnew_elem = new NewAntiGoal();\n\t\t\tnew_elem.setId(factors.get(1));\n\t\t\tnew_elem.setType(InfoEnum.RequirementElementType.NEW_ANTI_GOAL.name());\n\t\t\t// obtain the content of the element\n\t\t\tString sg_name = factors.get(3);\n\t\t\tnew_elem.setName(sg_name.trim());\n\t\t\t((NewAntiGoal)new_elem).extractInfoFromName();\n\t\t} else if (checkCircle(factors.get(7))) {\n\t\t\t// process actors\n\t\t}\n\t\t// all others\n\t\telse {\n\t\t\tnew_elem = new RequirementElement();\n\t\t\tnew_elem.setId(factors.get(1));\n\t\t\tif (factors.get(2).equals(\"Hexagon\")) {\n\t\t\t\tnew_elem.setType(InfoEnum.RequirementElementType.TASK.name());\n\t\t\t} else if (factors.get(2).equals(\"Rectangle\")) {\n\t\t\t\tnew_elem.setType(InfoEnum.RequirementElementType.DOMAIN_ASSUMPTION.name());\n\t\t\t} else if (factors.get(3).equals(\"empty\") & factors.get(2).equals(\"Circle\") & factors.get(10).equals(\"0\")) {\n\t\t\t\tnew_elem.setType(InfoEnum.RequirementElementType.MIDDLE_POINT.name());\n\t\t\t} else {\n//\t\t\t\tnew_elem.setType(InfoEnum.req_elem_type_map.get(factors.get(2)));\n\t\t\t}\n\t\t\tnew_elem.setName(factors.get(3));\n\t\t}\n\t\t\n\t\t// layout info\n\t\tString[] temp2 = factors.get(11).split(\" \");\n\t\tnew_elem.origin_x = Double.parseDouble(temp2[0].replace(\",\",\".\"));\n\t\tnew_elem.origin_y = Double.parseDouble(temp2[1].replace(\",\",\".\"));\n\t\t\n\t\treturn new_elem;\n\t}", "public void importFile(String filename) throws IOException, BadEntryException, ImportFileException{\n try{\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String line;\n line = reader.readLine();\n\n while(line != null){\n String[] fields = line.split(\"\\\\|\");\n int id = Integer.parseInt(fields[1]);\n if(_persons.get(id) != null){\n throw new BadEntryException(fields[0]);\n }\n\n if(fields[0].equals(\"FUNCIONÁRIO\")){\n registerAdministrative(fields);\n line = reader.readLine();\n }else if(fields[0].equals(\"DOCENTE\")){\n Professor _professor = new Professor(id, fields[2], fields[3]);\n _professors.put(id, _professor);\n _persons.put(id, (Person) _professor);\n\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n \n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n\n if(_professor.getDisciplineCourses().get(course) == null){\n _professor.getDisciplineCourses().put(course, new HashMap<String, Discipline>());\n }\n\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline,_course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_professor, id);\n _disciplineCourse.get(course).put(discipline, _discipline);\n\n if(_professor.getDisciplines() != null){\n _professor.getDisciplines().put(discipline, _discipline);\n _professor.getDisciplineCourses().get(course).put(discipline, _discipline); \n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n\n }\n }\n }\n }else if(fields[0].equals(\"DELEGADO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course,_course);\n }\n if(_course.getRepresentatives().size() == 8){\n System.out.println(id);\n throw new BadEntryException(course);\n }else{\n _course.getRepresentatives().put(id,_student);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline,_discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n }else if(fields[0].equals(\"ALUNO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_student, id);\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n\n }else{\n throw new BadEntryException(fields[0]);\n }\n }\n for(Course course: _courses.values()){\n HashMap<Integer,Student> representatives = course.getRepresentatives();\n HashMap<String, Discipline> disciplines = course.getDisciplines();\n for(Discipline discipline: disciplines.values()){\n for(Student representative: representatives.values()){\n discipline.registerObserver(representative, representative.getId());\n }\n }\n \n } \n reader.close();\n }catch(BadEntryException e){\n throw new ImportFileException(e);\n }catch(IOException e){\n throw new ImportFileException(e);\n }\n }", "public void verificarExistenciaCELPE(String numeroCelp, Integer idSetorComercial) throws ControladorException {\r\n\r\n\t\tCollection setorComerciais = null;\r\n\t\tif (idSetorComercial != null) {\r\n\t\t\tFiltroSetorComercial filtroSetorComercial = new FiltroSetorComercial();\r\n\t\t\tfiltroSetorComercial\r\n\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroSetorComercial.ID, new Integer(idSetorComercial)));\r\n\t\t\tfiltroSetorComercial.adicionarCaminhoParaCarregamentoEntidade(FiltroSetorComercial.MUNICIPIO);\r\n\t\t\tsetorComerciais = getControladorUtil().pesquisar(filtroSetorComercial, SetorComercial.class.getName());\r\n\t\t}\r\n\r\n\t\tFiltroImovel filtroImovel = new FiltroImovel();\r\n\t\tif (setorComerciais != null && !setorComerciais.isEmpty()) {\r\n\t\t\tSetorComercial setorComercial = (SetorComercial) setorComerciais.iterator().next();\r\n\t\t\tfiltroImovel.adicionarParametro(new ParametroSimples(FiltroImovel.SETOR_COMERCIAL_MUNICIPIO_ID,\r\n\t\t\t\t\tsetorComercial.getMunicipio().getId()));\r\n\t\t}\r\n\t\tfiltroImovel.adicionarParametro(new ParametroSimples(FiltroImovel.NUMERO_CELPE, numeroCelp));\r\n\r\n\t\tCollection imoveis = getControladorUtil().pesquisar(filtroImovel, Imovel.class.getName());\r\n\r\n\t\tif (imoveis != null && !imoveis.isEmpty()) {\r\n\t\t\tString idMatricula = \"\" + ((Imovel) ((List) imoveis).get(0)).getId();\r\n\r\n\t\t\tsessionContext.setRollbackOnly();\r\n\t\t\tthrow new ControladorException(\"atencao.imovel.numero_celpe_jacadastrado\", null, idMatricula);\r\n\t\t}\r\n\r\n\t\tFiltroImovelEconomia filtroImovelEconomia = new FiltroImovelEconomia();\r\n\t\t// filtroImovelEconomia.adicionarParametro(new\r\n\t\t// ParametroSimples(FiltroImovelEconomia.IMOVEL_ID, imovel.getId()));\r\n\t\tif (setorComerciais != null && !setorComerciais.isEmpty()) {\r\n\t\t\tSetorComercial setorComercial = (SetorComercial) setorComerciais.iterator().next();\r\n\t\t\tfiltroImovelEconomia.adicionarParametro(\r\n\t\t\t\t\tnew ParametroSimples(FiltroImovelEconomia.MUNICIPIO_ID, setorComercial.getMunicipio().getId()));\r\n\t\t}\r\n\t\tfiltroImovelEconomia.adicionarParametro(new ParametroSimples(FiltroImovelEconomia.NUMERO_CELPE, numeroCelp));\r\n\t\tfiltroImovelEconomia.adicionarCaminhoParaCarregamentoEntidade(\"imovelSubcategoria\");\r\n\t\tfiltroImovelEconomia.adicionarCaminhoParaCarregamentoEntidade(\"imovelSubcategoria.comp_id.imovel\");\r\n\r\n\t\tCollection imoveisEconomiaPesquisadas = getControladorUtil().pesquisar(filtroImovelEconomia,\r\n\t\t\t\tImovelEconomia.class.getName());\r\n\r\n\t\tif (!imoveisEconomiaPesquisadas.isEmpty()) {\r\n\t\t\tImovelEconomia imovelEconomia = (ImovelEconomia) ((List) imoveisEconomiaPesquisadas).get(0);\r\n\r\n\t\t\tString idMatricula = \"\" + imovelEconomia.getImovelSubcategoria().getComp_id().getImovel().getId();\r\n\r\n\t\t\tsessionContext.setRollbackOnly();\r\n\t\t\tthrow new ControladorException(\"atencao.imovel.numero_celpe_jacadastrado\", null, idMatricula);\r\n\t\t}\r\n\t}", "public void fireScourge() {\n\t\t// Has player waited cooldown before trying to fire again?\t\tCHANGED to 10000\n\t\tif (System.currentTimeMillis() - this.lastFired > Config.WEAPON_COOLDOWN_TIME * 10000) {\n\t\t\tSystem.out.println(player.getDisplayName() + \" is attempting to launch napalm\");\n\t\t\t// Can this airship drop scourge?\n\t\t\tif (this.properties.FIRES_SCOURGE) {\n\t\t\t\tBlock[] cannons = getCannons();\n\t\t\t\tint numfiredcannons = 0;\n\t\t\t\tfor (int i = 0; i < cannons.length; i++) {\n\t\t\t\t\tif (cannons[i] != null && cannons[i].getRelative(0, -1, 0).getType().equals(Material.AIR) && cannonHasTnt(cannons[i], Config.NUM_TNT_TO_DROP_NAPALM)) {\n\t\t\t\t\t\tboolean missingMaterial = false;\n\t\t\t\t\t\tfor (int id : Config.MATERIALS_NEEDED_FOR_SCOURGE) {\n\t\t\t\t\t\t\tif (!cannonHasItem(cannons[i], id, 1))\n\t\t\t\t\t\t\t\tmissingMaterial = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!missingMaterial && numfiredcannons < this.properties.MAX_NUMBER_OF_CANNONS) {\n\t\t\t\t\t\t\tnumfiredcannons++;\n\t\t\t\t\t\t\tlastFired = System.currentTimeMillis();\n\t\t\t\t\t\t\twithdrawTnt(cannons[i], Config.NUM_TNT_TO_DROP_SCOURGE);\n\t\t\t\t\t\t\tfor (int id : Config.MATERIALS_NEEDED_FOR_SCOURGE) {\n\t\t\t\t\t\t\t\twithdrawItem(cannons[i], id, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Fire some scourge TODO: maybe add sound effects for scourge dropping? :P\n\t\t\t\t\t\t\tnew Scourge(cannons[i]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// More cannons on ship than allowed. Not all fired - can break out of loop now.\n\t\t\t\t\t\t\t//player.sendMessage(ChatColor.AQUA + \"Some purifiers did not fire. Max cannon limit is \" + ChatColor.GOLD + this.properties.MAX_NUMBER_OF_CANNONS);\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"Some purifiers did not fire. item check = \" + ChatColor.GOLD + missingMaterial);\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"numFiredCannons = \" + ChatColor.GOLD + numfiredcannons);\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + this.properties.SHIP_TYPE + \" CANNOT DROP NAPALM\");\n\t\t} else\n\t\t\tplayer.sendMessage(ChatColor.GOLD + \"COOLING DOWN FOR \" + ChatColor.AQUA + (int)(Math.round(6 - (System.currentTimeMillis() - this.lastFired) / 1000)) + ChatColor.GOLD + \" MORE SECONDS\");\n\t}", "void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);", "private void findFood() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\tlogger.error(\"Should not happen\");\n\t\t\treturn;\n\t\t}\n\n\t\t_food = null;\n\t\tfloat distance = 0;\n\t\t\n\t\tfor (FoodEntry entry : map.values()) { \n\t\t\tfloat d = _obj.getPPosition().sub(entry.obj.getPPosition()).length();\n\t\t\tif (_food == null || d < distance) { \n\t\t\t\t_food = entry.obj;\n\t\t\t\tdistance = d;\n\t\t\t}\n\t\t}\n\t}", "public void smelt() {\n if (this.canSmelt()) {\n ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.items[0]);\n if (this.items[1] == null) {\n this.items[1] = itemstack.copy();\n } else if (this.items[1].getItem() == itemstack.getItem()) {\n this.items[1].stackSize += itemstack.stackSize; // Forge BugFix:\n // Results may\n // have multiple\n // items\n }\n\n --this.items[0].stackSize;\n\n if (this.items[0].stackSize <= 0) {\n this.items[0] = null;\n }\n // TODO: Enable after update\n //energy.extractEnergy(1600, false);\n }\n }", "@Override\n public void computeSatisfaction() {\n\n }", "public void chooseAttackDefender(String attackStarter){\n gameState = GameState.DEFENDERSELECITON;\n currentTerritoriesOfInterest = Player.getTerritoryStringArray(currentPlayer.getTerritory(attackStarter).getAttackableNeighbours());\n currentMessage = attackStarter;\n notifyObservers();\n\n currentMessage = \"\";\n }", "public static void possibleSuicideEffect (boolean isInterchangingMonsters, boolean isDoubleKill) {\r\n SummonedMonster DyingMonster;\r\n SummonedMonster OpposingMonster;\r\n if (isInterchangingMonsters) {\r\n DyingMonster = AttMonster;\r\n OpposingMonster = GuardMonster;\r\n }\r\n else {\r\n DyingMonster = GuardMonster;\r\n OpposingMonster = AttMonster;\r\n }\r\n int effectiveMonsterId = DyingMonster.relevantEffectiveSuicidalMonsterId();\r\n int effectiveMonsterIdOpponent = OpposingMonster.relevantEffectiveSuicidalMonsterId();\r\n boolean isContinuingGame = true;\r\n if (YMonster.getMonsterById(effectiveMonsterId).isBurning) { // effect of Napalm\r\n if (isDoubleKill) {\r\n if (YMonster.getMonsterById(effectiveMonsterIdOpponent).isBurning) {\r\n isContinuingGame = isDealingBurnDamageToBothPlayersAndContinuingGame(Mon.Napalm.NapalmBurnDamage());\r\n }\r\n else {\r\n isContinuingGame = YMonster.dealBurnDamage(Mon.Napalm.NapalmBurnDamage(), OpposingMonster.isPlayersMonster);\r\n }\r\n if (isContinuingGame) {endDamageStep(false);}\r\n } // other suicide effects don't apply, since they don't have a valid target any more\r\n else {\r\n isContinuingGame = YMonster.dealBurnDamage(Mon.Napalm.NapalmBurnDamage(), OpposingMonster.isPlayersMonster);\r\n if (isContinuingGame) {endDamageStep(true);}\r\n }\r\n }\r\n else if (YMonster.getMonsterById(effectiveMonsterId).isDestroying || YMonster.getMonsterById(effectiveMonsterId).isGettingAnotherToHand) {\r\n boolean opposingMonsterIndestructible = OpposingMonster.isIndestructibleByEffect();\r\n boolean opposingMonsterImmuneWhileWinning = OpposingMonster.isImmuneWhileWinning();\r\n boolean opposingMonsterImmune = OpposingMonster.isImmune();\r\n boolean opposingMonsterStillExisting = getNthSummonedMonster(OpposingMonster.sumMonsterNumber, OpposingMonster.isPlayersMonster).isExisting;\r\n if (YMonster.getMonsterById(effectiveMonsterId).isDestroying) { // effect of Suicide Commando\r\n if (opposingMonsterStillExisting && !opposingMonsterIndestructible && !opposingMonsterImmuneWhileWinning && !opposingMonsterImmune) {\r\n YuGiOhJi.informationDialog(OpposingMonster.Monster.monsterName + \" is killed due to the effect of \" + YuGiOhJi.SuicideCommando.monsterName + \".\", \"Passive effect\");\r\n getNthSummonedMonster(OpposingMonster.sumMonsterNumber, OpposingMonster.isPlayersMonster).killMonster();\r\n if (YMonster.getMonsterById(effectiveMonsterIdOpponent).isBurning) { // this part here already contains the case of double kill\r\n isContinuingGame = YMonster.dealBurnDamage(Mon.Napalm.NapalmBurnDamage(), DyingMonster.isPlayersMonster);\r\n } // other suicide effects don't apply, since they don't have a valid target any more\r\n if (isContinuingGame) {\r\n endAttack(false);\r\n }\r\n }\r\n else {\r\n if (isDoubleKill) {endAttack(false);}\r\n else {endDamageStep(true);}\r\n }\r\n }\r\n else if (YMonster.getMonsterById(effectiveMonsterId).isGettingAnotherToHand) { // effect of Back Bouncer (check that one last)\r\n // only do something, if Back Bouncer got destroyed and opposing monster is still there and not immune\r\n // (that means nothing happens here in case of double kill)\r\n if (opposingMonsterStillExisting && !opposingMonsterImmuneWhileWinning && !opposingMonsterImmune && !isDoubleKill) { // at max. one monster gets bounced back\r\n YMonster.effectBackBouncerActivate(getNthSummonedMonster(OpposingMonster.sumMonsterNumber, OpposingMonster.isPlayersMonster));\r\n // still add endAttack(false);? No. The typical ending of the attack happens at the end of YMonster.effectBackBouncerExecute().\r\n }\r\n else {\r\n if (isDoubleKill) {endAttack(false);}\r\n else {endDamageStep(true);}\r\n }\r\n }\r\n }\r\n else {\r\n if (isDoubleKill) {endAttack(false);}\r\n else {endDamageStep(true);}\r\n }\r\n \r\n }", "public void cargarEstudiantesSitio() {\r\n\t\tList<ArrMatriculado> listado = mngRes.matriculadosEnSitioPorPeriodo(sitioId, periodo.getPrdId());\r\n\t\tgetReservasSitio().clear();\r\n\t\tif (listado != null && !listado.isEmpty())\r\n\t\t\tgetReservasSitio().addAll(listado);\r\n\t}", "public Map<String, Object> getIE(String text, FallBackListBased pd) {\n\t\ttext = text.replaceAll(\" � \", \", \");\n\t\ttext = text.replaceAll(\"'s \", \" \");\n\t\ttext = text.replaceAll(\"'s\", \"\");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"\\\\?\", \"\");\n\t\ttext = text.replaceAll(\":\", \"\");\n\t\tMap<String, Object> entities_map = new TreeMap<String, Object>();\n\t\tMap<String, Object> extractedEntities = new TreeMap<String, Object>();\n\t\tList<TreeMap<String, String>> entities = new ArrayList<TreeMap<String, String>>();\n\t\tList<TreeMap<String, String>> intents= new ArrayList<TreeMap<String, String>>();\n\t\tSet<String> intentsList=new HashSet<String>();\n\t\tSet<String> entitiesList=new HashSet<String>();\n\t\t\n\t\tString input = text;\n\t\t// text=text.replaceAll(\" \", \" \");\n\t\tSpan spanSentences[] = pd.sentenceDetector.sentPosDetect(input);\n\t\tint sentenceId = 1;\n\t\tTreeMap<String, String> intents_map = new TreeMap<String, String>();\n\t\tDouble entites_highest_cofidence = 0.0;\n\t\tDouble intents_highest_cofidence = 0.0;\n\t\tfor (Span sentence : spanSentences) {\n\t\t\tArrayList<PhraseTemplate> phrases = pd.GetPhrases(sentence\n\t\t\t\t\t.getCoveredText(input).toString(), sentenceId++);\n\t\t\t\n\t\t\tfor (PhraseTemplate svo : phrases) {\n\t\t\t\tString key = svo.phrase;\n\t\t\t\tkey = key.replaceAll(\" is \", \"\");\n\t\t\t\tkey = key.replaceAll(\"What \", \"\");\n\t\t\t\tkey = key.replaceAll(\"what \", \"\");\n\t\t\t\tkey = key.replaceAll(\" the \", \"\");\n\n\t\t\t\tif (key.length() > 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString resolvedEntity = lss.resolveEntity(key\n\t\t\t\t\t\t\t\t.toLowerCase().trim().toString(),\n\t\t\t\t\t\t\t\t\"entitesIndex\");\n\t\t\t\t\t\tString tokens[] = resolvedEntity.split(\"__\");\n//\t\t\t\t\t\tSystem.out.println(resolvedEntity+\" :: \"+key);\n\t\t\t\t\t\tif (tokens.length < 2)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tentitiesList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > entites_highest_cofidence) {\n\t\t\t\t\t\t\tentities_map.clear();\n\t\t\t\t\t\t\tentities_map.put(\"Entity\", key.trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntity\", tokens[4].trim());\n\t\t\t\t\t\t\tentities_map.put(\"EntityConfidenceScore\", tokens[5].trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntityType\", tokens[2].trim());\n\t\t\t\t\t\t\tentites_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tintentsList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > intents_highest_cofidence) {\n\t\t\t\t\t\t\tintents_map.clear();\n\t\t\t\t\t\t\tintents_map.put(\"Id\", tokens[0].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Extracted Entity\", key.trim());\n\t\t\t\t\t\t\tintents_map.put(\"Mapped Entity\", tokens[4].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Confidence\", tokens[5].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Class\", tokens[1].trim());\n\t\t\t\t\t\t\tintents_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tentities_map.put(\"Intent\", intents_map.get(\"Extracted Entity\"));\n\t\tentities_map.put(\"MappedIntent\", intents_map.get(\"Mapped Entity\"));\n\t\tentities_map.put(\"IntentConfidenceScore\", intents_map.get(\"Confidence\"));\n\n\t\treturn entities_map;\n\t}", "@Override\n\tpublic void readEntityFromNBT(NBTTagCompound p_70037_1_)\n\t{\n\t\tthis.xTile = p_70037_1_.getShort(\"xTile\");\n\t\tthis.yTile = p_70037_1_.getShort(\"yTile\");\n\t\tthis.zTile = p_70037_1_.getShort(\"zTile\");\n\t\tthis.inTile = Block.getBlockById(p_70037_1_.getByte(\"inTile\") & 255);\n\t\tthis.throwableShake = p_70037_1_.getByte(\"shake\") & 255;\n\t\tthis.inGround = p_70037_1_.getByte(\"inGround\") == 1;\n\t\tthis.throwerName = p_70037_1_.getString(\"ownerName\");\n\n\t\tif ((this.throwerName != null) && (this.throwerName.length() == 0))\n\t\t{\n\t\t\tthis.throwerName = null;\n\t\t}\n\t}", "public void inferSimplexIndicesForFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// go through all faces\n\t\tfor(int f=0; f<faces.size(); f++)\n\t\t{\n\t\t\t// prepare an empty array into which the indices of the simplices on either side will go\n\t\t\tint[] neighbouringSimplexIndices = new int[2];\n\t\t\tint neighbouringSimplicesFound = 0;\n\t\t\t\n\t\t\t// go through all simplices, ...\n\t\t\tfor(int s=0; s<simplices.size(); s++)\n\t\t\t{\n\t\t\t\t// ... and if face #f is one of simplex #s's faces...\n\t\t\t\tif(simplices.get(s).isFace(f))\n\t\t\t\t{\n\t\t\t\t\tif(neighbouringSimplicesFound == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferSimplexIndicesForFaces: simplicial complex =\"+this);\n\t\t\t\t\t\tSystem.out.flush();\n\t\t\t\t\t\tthrow new InconsistencyException(\"Face #\"+f+\" has more than two neighbouring simplices, namely \"+neighbouringSimplexIndices[0]+\", \"+neighbouringSimplexIndices[1]+\", and \"+s+\".\"); // ).printStackTrace();\n\t\t\t\t\t\t// System.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// ... add s to the list of indices of simplices on either side of face #f\n\t\t\t\t\tneighbouringSimplexIndices[neighbouringSimplicesFound++] = s;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// if only one simplex has been found of which face #f is a face, then it must be the outside on the other side\n\t\t\tif(neighbouringSimplicesFound == 1) neighbouringSimplexIndices[neighbouringSimplicesFound++] = IndexArray.OUTSIDE;\n\t\t\t\n\t\t\t// set face #f's array of simplex indices to <simplexIndices>\n\t\t\tfaces.get(f).setSimplexIndices(neighbouringSimplexIndices);\n\t\t}\n\t}", "public void feedAll() {\n\t\tfor (VirtualPet p : shelterPets.values()) {\n\t\t\tp.feedPet();\n\t\t}\n\t}", "protected void checkMeteor()\n {\n e= (Explosion)getOneObjectAtOffset(getImage().getWidth()/20, 0, Explosion.class);\n \n if (e!=null)\n {\n if (meteorInflicted == false)\n {\n health = health - 1000;\n meteorInflicted = true;\n }\n \n }\n else{\n meteorInflicted = false;\n }\n }", "public void findStreets() {\r\n\t\tpolygonMap.resetStreets();\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tfor (int i = 0; i < island.getRoads().length; i++) {\r\n\t\t\tif (buildStreetIsAllowed(island.getRoads()[i])\r\n\t\t\t\t\t&& !isWaterStreet(island.getRoads()[i])) {\r\n\t\t\t\tpolygonMap.addStreet(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {\n if (systemId != null) {\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.fine(\"Will try to resolve systemId [\" + systemId + \"]\");\n }\n // TestNG system-ids\n if (systemId.startsWith(TESTNG_HTTP_NAMESPACE) || systemId.startsWith(TESTNG_HTTPS_NAMESPACE)) {\n LOGGER.fine(\"It's a TestNG document, will try to lookup DTD in classpath\");\n String dtdFileName = systemId.substring(systemId.lastIndexOf(\"/\") + 1);\n\n URL url = getClass().getClassLoader().getResource(dtdFileName);\n if (url != null)\n return new InputSource(url.toString());\n }\n }\n // Default fallback\n return new InputSource();\n }", "public void checkForHits(){\n\t\tfor(Missile missile : this.missiles){\n\t\t\tif(missile != null && !missile.isDestroyed()){\n\t\t\t\t// Check buildings\n\t\t\t\tfor (int i = 0; i < this.buildings.length; i++) {\n\t\t\t\t\tif(!this.buildings[i].isDestroyed()){\n\t\t\t\t\t\tif (this.buildings[i].getHitBox().intersects(missile.getHitBox())) {\n\t\t\t\t\t\t\tthis.buildings[i].destroy();\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Check turrets\n\t\t\t\tfor (int i = 0; i < this.turrets.length; i++ ) {\n\t\t\t\t\tif(!this.turrets[i].isDestroyed()){\n\t\t\t\t\t\tif (!missile.isFriendly() && this.turrets[i].getHitBox().intersects(missile.getHitBox())) {\n\t\t\t\t\t\t\tthis.turrets[i].destroy();\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Checks Missile vs. Friendly Missile collisions\n\t\t\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\t\t\tif (missile.getHitBox().intersects(fMissile.getHitBox())) {\n\t\t\t\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tthis.incrementScore(this.SCORE_INCREASE);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testSaveRoomNotOwnShelterNegative() {\n\t\tRoom room;\n\t\tShelter shelter;\n\t\tRoomDesign roomDesign;\n\t\tPlayer player;\n\t\tint roomDesignId;\n\n\t\tsuper.authenticate(\"player1\");\n\n\t\troomDesignId = super.getEntityId(\"RoomDesign1\");\n\n\t\troom = this.roomService.create();\n\t\troomDesign = this.roomDesignService.findOne(roomDesignId);\n\t\tplayer = (Player) this.actorService.findActorByPrincipal();\n\n\t\tshelter = this.shelterService.findShelterByPlayer(player.getId());\n\n\t\troom.setShelter(shelter);\n\t\troom.setRoomDesign(roomDesign);\n\t\tsuper.unauthenticate();\n\n\t\tsuper.authenticate(\"Player3\");\n\t\tthis.roomService.save(room);\n\n\t\tsuper.unauthenticate();\n\t}", "public void initializeSanitizer() {\n switch (world.maps.getLevel()) {\n case 1:\n world.sanitizers[0].setPosition(900, 690);\n world.sanitizers[1].setPosition(900, 490);\n world.sanitizers[2].setPosition(-100, -100);\n break;\n case 2:\n world.sanitizers[0].setPosition(900, 690);\n world.sanitizers[1].setPosition(300, 290);\n world.sanitizers[2].setPosition(200, 690);\n break;\n case 3:\n world.sanitizers[0].setPosition(900, 690);\n world.sanitizers[1].setPosition(100, 340);\n world.sanitizers[2].setPosition(-100, -100);\n break;\n case 4:\n world.sanitizers[0].setPosition(-100, -100);\n world.sanitizers[1].setPosition(-100, -100);\n world.sanitizers[2].setPosition(-100, -100);\n break;\n case 5:\n world.sanitizers[0].setPosition(-100, -100);\n world.sanitizers[1].setPosition(-100, -100);\n world.sanitizers[2].setPosition(-100, -100);\n break;\n }\n }", "private static Loot choosespecialedition() {\r\n final List<Loot> suitableLoot = new ArrayList<Loot>();\r\n // FIND ALL LOOT TYPES\r\n for (final Location loc : i.location) {\r\n if (loc.renting() == null) {\r\n continue;\r\n }\r\n for (final AbstractItem<? extends AbstractItemType> l : loc.lcs().loot) {\r\n if (!(l instanceof Loot)) {\r\n continue;\r\n }\r\n // Temporary, maybe put special edition definition into an xml\r\n // file. -XML\r\n if (l.id().equals(\"LOOT_CEOPHOTOS\") || l.id().equals(\"LOOT_CEOLOVELETTERS\")\r\n || l.id().equals(\"LOOT_CEOTAXPAPERS\") || l.id().equals(\"LOOT_INTHQDISK\")\r\n || l.id().equals(\"LOOT_CORPFILES\") || l.id().equals(\"LOOT_JUDGEFILES\")\r\n || l.id().equals(\"LOOT_RESEARCHFILES\") || l.id().equals(\"LOOT_PRISONFILES\")\r\n || l.id().equals(\"LOOT_CABLENEWSFILES\") || l.id().equals(\"LOOT_AMRADIOFILES\")\r\n || l.id().equals(\"LOOT_SECRETDOCUMENTS\") || l.id().equals(\"LOOT_POLICERECORDS\")) {\r\n continue;\r\n }\r\n suitableLoot.add((Loot) l);\r\n }\r\n }\r\n for (final Squad sq : i.squad) {\r\n for (final AbstractItem<? extends AbstractItemType> l : sq.loot()) {\r\n if (!(l instanceof Loot)) {\r\n continue;\r\n }\r\n // Temporary, maybe put special edition definition into an xml\r\n // file. -XML\r\n if (l.id().equals(\"LOOT_CEOPHOTOS\") || l.id().equals(\"LOOT_CEOLOVELETTERS\")\r\n || l.id().equals(\"LOOT_CEOTAXPAPERS\") || l.id().equals(\"LOOT_INTHQDISK\")\r\n || l.id().equals(\"LOOT_CORPFILES\") || l.id().equals(\"LOOT_JUDGEFILES\")\r\n || l.id().equals(\"LOOT_RESEARCHFILES\") || l.id().equals(\"LOOT_PRISONFILES\")\r\n || l.id().equals(\"LOOT_CABLENEWSFILES\") || l.id().equals(\"LOOT_AMRADIOFILES\")\r\n || l.id().equals(\"LOOT_SECRETDOCUMENTS\") || l.id().equals(\"LOOT_POLICERECORDS\")) {\r\n continue;\r\n }\r\n suitableLoot.add((Loot) l);\r\n }\r\n }\r\n if (suitableLoot.size() == 0) {\r\n return new Loot(\"LOOT_DIRTYSOCK\");\r\n }\r\n // PICK ONE\r\n do {\r\n ui().text(\"Do you want to run a special edition?\").bold().add();\r\n int y = 'a';\r\n for (final Loot l : suitableLoot) {\r\n ui(R.id.gcontrol).button(y++).text(l.toString()).add();\r\n }\r\n ui(R.id.gcontrol).button(10).text(\"Not in this month's Liberal Guardian\").add();\r\n final int c = getch();\r\n if (c == 10) {\r\n return null;\r\n }\r\n if (c >= 'a') {\r\n final Loot rval = suitableLoot.get(c - 'a');\r\n for (final Squad sq : i.squad) {\r\n sq.loot().remove(rval);\r\n }\r\n for (final Location loc : i.location) {\r\n loc.lcs().loot.remove(rval);\r\n }\r\n return rval;\r\n }\r\n } while (true);\r\n }", "public void infect() {\n\n if (random.getRandom() <= getProbability()) {\n isInfected = true;\n isInfectedOnThisStep = true;\n }\n }", "private SocialPractice chooseOnIntentions(\n\t\t\tArrayList<SocialPractice> candidateSocialPractices) {\n\t\tSocialPractice chosenAction = null; //temp\n\t\tHashMap<SocialPractice, Double> needs=new HashMap<SocialPractice, Double>();\n\t\tfor(SocialPractice sp: candidateSocialPractices){\n\t\t\tneeds.put(sp, myValues.get(sp.getPurpose()).getNeed(myContext)); \n\t\t}\n\t\tdouble totalNeed = Helper.sumDouble(needs.values()); //satisfaction can get <0, so need as well, so maybe not getting in while loop\n\t\tdouble randomDeterminer = RandomHelper.nextDoubleFromTo(0, totalNeed);\n\t\t//System.out.println(myContext);\n\t\t//System.out.println(\"Needs:\" + needs);\n\t\t\n\t\tIterator it = needs.entrySet().iterator();\n\t\twhile(randomDeterminer > 0) {\n\t\t\tHashMap.Entry pair = (HashMap.Entry) it.next();\n\t\t\tchosenAction = (SocialPractice) pair.getKey();\n\t\t\trandomDeterminer = randomDeterminer - (double) pair.getValue();\n\t\t}\n\t\treturn chosenAction;\n\t}", "public static Sharable editSharing(ApiContext apiCtx, Sharable sharable, Boolean readableByEveryone, Boolean writeableByEveryone) throws Exception\n\t{\n\t\treturn apiCtx.executeTransaction(new EMCallable<Sharable>(){\n @Override\n public Sharable call(EntityManager em) {\n \ttry{\n \t\tsharable.setReadableByEveryone(readableByEveryone);\n \t\tsharable.setWriteableByEveryone(writeableByEveryone);\n \t\tem.merge(sharable);\n \t\treturn sharable;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn null;\n\t\t\t\t}\n }\n\t\t});\n\t}" ]
[ "0.5401599", "0.5101438", "0.48003042", "0.47383142", "0.4737577", "0.47105345", "0.46214345", "0.4574285", "0.45628968", "0.45286828", "0.4504322", "0.44499224", "0.4427847", "0.44233698", "0.44013786", "0.4398726", "0.43947494", "0.4368003", "0.43604288", "0.43565673", "0.43518496", "0.4348367", "0.43364245", "0.43325737", "0.43265057", "0.43199807", "0.4318886", "0.43052474", "0.43032593", "0.42977196", "0.42969042", "0.42768303", "0.42738077", "0.42440224", "0.4237557", "0.42352378", "0.42211878", "0.4214618", "0.4211729", "0.421095", "0.42071944", "0.42049122", "0.42043868", "0.4200789", "0.41930506", "0.4182774", "0.4182344", "0.41713253", "0.41482744", "0.41475862", "0.41415867", "0.41386813", "0.41379285", "0.41162884", "0.41154382", "0.41090265", "0.41052243", "0.40972802", "0.4094872", "0.4093405", "0.4090728", "0.40867445", "0.40789273", "0.40733048", "0.40659866", "0.40586555", "0.40523544", "0.40481195", "0.40438777", "0.40426934", "0.40318486", "0.40239838", "0.40226954", "0.40204895", "0.40161267", "0.40140682", "0.40120184", "0.40051165", "0.4004975", "0.40041608", "0.4003301", "0.39918408", "0.3991117", "0.3989096", "0.39887986", "0.39874053", "0.39870808", "0.39846006", "0.3975236", "0.3975049", "0.3972339", "0.39671224", "0.39617336", "0.39575472", "0.39545798", "0.39531007", "0.39510795", "0.39451092", "0.3943332", "0.3943222" ]
0.5735361
0
Try to recover one or more entities with a specific Spreadable. This will not recover more entities than are infected.
default void recover(Spreadable spreadable, int count) { changeState(spreadable, State.INFECTED, State.RECOVERED, count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void handleEntitiesIndividually() {\n\n\t\tfinal Set<Long> originalBatch = getUidsToLoad();\n\t\tfinal Set<Long> batchOfOne = new HashSet<Long>();\n\n\t\t/**\n\t\t * We replace the batch of all the uids with our own which we'll only put one uid at a time.\n\t\t */\n\t\tsetBatch(batchOfOne);\n\n\t\tLOG.info(\"Loading \" + originalBatch.size() + \" entities individually\");\n\n\t\tfor (final Long uid : originalBatch) {\n\n\t\t\ttry {\n\n\t\t\t\tbatchOfOne.clear();\n\t\t\t\tbatchOfOne.add(uid);\n\n\t\t\t\tfinal Collection<ENTITY> loadedEntity = loadBatch();\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_loaded_individually\", loadedEntity.size());\n\n\t\t\t\tfor (final ENTITY entity : loadedEntity) {\n\t\t\t\t\tgetNextStage().send(entity);\n\t\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_out\", 1);\n\n\t\t\t\t}\n\t\t\t} catch (final Exception e) {\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:individual_entity_loading_failures\", 1);\n\n\t\t\t\tLOG.error(\"Could not load entity with uid \" + uid + \" for indexing, this entity will not be indexed. \", e);\n\t\t\t}\n\n\t\t}\n\n\t\t/** Put the original set of uids back. */\n\t\tsetBatch(originalBatch);\n\n\t}", "private void doRecoveryRead() {\n if (!promise.isDone()) {\n startEntryToRead = endEntryToRead + 1;\n endEntryToRead = endEntryToRead + clientCtx.getConf().recoveryReadBatchSize;\n new RecoveryReadOp(lh, clientCtx, startEntryToRead, endEntryToRead, this, null)\n .initiate();\n }\n }", "@Override\n public boolean moreToReceive() throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n if ((entitiesCache == null) || (entitiesCache.isEmpty()))\n {\n entitiesCache = new ArrayList<>();\n\n /*\n * The loop is needed to ensure that another retrieve is attempted if the repository handler returns an empty list.\n * This occurs if all elements returned from the repositories do not match the effectiveTime requested.\n */\n while ((entitiesCache != null) && (entitiesCache.isEmpty()))\n {\n entitiesCache = repositoryHandler.getEntitiesForRelationshipType(userId,\n startingEntityGUID,\n startingEntityTypeName,\n relationshipTypeGUID,\n relationshipTypeName,\n null,\n selectionEnd,\n forLineage,\n forDuplicateProcessing,\n startingFrom,\n pageSize,\n effectiveTime,\n methodName);\n\n if (entitiesCache != null)\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"RepositoryRelatedEntitiesIterator : moreToReceive() entitiesCache not null\");\n\n for (EntityDetail entity : entitiesCache)\n {\n String displayName = \"\";\n String qualifiedName = \"\";\n\n if (entity.getProperties() != null && entity.getProperties().getInstanceProperties() != null)\n {\n if (entity.getProperties().getInstanceProperties().get(\"displayName\") != null)\n {\n displayName = entity.getProperties().getInstanceProperties().get(\"displayName\").toString();\n }\n else if (entity.getProperties().getInstanceProperties().get(\"name\") != null)\n {\n displayName = entity.getProperties().getInstanceProperties().get(\"name\").toString();\n }\n if (entity.getProperties().getInstanceProperties().get(\"qualifiedName\") != null)\n {\n qualifiedName = entity.getProperties().getInstanceProperties().get(\"qualifiedName\").toString();\n }\n }\n\n log.debug(\"Cached entity \" + entity.getGUID() + \", displayName=\" + displayName + \", qualifiedName=\" + qualifiedName);\n }\n }\n }\n\n startingFrom = startingFrom + pageSize;\n\n if (log.isDebugEnabled())\n {\n log.debug(\"StartingFrom=\" + startingFrom);\n }\n }\n }\n\n return (entitiesCache != null);\n }", "public void recover() {\n _siteStatus = true;\n for (Integer varIndex : _dataMap.keySet()) {\n List<Data> dataList;\n if (varIndex % 2 == 0) {\n dataList = _dataMap.get(varIndex);\n Data d = dataList.get(dataList.size() - 1);\n // set the last commit variable to unavailable to read\n d.setAccess(false);\n // set the unavailable time for the variable which is the time it fails\n // When a particular version of variable is unavailable, it will never\n // become available, but we may have new version of variable\n d.setUnavailableTime(_lastFailTime);\n }\n }\n }", "private void RecoverMessages()\n {\n String messages = new String();\n int nodeIndex = getNodeIndex(localport);\n int i;\n String msgToSend;\n for(i=nodeIndex+1;i<=nodeIndex+2;i++)\n {\n msgToSend = localport;\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n\n Log.i(\"current node\",Integer.toString(nodeIndex));\n for(i=nodeIndex+4;i>=nodeIndex+3;i--)\n {\n Log.i(\"replicate from\",nodes[i % 5]);\n msgToSend = nodes[i % 5];\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n Log.i(\"messages recovered\", messages);\n if(!messages.equals(\"null\") && messages.length()>0)\n {\n Log.i(\"sasa\",Integer.toString(messages.length()));\n String msgs = messages.substring(0,messages.length()-1);\n String[] Allmessages = msgs.split(\" \");\n Log.i(\"recover\",msgs);\n for(String msg: Allmessages)\n {\n String key = msg.split(\"&&\")[0];\n String value = msg.split(\"&&\")[1];\n if(myKeys.containsKey(key))\n continue;\n myKeys.put(key,value);\n }\n\n }\n }", "@Override\r\n\tpublic InputSource resolveEntity(String publicId, String systemId)\r\n\t\t\tthrows SAXException, IOException {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void readEntityFromNBT(NBTTagCompound p_70037_1_)\n\t{\n\t\tthis.xTile = p_70037_1_.getShort(\"xTile\");\n\t\tthis.yTile = p_70037_1_.getShort(\"yTile\");\n\t\tthis.zTile = p_70037_1_.getShort(\"zTile\");\n\t\tthis.inTile = Block.getBlockById(p_70037_1_.getByte(\"inTile\") & 255);\n\t\tthis.throwableShake = p_70037_1_.getByte(\"shake\") & 255;\n\t\tthis.inGround = p_70037_1_.getByte(\"inGround\") == 1;\n\t\tthis.throwerName = p_70037_1_.getString(\"ownerName\");\n\n\t\tif ((this.throwerName != null) && (this.throwerName.length() == 0))\n\t\t{\n\t\t\tthis.throwerName = null;\n\t\t}\n\t}", "private void recover() throws JournalException {\n if (!Utility.fileExists(this.node, this.filename)) {\n // no log file to recover, just start fresh\n startFresh();\n } else {\n PersistentStorageReader reader = null;\n try {\n reader = node.getReader(this.filename);\n } catch (IOException e) {\n throw new JournalException(\"Failed to open log file: \" \n + this.filename + \" for recovery.\");\n }\n\n if (reader != null) {\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n if (line.equals(COMPLETE_TOKEN)) {\n this.pendingOps.poll();\n } else {\n try {\n Serializable obj = (Serializable)Serialization.decode(Utility.fromBase64(line));\n this.pendingOps.offer(obj);\n } catch (Exception e) {\n throw new JournalException(\"Error deserializing on recovery.\");\n }\n }\n }\n } catch (IOException e) {\n throw new JournalException(\"Error while reading from recovery log.\");\n }\n } else {\n throw new JournalException(\"Failed to open log file: \"\n + this.filename + \" for recovery.\");\n }\n try {\n this.log = this.node.getWriter(this.filename, true);\n } catch (IOException e) {\n throw new JournalException(\"Failed to open log file.\");\n }\n }\n }", "default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }", "@Override\r\n\tpublic CEntity read(CEntity entity, String ID) {\n\t\twhile (scanner.hasNext()) {\r\n\t\t\tentity.read(scanner);\r\n\t\t\tif (entity.getID().equals(ID))\r\n\t\t\t\treturn entity;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void infect() {\n isInfected = true;\n }", "@Override\r\n public void detectAndSendChanges()\r\n {\r\n super.detectAndSendChanges();\r\n\r\n for (int i = 0; i < this.crafters.size(); ++i)\r\n {\r\n ICrafting icrafting = (ICrafting)this.crafters.get(i);\r\n\r\n }\r\n }", "public InputSource resolveEntity (String publicId, String systemId)\n throws IOException, SAXException\n {\n return null;\n }", "@PostConstruct\n public void restartInterruptedMatching() throws Exception {\n if(getProperties().isCollectTrainingData()) {\n return;\n }\n\n List<State> states;\n states = getMatcherStateRepository().popAllStates();\n if (states != null) {\n setRemainingStates(states);\n for(State state : getRemainingStates()) {\n if (state.getPhase() == (byte) 1) {\n getCache().updatePhase(state.getShopId(), (byte) (state.getPhase() + 1), state.getPhase());\n }\n\n matchShop(state.getShopId(), state.getPhase(), state.getImageIds());\n getRemainingStates().remove(state);\n }\n }\n }", "public interface Entity extends Immunizable {\n /**\n * Counts the total number of people in a certain state. An entity may be in multiple states if there are\n * multiple spreadables in play.\n *\n * @param state Which state to count\n * @return The number of entities in that state\n */\n int count(State state);\n\n /**\n * Counts the total number of people in a certain state for a given Spreadable. An entity will only ever be\n * in one state per spreadable.\n *\n * @param state Which state to count\n * @param spreadable Which spreadable to consider\n * @return The number of entities in that state for the given spreadable\n */\n int count(State state, Spreadable spreadable);\n\n /**\n * @return The total number of individuals that this Entity represents\n */\n int population();\n\n /**\n * Try to change entities from one state to another. If there aren't enough entities with the old state,\n * then only that many will be changed to the new state.\n *\n * @param spreadable\n * @param from\n * @param to\n * @param count\n */\n void changeState(Spreadable spreadable, State from, State to, int count);\n\n /**\n * Try to infect one or more entities with a specific Spreadable. This will not infect more people than are\n * susceptible, and may also be affected by rules for coexistence of spreadables.\n *\n * @param spreadable\n * @param count\n */\n default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }\n\n\n /**\n * Try to recover one or more entities with a specific Spreadable. This will not recover more entities than are\n * infected.\n *\n * @param spreadable\n * @param count\n */\n default void recover(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.RECOVERED, count);\n }\n\n /**\n * Try to return one or more entities from the infected state to the susceptible state for a given Spreadable.\n * This will not affect more entities than are infected.\n *\n * @param spreadable\n * @param count\n */\n default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }\n\n String getName();\n\n Collection<String> getLabels();\n\n Collection<Spreadable> getSpreadables();\n}", "public void loadEntities(BoundingBox box, AEntityD_Interactable<?> entityToLoad){\r\n\t\tfor(Entity entity : world.getEntitiesWithinAABB(Entity.class, box.convert())){\r\n\t\t\tif(!entity.isRiding() && (entity instanceof INpc || entity instanceof EntityCreature) && !(entity instanceof IMob)){\r\n\t\t\t\tfor(Point3d ridableLocation : entityToLoad.ridableLocations){\r\n\t\t\t\t\tif(!entityToLoad.locationRiderMap.containsKey(ridableLocation)){\r\n\t\t\t\t\t\tif(entityToLoad instanceof EntityVehicleF_Physics){\r\n\t\t\t\t\t\t\tif(((EntityVehicleF_Physics) entityToLoad).getPartAtLocation(ridableLocation).placementDefinition.isController){\r\n\t\t\t\t\t\t\t\t//continue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tentityToLoad.addRider(new WrapperEntity(entity), ridableLocation);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void recovery() {\n\t\tRecordTable recordTable = new RecordTable(); \n\t\tjava.util.List<FileRecordInfoModel> lst = null;\n\t\ttry {\n\t\t\tlst = recordTable.findAllRows();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(FileRecordInfoModel model : lst)\n\t\t\t_recordSingle.addParam(model,false);\n\t\t\t// 读取配置,看是否需要扫描文件。--以后加\n\t}", "private void processMetadataFromLoader() {\n\n int recordCount = mdi.readInt();\n\n long currentTime = System.currentTimeMillis();\n synchronized (entities) {\n clearOldTempIndexes(currentTime);\n\n for (int i = 0; i < recordCount; i++) {\n int tempIndex = mdi.readInt();\n assert DirectProtocol.isValidTempIndex(tempIndex);\n String symbol = mdi.readCharSequence().toString().intern();\n\n ConstantIdentityKey key;\n int entityIndex = entities.get(symbol, NOT_FOUND_VALUE);\n if (entityIndex == NOT_FOUND_VALUE) {\n entityIndex = entities.size();\n key = new ConstantIdentityKey(symbol);\n entities.put(key, entityIndex);\n } else {\n key = entities.getKeyObject(symbol);\n }\n\n // Note: key is guarantied to be same object as in \"entities\" field\n tempIndexes.put(tempIndex, key);\n\n sendMetadata(symbol, entityIndex);\n }\n if (recordCount > 0) {\n lastTempIndexAdded = currentTime;\n }\n }\n }", "public void infect() {\n\t\tPlagueAgent current = this;\n\t\tif (!current.infected) {\n\t\t\tfor (PlagueAgent a : plagueWorld.getNeighbors(current, 5)) {\n\t\t\t\tif (a.infected) {\n\t\t\t\t\tint luck = Utilities.rng.nextInt(100);\n\t\t\t\t\tif (luck < plagueWorld.VIRULENCE) {\n\t\t\t\t\t\tthis.infected = true;\n\t\t\t\t\t\tplagueWorld.newInfection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplagueWorld.changed();\n\t}", "private int recover(HttpRequestGenerator requestor, CommCareTransactionParserFactory factory) {\n\t\tthis.publishProgress(PROGRESS_RECOVERY_NEEDED);\n\t\t\n\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery Triggered\");\n\n\t\t\n\t\tInputStream cacheIn;\n\t\tBitCache cache = null;\n\t\t\n\t\t//This chunk is the safe field of operations which can all fail in IO in such a way that we can\n\t\t//just report back that things didn't work and don't need to attempt any recovery or additional\n\t\t//work\n\t\ttry {\n\n\t\t\t//Make a new request without all of the flags\n\t\t\tHttpResponse response = requestor.makeCaseFetchRequest(server, false);\n\t\t\tint responseCode = response.getStatusLine().getStatusCode();\n\t\t\t\n\t\t\t//We basically only care about a positive response, here. Anything else would have been caught by the other request.\n\t\t\tif(!(responseCode >= 200 && responseCode < 300)) {\n\t\t\t\treturn PROGRESS_RECOVERY_FAIL_SAFE;\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise proceed with the restore\n\t\t\tint dataSizeGuess = -1;\n\t\t\tif(response.containsHeader(\"Content-Length\")) {\n\t\t\t\tString length = response.getFirstHeader(\"Content-Length\").getValue();\n\t\t\t\ttry{\n\t\t\t\t\tdataSizeGuess = Integer.parseInt(length);\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t//Whatever.\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Grab a cache. The plan is to download the incoming data, wipe (move) the existing db, and then\n\t\t\t//restore fresh from the downloaded file\n\t\t\tcache = BitCacheFactory.getCache(c, dataSizeGuess);\n\t\t\tcache.initializeCache();\n\t\t\t\n\t\t\tOutputStream cacheOut = cache.getCacheStream();\n\t\t\tAndroidStreamUtil.writeFromInputToOutput(response.getEntity().getContent(), cacheOut);\n\t\t\n\t\t\tcacheIn = cache.retrieveCache();\n\t\t\t\t\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tif(cache != null) {\n\t\t\t\t//If we made a temp file, we're done with it here.\n\t\t\t\tcache.release();\n\t\t\t}\n\t\t\t//Ok, well, we're bailing here, but we didn't make any changes\n\t\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery Failed due to IOException|\" + e.getMessage());\n\t\t\treturn PROGRESS_RECOVERY_FAIL_SAFE;\n\t\t}\n\t\t\n\t\t\n\t\tthis.publishProgress(PROGRESS_RECOVERY_STARTED);\n\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery payload downloaded\");\n\n\t\t//Ok. Here's where things get real. We now have a stable copy of the fresh data from the\n\t\t//server, so it's \"safe\" for us to wipe the casedb copy of it.\n\t\t\n\t\t//CTS: We're not doing this in a super good way right now, need to be way more fault tolerant.\n\t\t//this is the temporary implementation of everything past this point\n\t\t\n\t\t//Wipe storage\n\t\t//TODO: move table instead. Should be straightforward with sandboxed db's\n\t\tCommCareApplication._().getUserStorage(ACase.STORAGE_KEY, ACase.class).removeAll();\n\t\t\n\t\t\n\t\tString failureReason = \"\";\n\t\ttry { \n\t\t\t//Get new data\n\t\t\tString syncToken = readInput(cacheIn, factory);\n\t\t\tupdateUserSyncToken(syncToken);\n\t\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync Recovery Succesful\");\n\t\t\treturn PROGRESS_DONE;\n\t\t} catch (InvalidStructureException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (XmlPullParserException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (UnfullfilledRequirementsException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (StorageFullException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} \n\t\t\n\t\t//These last two aren't a sign that the incoming data is bad, but\n\t\t//we still can't recover from them usefully\n\t\tcatch (SessionUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tfailureReason = e.getMessage();\n\t\t} finally {\n\t\t\t//destroy temp file\n\t\t\tcache.release();\n\t\t}\n\t\t\n\t\t//OK, so we would have returned success by now if things had worked out, which means that instead we got an error\n\t\t//while trying to parse everything out. We need to recover from that error here and rollback the changes\n\t\t\n\t\t//TODO: Roll back changes\n\t\tLogger.log(AndroidLogger.TYPE_USER, \"Sync recovery failed|\" + failureReason);\n\t\treturn PROGRESS_RECOVERY_FAIL_BAD;\n\t}", "private void readItems(ArrayList<Family> familiesToCreate) {\n familiesToCreate.forEach(family -> {\n // <ReadItem>\n try {\n CosmosItemResponse<Family> item = container.readItem(family.getId(), new PartitionKey(family.getLastName()), Family.class);\n double requestCharge = item.getRequestCharge();\n Duration requestLatency = item.getDuration();\n logger.info(String.format(\"Item successfully read with id %s with a charge of %.2f and within duration %s\",\n item.getItem().getId(), requestCharge, requestLatency));\n } catch (CosmosException e) {\n e.printStackTrace();\n logger.info(String.format(\"Read Item failed with %s\", e));\n }\n // </ReadItem>\n });\n }", "private static void explore(\n final Deque<AbstractEntity<?>> frontier, \n final Set<String> explored) {\n \n if (frontier.isEmpty()) {\n throw new DefinersExecutorException(\"There is nothing to process.\");\n }\n\n final AbstractEntity<?> entity = frontier.pop();\n final String identity = getEntityIdentity(entity);\n if (explored.contains(identity) || !entity.isInstrumented()) {\n return;\n }\n\n if (!entity.isInitialising()) {\n throw new DefinersExecutorException(format(\"Entity [%s] of type [%s] is not in the 'initialising' phase.\", entity, entity.getClass()));\n }\n \n explored.add(identity);\n\n final boolean isEntityPersisted = entity.isPersisted();\n\n // FIXME please, consider applicability of the following logic (legacy code from EntityUtils.handleMetaProperties method):\n //------------------------------------------------------------------\n // if (!unionEntity && instance.getProperties().containsKey(\"key\")) {\n // final Object keyValue = instance.get(\"key\");\n // if (keyValue != null) {\n // // handle property \"key\" assignment\n // instance.set(\"key\", keyValue);\n // }\n // }\n //------------------------------------------------------------------\n\n // collect properties to process\n final Map<Boolean, List<Field>> propFieldsToProcess = streamRealProperties(entity.getType())\n .filter(field -> !isPropertyProxied(entity, field.getName()) && !isCritOnlySingle(entity.getType(), field.getName()) )\n .collect(partitioningBy(field -> isValueProxied(entity, field)));\n\n // process original values of properties that have id-only-proxy value if the entity is instrumented and persisted\n if (isEntityPersisted) {\n final List<Field> idOnlyProxyPropFields = propFieldsToProcess.get(true);\n for (final Field propField : idOnlyProxyPropFields) {\n final String propName = propField.getName();\n final Object propertyValue = entity.get(propName);\n entity.getProperty(propName).setOriginalValue(propertyValue);\n }\n }\n\n // process non-proxied properties, which excludes non-proxied properties that have id-only-proxy values\n final List<Field> nonProxiedPropFields = propFieldsToProcess.get(false);\n for (final Field propField : nonProxiedPropFields) {\n final String propName = propField.getName();\n final boolean isEntity = AbstractEntity.class.isAssignableFrom(propField.getType());\n final boolean isCollectional = Collection.class.isAssignableFrom(propField.getType());\n\n final Object propertyValue = entity.get(propName);\n\n if (isCollectional) { // handle collectional properties\n if (propertyValue != null) {\n final Collection<?> collection = (Collection<?>) propertyValue;\n for (final Object item: collection) {\n if (item != null && item instanceof AbstractEntity) {\n final AbstractEntity<?> value = (AbstractEntity<?>) item;\n frontier.push(value);\n explore(frontier, explored);\n }\n }\n }\n } else if (isEntity) { // handle entity-typed properties\n if (propertyValue != null) {\n final AbstractEntity<?> value = (AbstractEntity<?>) propertyValue;\n // produce fetch\n frontier.push(value);\n explore(frontier, explored);\n }\n }\n \n // original values and execution of ACE handlers is relevant only for instrumented entities\n handleOriginalValueAndACE(entity.getProperty(propName), propertyValue, isEntityPersisted);\n }\n\n entity.endInitialising();\n }", "private void recover() throws IOException, NumberFormatException,\n\t\t\tNotBoundException {\n\t\tFileReader fileReader = new FileReader(registryBackup);\n\n\t\t// Always wrap FileReader in BufferedReader.\n\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\tString line = null;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\tlist.add(line);\t\n\t\t}\n\t\t// Always close files.\n\t\tbufferedReader.close();\n\n\t\tPrintWriter writer = new PrintWriter(registryBackup);\n\t\twriter.print(\"\");\n\t\twriter.close();\n\t\t\n\t\tfor(String conInfo : list){\n\t\tString[] split = conInfo.split(\" \");\n\t\ttry {\n\t\t\tthis.addReplica(split[0], Integer.parseInt(split[1]));\n\t\t} catch (Exception ex) {\n\t\t\tprint(ex.getMessage());\n\t\t}\n\t\t}\n\t}", "@Override\n public Xid[] recover(final int _flag)\n {\n if (VFSStoreResource.LOG.isDebugEnabled()) {\n VFSStoreResource.LOG.debug(\"recover (flag = \" + _flag + \")\");\n }\n return null;\n }", "private void grabarProyectoCarrerasOferta() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : sessionProyecto.getCarrerasSeleccionadasTransfer()) {\r\n Carrera c = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE));\r\n \r\n Long pcoId = devuelveProyectoCarreraId(proyectoCarreraOfertas, proyectoCarreraOferta);\r\n proyectoCarreraOferta = proyectoCarreraOfertaService.buscarPorId(new ProyectoCarreraOferta(pcoId));\r\n if (proyectoCarreraOferta == null) {\r\n proyectoCarreraOferta = new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), c.getId(), sessionProyecto.getOfertaAcademicaSeleccionada().getId(),\r\n Boolean.TRUE);\r\n if (contieneCarrera(proyectoCarreraOfertas, proyectoCarreraOferta) == false) {\r\n proyectoCarreraOfertaService.guardar(proyectoCarreraOferta);\r\n this.grabarIndividuoPCO(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"CREAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId() + \"|Proyecto= \"\r\n + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n }\r\n proyectoCarreraOferta.setEsActivo(true);\r\n proyectoCarreraOfertaService.actualizar(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"EDITAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId()\r\n + \"|Proyecto= \" + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }", "private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }", "private Pit getPit(List<Entity> entities) {\r\n for (Entity e : entities) {\r\n if (e instanceof Pit) return (Pit) e;\r\n }\r\n return null;\r\n }", "public void cargarSecuencia(FacturaProveedorSRI facturaProveedorSRI, PuntoDeVenta puntoDeVenta)\r\n/* 277: */ throws ExcepcionAS2\r\n/* 278: */ {\r\n/* 279:280 */ AutorizacionDocumentoSRI autorizacionDocumentoSRI = null;\r\n/* 280:283 */ if (puntoDeVenta != null) {\r\n/* 281:284 */ autorizacionDocumentoSRI = this.servicioDocumento.cargarDocumentoConAutorizacion(getFacturaProveedorSRI().getDocumento(), puntoDeVenta, facturaProveedorSRI\r\n/* 282:285 */ .getFechaEmisionRetencion());\r\n/* 283: */ }\r\n/* 284:287 */ if ((Integer.parseInt(facturaProveedorSRI.getNumeroRetencion()) == 0) || (\r\n/* 285:288 */ (facturaProveedorSRI.getDocumento() != null) && (facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) && \r\n/* 286:289 */ (!facturaProveedorSRI.isTraCorregirDatos())))\r\n/* 287: */ {\r\n/* 288:290 */ String numero = this.servicioSecuencia.obtenerSecuencia(getFacturaProveedorSRI().getDocumento().getSecuencia(), facturaProveedorSRI\r\n/* 289:291 */ .getFechaEmisionRetencion());\r\n/* 290: */ \r\n/* 291:293 */ facturaProveedorSRI.setNumeroRetencion(numero);\r\n/* 292:294 */ facturaProveedorSRI.setAutorizacionRetencion(autorizacionDocumentoSRI.getAutorizacion());\r\n/* 293: */ }\r\n/* 294: */ }", "public UnloadStrandedTurn(Iterator<Entity> entities) {\n super(IPlayer.PLAYER_NONE);\n\n // Validate input.\n if (null == entities) {\n throw new IllegalArgumentException(\n \"the passed enumeration of entities is null\");\n }\n if (!entities.hasNext()) {\n throw new IllegalArgumentException(\n \"the passed enumeration of entities is empty\");\n }\n\n // Get the first entity.\n Entity entity = entities.next();\n\n // Do we need to get more entities?\n if (entities.hasNext()) {\n\n // It's a bit of a hack, but get the Game from the first\n // entity, and create a temporary array that can hold the\n // IDs of every entity in the game.\n int[] ids = new int[entity.game.getNoOfEntities()];\n int length = 0;\n\n // Store the first entity's ID.\n ids[length++] = entity.getId();\n\n // Walk the list of remaining stranded entities.\n while (entities.hasNext()) {\n ids[length++] = entities.next().getId();\n }\n\n // Create an array that just holds the stranded entity ids.\n entityIds = new int[length];\n System.arraycopy(ids, 0, entityIds, 0, length);\n\n } // End have-more-stranded-entities\n else {\n // There was only one stranded entity.\n entityIds = new int[1];\n entityIds[0] = entity.getId();\n }\n }", "public InputSource resolveEntity(String publicId, String systemId) \n\t throws SAXException, IOException {\n\t String entityPath = \"/home/username/java/xxe/file\"; \n\t if (systemId.equals(entityPath)) { \n\t \n\t return new InputSource(entityPath); \n\t } else { \n\t return new InputSource(); // Disallow unknown entities \n\t // by returning a blank path \n\t } \n\t }", "public void swapReplicatedEntities(Set<Entity> newReplicatedEntities, Portal portal) {\n // Loop through all of the existing fake entities and remove any that will no longer be visible to the player\n Iterator<ViewableEntity> removingIterator = replicatedEntites.values().iterator();\n while(removingIterator.hasNext()) {\n // Get the next entity, check if it is still visible in the new entities\n ViewableEntity playerEntity = removingIterator.next();\n Entity entity = playerEntity.getEntity();\n\n // If an entity is now vanished, or is no longer shown, hide it\n if(!newReplicatedEntities.contains(entity) || isVanished(entity)) {\n // If not, send an entity destroy packet, then remove the entity\n hideEntity(playerEntity.getEntityId());\n removingIterator.remove();\n }\n }\n\n // Loop through all the new entities\n for(Entity entity : newReplicatedEntities) {\n // Skip vanished players\n if(isVanished(entity)) {\n continue;\n }\n\n // If the current entity does not exist in the list\n if(!replicatedEntites.containsKey(entity)) {\n // Make a new PlayerViewableEntity instance from the entity, then send the packets to show it\n ViewableEntity newEntity = new ViewableEntity(this, entity, portal, random);\n showEntity(entity, newEntity.getLocation(), newEntity.getRotation(), newEntity.getEntityId());\n replicatedEntites.put(entity, newEntity); // Add the entity to the list\n }\n }\n }", "public void refrescarForeignKeysDescripcionesTipoDetalleMovimientoInventario() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tTipoDetalleMovimientoInventarioConstantesFunciones.refrescarForeignKeysDescripcionesTipoDetalleMovimientoInventario(this.tipodetallemovimientoinventarioLogic.getTipoDetalleMovimientoInventarios());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tTipoDetalleMovimientoInventarioConstantesFunciones.refrescarForeignKeysDescripcionesTipoDetalleMovimientoInventario(this.tipodetallemovimientoinventarios);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//tipodetallemovimientoinventarioLogic.setTipoDetalleMovimientoInventarios(this.tipodetallemovimientoinventarios);\r\n\t\t\ttipodetallemovimientoinventarioLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public void restore() {\r\n for (int i = 0; i < 24; i++) {\r\n int staticLevel = getStaticLevel(i);\r\n setLevel(i, staticLevel);\r\n }\r\n if (entity instanceof Player) {\r\n ((Player) entity).getActionSender().sendSound(new Audio(2674));\r\n }\r\n rechargePrayerPoints();\r\n }", "private synchronized void attemptDespawnCreatures() {\n\t\ttry {\n\t\t\tfor (int i = 0; i < this.creatureEntities.size(); i++) {\n\t\t\t\tCreature creature = creatureEntities.get(i);\n\n\t\t\t\t// Acquire a read only lock, source:\n\t\t\t\t// http://winterbe.com/posts/2015/04/30/java8-concurrency-tutorial-synchronized-locks-examples/\n\t\t\t\tReadWriteLock readOnlyLock = new ReentrantReadWriteLock();\n\n\t\t\t\treadOnlyLock.readLock().lock();\n\t\t\t\tcreature.tryToDespawn();\n\t\t\t\treadOnlyLock.readLock().unlock();\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tLastTry.handleException(exception);\n\t\t}\n\t}", "@Override\n protected void doCheckEffect ()\n {\n List<LivingEntity> entities = getLivingEntities(1.5);\n if (entities.size() > 0)\n {\n for (LivingEntity entity : entities)\n {\n if (entity.getUniqueId() == player.getUniqueId())\n continue;\n\n entity.damage(usesModifier * 2, player);\n\n kill();\n return;\n }\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "public abstract boolean uncover();", "abstract protected Entity selectNextEntity();", "public static void errorRecovery (CD19Parser p) throws Exception {\n\n int nextComma = p.nextTokenOccursAt(Token.TCOMA);\n\n int nextMinViableTokenBesidesComma = -1;\n int nextSemiComma = p.nextTokenOccursAt(Token.TSEMI);\n int nextLeftParanthesis = p.nextTokenOccursAt(Token.TLPAR);\n if (nextSemiComma != -1) {\n nextMinViableTokenBesidesComma = nextSemiComma;\n }\n if (nextLeftParanthesis != -1 && nextLeftParanthesis < nextMinViableTokenBesidesComma) {\n nextMinViableTokenBesidesComma = nextLeftParanthesis;\n }\n\n // if there is no necessary token for\n // NREPT or NFOR then just fail anyway\n // as it will fail NREPT or NFOR ultimately\n if (nextMinViableTokenBesidesComma == -1) {\n throw new Exception(\"Unable to recover.\");\n }\n\n // there is no next comma\n // i.e. we have to jump the parser\n // the next sensible section\n if (nextComma == -1) {\n // there is a next comma but it doesn't occur\n // in the <initlist>. thus we can only attempt to jump\n // the parser to the next sensisble section\n if (nextMinViableTokenBesidesComma != -1) {\n p.tokensJumpTo(nextMinViableTokenBesidesComma);\n } else {\n throw new Exception(\"Unable to recover\");\n }\n return;\n }\n\n // if next comma occurs before the next ';' or ')'\n // jump there\n if (nextComma < nextMinViableTokenBesidesComma) {\n p.tokensJumpTo(nextComma);\n return;\n }\n\n\n throw new Exception(\"Unable to recover\");\n }", "public void recover(Iterator<String> uuids) throws IndexException\n {\n IndexReader reader = indexStorage.getIndexReader();\n try\n {\n final HashMap<String, Document> addedDocuments = new HashMap<String, Document>();\n final HashSet<String> removedDocuments = new HashSet<String>();\n while (uuids.hasNext())\n {\n String nodeUuid = uuids.next();\n\n GetContentEntryCommand getCommand = new GetContentEntryCommand(nodeUuid);\n final ContentEntry contentEntry = (ContentEntry)indexStorage.invokeNextInterceptor(null, getCommand);\n if (contentEntry == null)\n {\n if (indexStorage.getDocument(nodeUuid, reader) != null)\n {\n // item exist in index storage but doesn't exist in\n // persistence storage\n removedDocuments.add(nodeUuid);\n }\n }\n else\n {\n\n Document doc = nodeIndexer.createDocument(contentEntry);\n\n if (indexStorage.getDocument(nodeUuid, reader) != null)\n {\n // out dated content\n addedDocuments.put(nodeUuid, doc);\n removedDocuments.add(nodeUuid);\n }\n else\n {\n // content desn't exist\n addedDocuments.put(nodeUuid, doc);\n }\n }\n //flash if changes more when BUFFER_MAX_SIZE \n if (checkFlush(addedDocuments, removedDocuments))\n {\n flash(addedDocuments, removedDocuments);\n }\n }\n //if some changes left\n if (addedDocuments.size() + removedDocuments.size() >= 0)\n {\n indexStorage.save(new LuceneIndexTransaction(addedDocuments, removedDocuments));\n }\n }\n catch (Throwable e)\n {\n throw new IndexException(e.getLocalizedMessage(), e);\n }\n }", "private void addEntitiesToEntityCache(ModelReader modelReader,\n\t\t ResourceHandler resourceHandler,\n String loaderEnt,\n String locationEnt) throws OfbizDataException {\n\t\tif (modelReader == null || resourceHandler == null) {\n\t\t\tLOG.warn(String.format(\"Null reader or resource handler\" +\n\t\t\t\t\t \" in addEntitiesToEntityCache() method. Model\" +\n \" reader: %s Resource handler: %s\",\n modelReader, resourceHandler));\n\t\t\treturn;\n\t\t}\n\t\ttry {\n Document document;\n\t\t\tMap<String, ModelEntity> entityCache = modelReader.getEntityCache();\n List<ModelViewEntity> tempViewEntityList\n = new LinkedList<ModelViewEntity>();\n Hashtable<String, String> docElementValues\n = new Hashtable<String, String>();\n\n\t\t\tsynchronized (ModelReader.class) {\n\t\t\t\ttry {\n\t\t\t\t\tdocument = resourceHandler.getDocument();\n\t\t\t\t} catch (GenericConfigException e) {\n String msg = \"Error getting document from resource handler\";\n LOG.error(msg);\n\t\t\t\t\tthrow new GenericEntityConfException(msg, e);\n\t\t\t\t}\n\t\t\t\tif(document == null) {\n\t\t\t\t\tString msg = String.format(\"Could not get document for %s\",\n resourceHandler);\n\t\t\t\t\tLOG.error(msg);\n\t\t\t\t\tthrow new OfbizDataException(msg);\n\t\t\t\t}\n\n\t\t\t\tElement docElement = document.getDocumentElement();\n\n\t\t\t\tif (docElement == null) {\n\t\t\t\t\tString msg = \"NULL doc element.\";\n\t\t\t\t\tLOG.error(msg);\n\t\t\t\t\tthrow new OfbizDataException(msg);\n\t\t\t\t}\n\t\t\t\tdocElement.normalize();\n\t\t\t\tNode curChild = docElement.getFirstChild();\n\n\t\t\t\tint i = 0;\n\n\t\t\t\tif (curChild != null) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tboolean isEntity = \"entity\".equals(curChild.getNodeName());\n\t\t\t\t\t\tboolean isViewEntity = \"view-entity\".equals(curChild.getNodeName());\n\n\t\t\t\t\t\tif ((isEntity || isViewEntity) &&\n\t\t\t\t\t\t\tcurChild.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\tElement curEntity = (Element) curChild;\n\t\t\t\t\t\t\tString entityName =\n\t\t\t\t\t\t\t\tUtilXml.checkEmpty(curEntity.getAttribute(\"entity-name\"));\n\n\t\t\t\t\t\t\t// check to see if entity with same name has already\n\t\t\t\t\t\t\t// been read\n\t\t\t\t\t\t\tif (entityCache.containsKey(entityName)) {\n if(LOG.isDebugEnabled()) {\n LOG.debug(String.format(\n \"Entity %s is defined more than once, most \" +\n \"recent will overwrite previous definition\",\n entityName));\n }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// add entity to entityResourceHandlerMap map\n\t\t\t\t\t\t\tmodelReader.addEntityToResourceHandler(entityName,\n\t\t\t\t\t\t\t\t loaderEnt,\n locationEnt);\n\n\t\t\t\t\t\t\tModelEntity entity;\n\n\t\t\t\t\t\t\tif (isEntity) {\n\t\t\t\t\t\t\t\tentity = createModelEntity(modelReader,\n curEntity,\n\t\t\t\t\t\t\t\t\t\t docElement,\n null,\n docElementValues);\n if(LOG.isDebugEnabled()){\n LOG.debug(String.format(\"[Entity]: # %d: %s\",\n i, entityName));\n }\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tentity = createModelViewEntity(modelReader,\n curEntity,\n\t\t\t\t\t\t\t\t\t\t docElement,\n null,\n docElementValues);\n\t\t\t\t\t\t\t\t// put the view entity in a list to get ready\n\t\t\t\t\t\t\t\t// for the second pass to populate fields...\n\t\t\t\t\t\t\t\ttempViewEntityList.add((ModelViewEntity)entity);\n if(LOG.isDebugEnabled()){\n String msg = String.format(\"[ViewEntity]: # %d: %s\",\n i, entityName);\n LOG.debug(msg);\n }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (entity != null) {\n safelyMapAdd(entityCache, entityName, entity);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tLOG.warn(String.format(\"Could not create entity \" +\n \"for entityName: %s\",\n\t\t\t\t\t\t\t\t\t\t entityName));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ((curChild = curChild.getNextSibling()) != null);\n\t\t\t\t} else {\n\t\t\t\t\tLOG.warn(\"No child nodes found.\");\n\t\t\t\t}\n\n\t\t\t\tmodelReader.rebuildResourceHandlerEntities();\n\n\t\t\t\t// do a pass on all of the view entities now that all of the\n\t\t\t\t// entities have loaded and populate the fields\n for (ModelViewEntity me : tempViewEntityList) {\n me.populateFields(entityCache);\n }\n\t\t\t\tLOG.debug(\"FINISHED LOADING ENTITIES.\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tString msg = String.format(\"Got exception when adding entities \" +\n\t\t\t\t\t\"from resource handler: %s\", resourceHandler);\n\t\t\tLOG.error(msg, ex);\n\t\t\tthrow new OfbizDataException(msg, ex);\n\t\t}\n\t}", "public void resolve(){\n logger.log(Level.FINE,attacker.getName()+\" withering attacked \"+defender.getName());\n AttackState state=new AttackState();\n state.weaponDamage=weapon.getDamage();\n state.initialAttackpool=baseAttackdice+baseAccuracy-woundpenalty;\n attacker.declareWitheringAttack(state); // If the attacker wants to change the pool, he modifies the state accordingly.\n defender.declareWitheringDV(state); // Defender declares their dv against this specific attack. This sets both initialdv and changedDv\n state.initialAttackRoll= new DiceThrow(state.changedAttackpool);\n attacker.modifyWitheringAttackRollAttacker(state); //This sets stuff like modifiedAttackRollAttacker and AttackerRollValuation\n defender.modifyWitheringAttackRollDefender(state); //This sets defender modifiedAttackRollDefender\n state.attackRollSuccesses=state.modifiedAttackRollDefender.evaluateResults(state.AttackRollValuationAttacker);\n state.threshholdSuccesses=state.attackRollSuccesses-state.changedDv;\n logger.log(Level.FINE,attacker.getName()+\" rolled \"+state.changedAttackpool+\" dice against \"+defender.getName()+\"'s dv of \"+state.changedDv+\" and gained \"+state.attackRollSuccesses+\" successes.\");\n attacker.changeWitheringThreshholdAttacker(state); //This sets thresholdModifiedAttacker\n defender.changeWitheringThreshholdDefender(state); //This sets thresholdModifiedDefender\n if(state.thresholdModifiedDefender>=0) {\n logger.log(Level.FINE,attacker.getName()+\" hit \"+defender.getName()+\" with \"+state.thresholdModifiedDefender+\" threshhold successes.\");\n attacker.modifyWitheringRawDamageAttacker(state); //Sets normal raw damageType, based on strength and weapon damageType, and then sets rawDamagemModifiedAttacker\n defender.modifyWitheringRawDamageDefender(state); //this sets rawDamageModifiedDefender, and sets up the various soak values, so natural soak and armor soak.\n logger.log(Level.FINE, \"The raw damage of the attack is: \"+state.rawDamageModifiedDefender);\n state.totalSoak = Math.max(state.defenderArmorSoak - ignoredArmorSoak, 0) + state.defenderNaturalSoak; //\n attacker.modifyTotalSoakAttacker(state); //This sets totalSoakmodifiedAttacker. Don't think this actually has support in the solar charmset, but giving opportunities to work with.\n defender.modifyTotalSoakDefender(state); // This sets totalSoakmodifiedDefender.\n state.postSoakSuccesses=Math.max(state.rawDamageModifiedDefender-state.totalSoakModifiedDefender,weapon.getOverwhelming());\n logger.log(Level.FINE,state.totalSoakModifiedDefender+\" damage is soaked, leading to post soak dice of \"+state.postSoakSuccesses);\n attacker.declarePostSoakAttacker(state); //sets postSoakSuccessesModifiedAttacker\n defender.declarePostSoakDefender(state); //sets postSoakSuccessesModifiedDefender\n DiceThrow droll=new DiceThrow(state.postSoakSuccessesModifiedDefender);\n state.damageRoll=droll;\n attacker.modifyWitheringDamageRollAttacker(state); //sets damageRollmodifiedAttacker and damageRollvValuation\n defender.modifyWitheringDamageRollDefender(state); //sets damageRollmodifiedDefender\n state.initiativeDamageDone=state.damageRollModifiedDefender.evaluateResults(state.damageRollValuation);\n logger.log(Level.FINE,attacker.getName()+\" rolls \"+state.postSoakSuccessesModifiedDefender+\" dice and achieves \"+state.initiativeDamageDone+\" successes.\");\n attacker.modifyInitiativeDamageAttacker(state);\n defender.modifyInitiativeDamageDefender(state); //Since this is the last change of initiative, we can check whether the defender was crashed here.\n attacker.updateInitiativeAttacker(state);\n defender.updateInitiativeDefender(state);//Here we should handle all the initiative changes respectively, with checking if people are crashed etc.\n }\n else{\n attacker.failedWitheringAttackAttacker(state);\n defender.failedWitheringAttackDefender(state);\n }\n\n }", "@Test\r\n public void testFind() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n MonitoriaEntity nuevaEntity = persistence.find(entity.getId());\r\n Assert.assertNotNull(nuevaEntity);\r\n Assert.assertEquals(entity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(entity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(entity.getTipo(), nuevaEntity.getTipo());\r\n \r\n }", "public void tryToFire() {\n\t\tif (System.currentTimeMillis() - lastFire < firingInterval) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// if we waited long enough, create the shot entity, and record the time.\n\t\tlastFire = System.currentTimeMillis();\n\t\tShotEntity shot = new ShotEntity(this,\"shot.gif\",ship.getX()+10,ship.getY()-30, 1);\n\t\tentities.add(shot);\n\t}", "public void refrescarForeignKeysDescripcionesLiquidacionImpuestoImpor() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tLiquidacionImpuestoImporConstantesFunciones.refrescarForeignKeysDescripcionesLiquidacionImpuestoImpor(this.liquidacionimpuestoimporLogic.getLiquidacionImpuestoImpors());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tLiquidacionImpuestoImporConstantesFunciones.refrescarForeignKeysDescripcionesLiquidacionImpuestoImpor(this.liquidacionimpuestoimpors);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(PedidoCompraImpor.class));\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(Cliente.class));\r\n\t\tclasses.add(new Classe(Factura.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//liquidacionimpuestoimporLogic.setLiquidacionImpuestoImpors(this.liquidacionimpuestoimpors);\r\n\t\t\tliquidacionimpuestoimporLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "@Override\r\n\tpublic <S extends Candidat> Iterable<S> save(Iterable<S> entities) {\n\t\treturn null;\r\n\t}", "private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }", "protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}", "protected void restoreGame() throws IOException, InterruptedException {\n deckLeaderCard=new DeckLeaderCard();\n reserve=new Reserve();\n restoreInformationOfMarket();\n restoreInformationOfProductionDeck();\n\n }", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public DetectPiiEntitiesResult detectPiiEntities(DetectPiiEntitiesRequest request) {\n request = beforeClientExecution(request);\n return executeDetectPiiEntities(request);\n }", "public void refillMissiles(Iterator<ICollider> psIterator, ICollider curObj, ICollider ship)\n\t{\n\t\tif(((SpaceStation)curObj).getVisibility())\n\t\t{\n\t\t\tif(ship instanceof PlayerShip)\n\t\t\t\t((PlayerShip)ship).reload();\n\t\t\telse if (ship instanceof NonPlayerShip)\n\t\t\t\t((NonPlayerShip)ship).reload();\n\t\t\tSystem.out.println(\"Ammo refilled\");\n\t\t}else\n\t\t\tSystem.out.println(\"SpaceStation is blinking\");\n\t\tpsIterator.remove();\n\t\t\n\t}", "private Artikel liesArtikel(ObjectInputStream ois) throws IOException, ClassNotFoundException {\n \n try {\n return (Artikel) ois.readObject();\n\n \n } catch (EOFException exc) {\n return null;\n }\n \n \n }", "private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}", "@Override\n public InputSource resolveEntity(String publicId, String systemId)\n throws SAXException, IOException {\n\n if (isReference()) {\n return getRef().resolveEntity(publicId, systemId);\n }\n\n dieOnCircularReference();\n\n log(\"resolveEntity: '\" + publicId + \"': '\" + systemId + \"'\",\n Project.MSG_DEBUG);\n\n InputSource inputSource =\n getCatalogResolver().resolveEntity(publicId, systemId);\n\n if (inputSource == null) {\n log(\"No matching catalog entry found, parser will use: '\"\n + systemId + \"'\", Project.MSG_DEBUG);\n }\n\n return inputSource;\n }", "public InputSource resolveEntity(String publicId, String systemId) {\r\n Log.log(Log.WARNING,\r\n \"Blocked attempt to resolve external entity at {0}.\", systemId);\r\n return new InputSource(new ByteArrayInputStream(new byte[0]));\r\n }", "private List<Entity> getLoadableEntities() { \n ArrayList<Entity> choices = new ArrayList<Entity>();\n // If current entity is null, nothing to do\n if (ce() == null) {\n return choices;\n }\n List<Entity> entities = clientgui.getClient().getGame()\n .getEntitiesVector();\n for (Entity other : entities) { \n if (other.isSelectableThisTurn() && ce().canLoad(other, false)) {\n choices.add(other);\n }\n }\n return choices;\n }", "protected Entity findPlayerToAttack()\n {\n EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);\n return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;\n }", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public static void populate() throws IOException, Exception {\n\n EntityManager em = emf.createEntityManager();\n facade.fillingUpDBWithEquipments(facade.getEquipmentDTOsFromAPI(jsonReader));\n Player player1 = new Player(\"Nikolaj\", \"Hamster16\");\n Player DM = new Player(\"Cathrine\", \"Portraet11\");\n Player player2 = new Player(\"Jens\", \"Skeletor69\");\n AbillityScores abiSco11 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco12 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco13 = new AbillityScores(18, 8, 14, 12, 14, 10);\n Random randi = new Random(0);\n Skills skils1 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils2 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils3 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Character ch1 = new Character(5, 150, 85, 10, 30, \"Damascus\", \"He was a valiant paladin.\", \"orc\", \"paladin\", abiSco11, skils1);\n Character ch2 = new Character(5, 104, 85, 17, 60, \"Heidi\", \"He was a valiant druid.\", \"human\", \"druid\", abiSco12, skils2);\n Character ch3 = new Character(5, 160, 85, 17, 30, \"Varanoth\", \"He was a valiant fighter.\", \"orc\", \"fighter\", abiSco13, skils3);\n Equipment e1 = em.find(Equipment.class, \"club\");\n Equipment e2 = em.find(Equipment.class, \"candle\");\n Equipment e3 = em.find(Equipment.class, \"camel\");\n Equipment e4 = em.find(Equipment.class, \"bucket\");\n ch1.addInventory(new Inventory(e1, 1));\n ch2.addInventory(new Inventory(e2, 1));\n ch2.addInventory(new Inventory(e3, 1));\n ch3.addInventory(new Inventory(e4, 1));\n e1.addInventory(ch1.getInventories().get(0));\n e2.addInventory(ch2.getInventories().get(0));\n e3.addInventory(ch2.getInventories().get(1));\n e4.addInventory(ch3.getInventories().get(0));\n //ch1.getInventory().addEquipmentAndQty(equipment, 1);\n try {\n em.getTransaction().begin();\n Role playerRole = new Role(\"player\");\n Role DMRole = new Role(\"dungeonmaster\");\n player1.addRole(playerRole);\n DM.addRole(DMRole);\n player2.addRole(playerRole);\n //both.addRole(DMRole); // MAN KAN GODT HAVE BEGGE ROLLER CATHRINE !!!\n em.persist(playerRole);\n em.persist(DMRole);\n //em.persist(equipment);\n player1.addCharacter(ch1);\n player1.addCharacter(ch2);\n player2.addCharacter(ch3);\n //em.persist(ch1);\n em.persist(player1);\n em.persist(DM);\n em.persist(player2);\n em.getTransaction().commit();\n System.out.println(\"\");\n } finally {\n em.close();\n }\n }", "Fish findFish(){\r\n\t\t//step through GameCollection using iterator to find first instance of a fish\r\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Fish)return (Fish)g;\r\n\t\t}\r\n\treturn nullFish;\r\n\t}", "private DataRelationModelEntity readEntityForcely(UserDto userDto, String drmId) throws LogicException {\n\t\tDataRelationModelEntity entity = entityOperator.selectByPk(ENTITY_CLASS, drmId);\n\t\tif (entity == null) {\n\t\t\tthrow new LogicException(String.format(\"Data not found.: (drmId,)=(%s,)\", drmId), Status.NOT_FOUND.getStatusCode());\t\n\t\t}\n\t\treturn entity;\n\t}", "@Override\n public InputSource resolveEntity (final String _publicId,\n final String _systemId)\n throws IOException, SAXException\n {\n return new InputSource(new StringReader(\"\"));\n }", "public void identificarPersona() {\n try {\n //Obtiene todas las huellas de la bd\n ResultSet rsIdentificar = identificarhue.executeQuery();\n \n //Si se encuentra la huella en la base de datos\n while(rsIdentificar.next()){\n //Lee la plantilla de la base de datos\n byte templateBuffer[] = rsIdentificar.getBytes(\"huellap\");\n //Crea una nueva plantilla\n Template referenceTemplate = new Template(templateBuffer);\n \n //compara las plantilas (actual vs bd)\n boolean coinciden = fingerprintSDK.verify(template,referenceTemplate);\n \n //Si encuentra coincidencia entonces envia true y si no entonces envia false\n if (coinciden){ \n objpantprincipal.coincidehuella(true);\n return;\n }\n else{\n objpantprincipal.coincidehuella(false);\n }\n } \n \n } catch (SQLException e) { \n initDB();\n identificarPersona();\n } catch (GrFingerJavaException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "private Ente gestioneEnte() {\n\t\tList<Ente> enti = enteDad.getEntiByCodiceAndCodiceSistemaEsterno(req.getCodiceEnte(), SistemaEsterno.FEL);\n\t\tif(enti == null || enti.isEmpty()) {\n\t\t\tthrow new UnmappedEnteException(ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Ente\", \"codice \" + req.getCodiceEnte()));\n\t\t}\n\t\t// Dovrebbe essercene solo uno. Per sicurezza prendo solo il primo\n\t\treturn enti.get(0);\n\t}", "@Override\n public BatchDetectEntitiesResult batchDetectEntities(BatchDetectEntitiesRequest request) {\n request = beforeClientExecution(request);\n return executeBatchDetectEntities(request);\n }", "private void catch_up(int regency) {\n\n logger.debug(\"Verifying STOPDATA info\");\n ObjectOutputStream out = null;\n ByteArrayOutputStream bos = null;\n\n CertifiedDecision lastHighestCID = lcManager.getHighestLastCID(regency);\n\n int currentCID = lastHighestCID.getCID() + 1;\n HashSet<SignedObject> signedCollects = null;\n byte[] propose = null;\n int batchSize = -1;\n\n // normalize the collects and apply to them the predicate \"sound\"\n if (lcManager.sound(lcManager.selectCollects(regency, currentCID))) {\n\n logger.debug(\"Sound predicate is true\");\n\n signedCollects = lcManager.getCollects(regency); // all original collects that the replica has received\n\n Decision dec = new Decision(-1); // the only purpose of this object is to obtain the batchsize,\n // using code inside of createPropose()\n\n propose = tom.createPropose(dec);\n batchSize = dec.batchSize;\n \n try { // serialization of the CATCH-UP message\n bos = new ByteArrayOutputStream();\n out = new ObjectOutputStream(bos);\n\n out.writeObject(lastHighestCID);\n\n\t\t//TODO: Missing: serialization of the proof?\n out.writeObject(signedCollects);\n out.writeObject(propose);\n out.writeInt(batchSize);\n\n out.flush();\n bos.flush();\n\n byte[] payload = bos.toByteArray();\n out.close();\n bos.close();\n\n logger.info(\"Sending SYNC message for regency \" + regency);\n\n // send the CATCH-UP message\n communication.send(this.controller.getCurrentViewOtherAcceptors(),\n new LCMessage(this.controller.getStaticConf().getProcessId(), TOMUtil.SYNC, regency, payload));\n\n finalise(regency, lastHighestCID, signedCollects, propose, batchSize, true);\n\n } catch (IOException ex) {\n logger.error(\"Could not serialize message\", ex);\n }\n }\n }", "void tryToFindNextKing()\n {\n if (nodeIds.size() != 0)\n {\n int nextKingId = Collections.max(nodeIds);\n CommunicationLink nextKing = allNodes.get(nextKingId);\n nextKing.sendMessage(new Message(\n Integer.toString(nextKingId), nextKing.getInfo(), myInfo, KING_IS_DEAD));\n }\n }", "public void performRecovery();", "private Type stealResource() {\n \t\tint count = getResourceCount();\n \t\tif (count <= 0)\n \t\t\treturn null;\n \n \t\t// pick random card\n \t\tint select = (int) (Math.random() * count);\n \t\tfor (int i = 0; i < resources.length; i++) {\n \t\t\tif (select < resources[i]) {\n \t\t\t\tuseResources(Type.values()[i], 1);\n \t\t\t\treturn Type.values()[i];\n \t\t\t}\n \n \t\t\tselect -= resources[i];\n \t\t}\n \n \t\treturn null;\n \t}", "@Override\n\tpublic List<CcNoticereceive> find() {\n\t\treturn null;\n\t}", "private List<EntityId> getEntityIdsFromKijiRestEntityIds(\n List<KijiRestEntityId> kijiRestEntityIds,\n KijiTableLayout layout)\n throws IOException {\n Set<EntityId> entityIds = Sets.newHashSet();\n\n for (KijiRestEntityId kijiRestEntityId : kijiRestEntityIds) {\n EntityId eid = kijiRestEntityId.resolve(layout);\n if (!entityIds.contains(eid)) {\n entityIds.add(eid);\n }\n }\n\n return Lists.newArrayList(entityIds);\n }", "abstract BookieId maybeSendSpeculativeRead(BitSet heardFromHostsBitSet);", "public void infect() {\n\n if (random.getRandom() <= getProbability()) {\n isInfected = true;\n isInfectedOnThisStep = true;\n }\n }", "protected List cacheLoadOrStore(List<Object> loadedObjects) {\n if (loadedObjects.isEmpty()) {\n return loadedObjects;\n }\n if (!(loadedObjects.get(0) instanceof Entity)) {\n return loadedObjects;\n }\n\n List<Entity> filteredObjects = new ArrayList<>(loadedObjects.size());\n for (Object loadedObject : loadedObjects) {\n Entity cachedEntity = cacheLoadOrStore((Entity) loadedObject);\n filteredObjects.add(cachedEntity);\n }\n return filteredObjects;\n }", "public void corrupt_all() {\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i]!=null) {\n\t\t\t\tcorrupt(i);\n\t\t\t}\n\t\t}\n\t}", "private void lastResortFindPeer() {\n\t\tDecentLogger.write(\"Resolving peers from DNS (last resort)\");\n\t\tfor(String seed: DNS_SEEDS) {\n\t\t\tArrayList<InetAddress> hosts = DNSResolver.getARecords(seed);\n\t\t\tif(hosts != null) {\n\t\t\t\tcheckList(hosts);\n\t\t\t}\n\t\t}\n\t}", "GameObject findSeaweed(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Seaweed)return g;\r\n\t\t}\r\n\treturn nullSeaweed;\r\n\t}", "public void load() {\n listPedidosAssistencia.clear();\n\n for (Object object : super.storageLoad()) {\n char type = ((String) object).charAt(0);\n\n if (type == n501070324_PedidoSuporteFormacao.COD_TIPO) {\n n501070324_PedidoSuporteFormacao psf = new n501070324_PedidoSuporteFormacao();\n\n psf.parse(object);\n add(psf);\n }\n\n if (type == n501070324_PedidoSuporteSistema.COD_TIPO) {\n n501070324_PedidoSuporteSistema pss = new n501070324_PedidoSuporteSistema();\n\n pss.parse(object);\n add(pss);\n }\n }\n }", "Alimento loadAlimentoById(Long id) throws EntityNotFoundException;", "public static CraftEntity getEntity(CraftServer server, Entity entity) {\n/* 199 */ if (entity instanceof EntityLiving)\n/* */ \n/* 201 */ { if (entity instanceof EntityHuman) {\n/* 202 */ if (entity instanceof EntityPlayer) return new CraftPlayer(server, (EntityPlayer)entity); \n/* 203 */ return new CraftHumanEntity(server, (EntityHuman)entity);\n/* */ } \n/* */ \n/* 206 */ if (entity instanceof EntityWaterAnimal) {\n/* 207 */ if (entity instanceof EntitySquid) return new CraftSquid(server, (EntitySquid)entity); \n/* 208 */ if (entity instanceof EntityFish) {\n/* 209 */ if (entity instanceof EntityCod) return new CraftCod(server, (EntityCod)entity); \n/* 210 */ if (entity instanceof EntityPufferFish) return new CraftPufferFish(server, (EntityPufferFish)entity); \n/* 211 */ if (entity instanceof EntitySalmon) return new CraftSalmon(server, (EntitySalmon)entity); \n/* 212 */ if (entity instanceof EntityTropicalFish) return new CraftTropicalFish(server, (EntityTropicalFish)entity); \n/* 213 */ return new CraftFish(server, (EntityFish)entity);\n/* */ } \n/* 215 */ if (entity instanceof EntityDolphin) return new CraftDolphin(server, (EntityDolphin)entity); \n/* 216 */ return new CraftWaterMob(server, (EntityWaterAnimal)entity);\n/* */ } \n/* 218 */ if (entity instanceof EntityCreature)\n/* */ \n/* 220 */ { if (entity instanceof EntityAnimal)\n/* 221 */ { if (entity instanceof EntityChicken) return new CraftChicken(server, (EntityChicken)entity); \n/* 222 */ if (entity instanceof EntityCow) {\n/* 223 */ if (entity instanceof EntityMushroomCow) return new CraftMushroomCow(server, (EntityMushroomCow)entity); \n/* 224 */ return new CraftCow(server, (EntityCow)entity);\n/* */ } \n/* 226 */ if (entity instanceof EntityPig) return new CraftPig(server, (EntityPig)entity); \n/* 227 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityTameableAnimal) {\n/* 228 */ if (entity instanceof EntityWolf) return new CraftWolf(server, (EntityWolf)entity); \n/* 229 */ if (entity instanceof EntityCat) return new CraftCat(server, (EntityCat)entity); \n/* 230 */ if (entity instanceof EntityParrot) return new CraftParrot(server, (EntityParrot)entity); \n/* */ } else {\n/* 232 */ if (entity instanceof EntitySheep) return new CraftSheep(server, (EntitySheep)entity); \n/* 233 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseAbstract)\n/* 234 */ { if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseChestedAbstract)\n/* 235 */ { if (entity instanceof EntityHorseDonkey) return new CraftDonkey(server, (EntityHorseDonkey)entity); \n/* 236 */ if (entity instanceof EntityHorseMule) return new CraftMule(server, (EntityHorseMule)entity); \n/* 237 */ if (entity instanceof EntityLlamaTrader) return new CraftTraderLlama(server, (EntityLlamaTrader)entity); \n/* 238 */ if (entity instanceof EntityLlama) return new CraftLlama(server, (EntityLlama)entity); }\n/* 239 */ else { if (entity instanceof EntityHorse) return new CraftHorse(server, (EntityHorse)entity); \n/* 240 */ if (entity instanceof EntityHorseSkeleton) return new CraftSkeletonHorse(server, (EntityHorseSkeleton)entity); \n/* 241 */ if (entity instanceof EntityHorseZombie) return new CraftZombieHorse(server, (EntityHorseZombie)entity); }\n/* */ }\n/* 243 */ else { if (entity instanceof EntityRabbit) return new CraftRabbit(server, (EntityRabbit)entity); \n/* 244 */ if (entity instanceof EntityPolarBear) return new CraftPolarBear(server, (EntityPolarBear)entity); \n/* 245 */ if (entity instanceof EntityTurtle) return new CraftTurtle(server, (EntityTurtle)entity); \n/* 246 */ if (entity instanceof EntityOcelot) return new CraftOcelot(server, (EntityOcelot)entity); \n/* 247 */ if (entity instanceof EntityPanda) return new CraftPanda(server, (EntityPanda)entity); \n/* 248 */ if (entity instanceof EntityFox) return new CraftFox(server, (EntityFox)entity); \n/* 249 */ if (entity instanceof EntityBee) return new CraftBee(server, (EntityBee)entity); \n/* 250 */ if (entity instanceof EntityHoglin) return new CraftHoglin(server, (EntityHoglin)entity); \n/* 251 */ if (entity instanceof EntityStrider) return new CraftStrider(server, (EntityStrider)entity); \n/* 252 */ return new CraftAnimals(server, (EntityAnimal)entity); }\n/* */ \n/* */ } }\n/* 255 */ else { if (entity instanceof EntityMonster) {\n/* 256 */ if (entity instanceof EntityZombie) {\n/* 257 */ if (entity instanceof EntityPigZombie) return new CraftPigZombie(server, (EntityPigZombie)entity); \n/* 258 */ if (entity instanceof EntityZombieHusk) return new CraftHusk(server, (EntityZombieHusk)entity); \n/* 259 */ if (entity instanceof EntityZombieVillager) return new CraftVillagerZombie(server, (EntityZombieVillager)entity); \n/* 260 */ if (entity instanceof EntityDrowned) return new CraftDrowned(server, (EntityDrowned)entity); \n/* 261 */ return new CraftZombie(server, (EntityZombie)entity);\n/* */ } \n/* 263 */ if (entity instanceof EntityCreeper) return new CraftCreeper(server, (EntityCreeper)entity); \n/* 264 */ if (entity instanceof EntityEnderman) return new CraftEnderman(server, (EntityEnderman)entity); \n/* 265 */ if (entity instanceof EntitySilverfish) return new CraftSilverfish(server, (EntitySilverfish)entity); \n/* 266 */ if (entity instanceof EntityGiantZombie) return new CraftGiant(server, (EntityGiantZombie)entity); \n/* 267 */ if (entity instanceof EntitySkeletonAbstract) {\n/* 268 */ if (entity instanceof EntitySkeletonStray) return new CraftStray(server, (EntitySkeletonStray)entity); \n/* 269 */ if (entity instanceof EntitySkeletonWither) return new CraftWitherSkeleton(server, (EntitySkeletonWither)entity); \n/* 270 */ return new CraftSkeleton(server, (EntitySkeletonAbstract)entity);\n/* */ } \n/* 272 */ if (entity instanceof EntityBlaze) return new CraftBlaze(server, (EntityBlaze)entity); \n/* 273 */ if (entity instanceof EntityWitch) return new CraftWitch(server, (EntityWitch)entity); \n/* 274 */ if (entity instanceof EntityWither) return new CraftWither(server, (EntityWither)entity); \n/* 275 */ if (entity instanceof EntitySpider) {\n/* 276 */ if (entity instanceof EntityCaveSpider) return new CraftCaveSpider(server, (EntityCaveSpider)entity); \n/* 277 */ return new CraftSpider(server, (EntitySpider)entity);\n/* */ } \n/* 279 */ if (entity instanceof EntityEndermite) return new CraftEndermite(server, (EntityEndermite)entity); \n/* 280 */ if (entity instanceof EntityGuardian) {\n/* 281 */ if (entity instanceof EntityGuardianElder) return new CraftElderGuardian(server, (EntityGuardianElder)entity); \n/* 282 */ return new CraftGuardian(server, (EntityGuardian)entity);\n/* */ } \n/* 284 */ if (entity instanceof EntityVex) return new CraftVex(server, (EntityVex)entity); \n/* 285 */ if (entity instanceof EntityIllagerAbstract) {\n/* 286 */ if (entity instanceof EntityIllagerWizard) {\n/* 287 */ if (entity instanceof EntityEvoker) return new CraftEvoker(server, (EntityEvoker)entity); \n/* 288 */ if (entity instanceof EntityIllagerIllusioner) return new CraftIllusioner(server, (EntityIllagerIllusioner)entity); \n/* 289 */ return new CraftSpellcaster(server, (EntityIllagerWizard)entity);\n/* */ } \n/* 291 */ if (entity instanceof EntityVindicator) return new CraftVindicator(server, (EntityVindicator)entity); \n/* 292 */ if (entity instanceof EntityPillager) return new CraftPillager(server, (EntityPillager)entity); \n/* 293 */ return new CraftIllager(server, (EntityIllagerAbstract)entity);\n/* */ } \n/* 295 */ if (entity instanceof EntityRavager) return new CraftRavager(server, (EntityRavager)entity); \n/* 296 */ if (entity instanceof EntityPiglinAbstract) {\n/* 297 */ if (entity instanceof EntityPiglin) return new CraftPiglin(server, (EntityPiglin)entity); \n/* 298 */ if (entity instanceof EntityPiglinBrute) return new CraftPiglinBrute(server, (EntityPiglinBrute)entity); \n/* 299 */ return new CraftPiglinAbstract(server, (EntityPiglinAbstract)entity);\n/* */ } \n/* 301 */ if (entity instanceof EntityZoglin) return new CraftZoglin(server, (EntityZoglin)entity);\n/* */ \n/* 303 */ return new CraftMonster(server, (EntityMonster)entity);\n/* */ } \n/* 305 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityGolem) {\n/* 306 */ if (entity instanceof EntitySnowman) return new CraftSnowman(server, (EntitySnowman)entity); \n/* 307 */ if (entity instanceof EntityIronGolem) return new CraftIronGolem(server, (EntityIronGolem)entity); \n/* 308 */ if (entity instanceof EntityShulker) return new CraftShulker(server, (EntityShulker)entity); \n/* */ } else {\n/* 310 */ if (entity instanceof EntityVillagerAbstract) {\n/* 311 */ if (entity instanceof EntityVillager) return new CraftVillager(server, (EntityVillager)entity); \n/* 312 */ if (entity instanceof EntityVillagerTrader) return new CraftWanderingTrader(server, (EntityVillagerTrader)entity); \n/* 313 */ return new CraftAbstractVillager(server, (EntityVillagerAbstract)entity);\n/* */ } \n/* 315 */ return new CraftCreature(server, (EntityCreature)entity);\n/* */ } }\n/* */ }\n/* 318 */ else { if (entity instanceof EntitySlime) {\n/* 319 */ if (entity instanceof EntityMagmaCube) return new CraftMagmaCube(server, (EntityMagmaCube)entity); \n/* 320 */ return new CraftSlime(server, (EntitySlime)entity);\n/* */ } \n/* */ \n/* 323 */ if (entity instanceof EntityFlying) {\n/* 324 */ if (entity instanceof EntityGhast) return new CraftGhast(server, (EntityGhast)entity); \n/* 325 */ if (entity instanceof EntityPhantom) return new CraftPhantom(server, (EntityPhantom)entity); \n/* 326 */ return new CraftFlying(server, (EntityFlying)entity);\n/* */ } \n/* 328 */ if (entity instanceof EntityEnderDragon) {\n/* 329 */ return new CraftEnderDragon(server, (EntityEnderDragon)entity);\n/* */ }\n/* */ \n/* 332 */ if (entity instanceof EntityAmbient) {\n/* 333 */ if (entity instanceof EntityBat) return new CraftBat(server, (EntityBat)entity); \n/* 334 */ return new CraftAmbient(server, (EntityAmbient)entity);\n/* */ } \n/* 336 */ if (entity instanceof EntityArmorStand) return new CraftArmorStand(server, (EntityArmorStand)entity); \n/* 337 */ return new CraftLivingEntity(server, (EntityLiving)entity); }\n/* */ }\n/* 339 */ else { if (entity instanceof EntityComplexPart) {\n/* 340 */ EntityComplexPart part = (EntityComplexPart)entity;\n/* 341 */ if (part.owner instanceof EntityEnderDragon) return new CraftEnderDragonPart(server, (EntityComplexPart)entity); \n/* 342 */ return new CraftComplexPart(server, (EntityComplexPart)entity);\n/* */ } \n/* 344 */ if (entity instanceof EntityExperienceOrb) return new CraftExperienceOrb(server, (EntityExperienceOrb)entity); \n/* 345 */ if (entity instanceof EntityTippedArrow) return new CraftTippedArrow(server, (EntityTippedArrow)entity); \n/* 346 */ if (entity instanceof EntitySpectralArrow) return new CraftSpectralArrow(server, (EntitySpectralArrow)entity); \n/* 347 */ if (entity instanceof EntityArrow) {\n/* 348 */ if (entity instanceof EntityThrownTrident) return new CraftTrident(server, (EntityThrownTrident)entity); \n/* 349 */ return new CraftArrow(server, (EntityArrow)entity);\n/* */ } \n/* 351 */ if (entity instanceof EntityBoat) return new CraftBoat(server, (EntityBoat)entity); \n/* 352 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityProjectile) {\n/* 353 */ if (entity instanceof EntityEgg) return new CraftEgg(server, (EntityEgg)entity); \n/* 354 */ if (entity instanceof EntitySnowball) return new CraftSnowball(server, (EntitySnowball)entity); \n/* 355 */ if (entity instanceof EntityPotion) return new CraftThrownPotion(server, (EntityPotion)entity); \n/* 356 */ if (entity instanceof EntityEnderPearl) return new CraftEnderPearl(server, (EntityEnderPearl)entity); \n/* 357 */ if (entity instanceof EntityThrownExpBottle) return new CraftThrownExpBottle(server, (EntityThrownExpBottle)entity); \n/* */ } else {\n/* 359 */ if (entity instanceof EntityFallingBlock) return new CraftFallingBlock(server, (EntityFallingBlock)entity); \n/* 360 */ if (entity instanceof EntityFireball) {\n/* 361 */ if (entity instanceof EntitySmallFireball) return new CraftSmallFireball(server, (EntitySmallFireball)entity); \n/* 362 */ if (entity instanceof EntityLargeFireball) return new CraftLargeFireball(server, (EntityLargeFireball)entity); \n/* 363 */ if (entity instanceof EntityWitherSkull) return new CraftWitherSkull(server, (EntityWitherSkull)entity); \n/* 364 */ if (entity instanceof EntityDragonFireball) return new CraftDragonFireball(server, (EntityDragonFireball)entity); \n/* 365 */ return new CraftFireball(server, (EntityFireball)entity);\n/* */ } \n/* 367 */ if (entity instanceof EntityEnderSignal) return new CraftEnderSignal(server, (EntityEnderSignal)entity); \n/* 368 */ if (entity instanceof EntityEnderCrystal) return new CraftEnderCrystal(server, (EntityEnderCrystal)entity); \n/* 369 */ if (entity instanceof EntityFishingHook) return new CraftFishHook(server, (EntityFishingHook)entity); \n/* 370 */ if (entity instanceof EntityItem) return new CraftItem(server, (EntityItem)entity); \n/* 371 */ if (entity instanceof EntityLightning) return new CraftLightningStrike(server, (EntityLightning)entity); \n/* 372 */ if (entity instanceof EntityMinecartAbstract)\n/* 373 */ { if (entity instanceof EntityMinecartFurnace) return new CraftMinecartFurnace(server, (EntityMinecartFurnace)entity); \n/* 374 */ if (entity instanceof EntityMinecartChest) return new CraftMinecartChest(server, (EntityMinecartChest)entity); \n/* 375 */ if (entity instanceof EntityMinecartTNT) return new CraftMinecartTNT(server, (EntityMinecartTNT)entity); \n/* 376 */ if (entity instanceof EntityMinecartHopper) return new CraftMinecartHopper(server, (EntityMinecartHopper)entity); \n/* 377 */ if (entity instanceof EntityMinecartMobSpawner) return new CraftMinecartMobSpawner(server, (EntityMinecartMobSpawner)entity); \n/* 378 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityMinecartRideable) return new CraftMinecartRideable(server, (EntityMinecartAbstract)entity); \n/* 379 */ if (entity instanceof EntityMinecartCommandBlock) return new CraftMinecartCommand(server, (EntityMinecartCommandBlock)entity); }\n/* 380 */ else { if (entity instanceof EntityHanging) {\n/* 381 */ if (entity instanceof EntityPainting) return new CraftPainting(server, (EntityPainting)entity); \n/* 382 */ if (entity instanceof EntityItemFrame) return new CraftItemFrame(server, (EntityItemFrame)entity); \n/* 383 */ if (entity instanceof EntityLeash) return new CraftLeash(server, (EntityLeash)entity); \n/* 384 */ return new CraftHanging(server, (EntityHanging)entity);\n/* */ } \n/* 386 */ if (entity instanceof EntityTNTPrimed) return new CraftTNTPrimed(server, (EntityTNTPrimed)entity); \n/* 387 */ if (entity instanceof EntityFireworks) return new CraftFirework(server, (EntityFireworks)entity); \n/* 388 */ if (entity instanceof EntityShulkerBullet) return new CraftShulkerBullet(server, (EntityShulkerBullet)entity); \n/* 389 */ if (entity instanceof EntityAreaEffectCloud) return new CraftAreaEffectCloud(server, (EntityAreaEffectCloud)entity); \n/* 390 */ if (entity instanceof EntityEvokerFangs) return new CraftEvokerFangs(server, (EntityEvokerFangs)entity); \n/* 391 */ if (entity instanceof EntityLlamaSpit) return new CraftLlamaSpit(server, (EntityLlamaSpit)entity); }\n/* */ \n/* */ } }\n/* 394 */ throw new AssertionError(\"Unknown entity \" + ((entity == null) ? null : entity.getClass()));\n/* */ }", "public void loadEntities (File entitiesFile){\n BufferedReader br = null;\n int lineNum = 0;\n try {\n String term;\n br = new BufferedReader(new FileReader(entitiesFile));\n String line = \"\";\n while ((line = (br.readLine())) != null) {\n lineNum++;\n if (!line.contains(\"--noEntities--\")) {\n String docId = line.substring(0, line.indexOf(\":\"));\n String [] entitiesStr = line.split(\"; \");\n if (entitiesStr.length > 0){\n entitiesStr[0] = entitiesStr[0].substring(line.indexOf(\":\") + 2);\n }\n HashMap <String, Integer> entitiesInfo = new HashMap<>();\n for (int i = 0; i < entitiesStr.length ; i++){\n String [] entitiesRankStr = entitiesStr[i].split(\" - \");\n if (entitiesRankStr.length < 2){\n System.out.println(lineNum + \" \" + entitiesRankStr[0]);\n }\n entitiesInfo.put(entitiesRankStr[0], Integer.parseInt(entitiesRankStr[1]));\n }\n entities.put(docId, entitiesInfo);\n }\n }\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void RedEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n RedPlayer player_to_eat = (RedPlayer) player;\n player_to_be_eaten = checkIfEatsBluePlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsGreenPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsYellowPlayer(player_to_eat);\n }\n }\n\n //player_to_be_eaten.println(\"red_player_to_be_eaten\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }", "protected void readEntityFromNBT(NBTTagCompound paramfn)\r\n/* 132: */ {\r\n/* 133:155 */ super.readEntityFromNBT(paramfn);\r\n/* 134: */ \r\n/* 135:157 */ fv localfv = paramfn.c(\"Items\", 10);\r\n/* 136:158 */ this.a = new ItemStack[getSize()];\r\n/* 137:159 */ for (int i = 0; i < localfv.c(); i++)\r\n/* 138: */ {\r\n/* 139:160 */ NBTTagCompound localfn = localfv.b(i);\r\n/* 140:161 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 141:162 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 142:163 */ this.a[j] = ItemStack.loadItemStackFromNBT(localfn);\r\n/* 143: */ }\r\n/* 144: */ }\r\n/* 145: */ }", "protected Entity findPlayerToAttack() {\n/* 339 */ double var1 = 8.0D;\n/* 340 */ return getIsSummoned() ? null : this.field_70170_p.func_72890_a(this, var1);\n/* */ }", "private List<Entity> processEntities(List<Mapping> mappings, Map record) throws Exception{\n\n\t\tList<Entity> builtEnts = new ArrayList<Entity>();\n\t\t\n\t\tList<Entity> entities = buildEntities();\n\t\t\n\t\tboolean isOmitted = isOmitted(record);\n\t\t\n\t\t/*\n\t\tfor(String omkeyfull: OMISSIONS_MAP.keySet()) {\n\t\t\t\n\t\t\tString[] omkeys = omkeyfull.split(\":\");\n\t\t\t\n\t\t\tisOmitted = iterateOmkeys(Arrays.asList(omkeys), record);\n\t\t\t\n\t\t}\n*/\t\t\n\t\t\n\t\tif(!isOmitted){\n\t\t\t\n\t\t\tfor(Mapping mapping: mappings){\n\t\t\t\tList<Object> relationalValue = new ArrayList<Object>();\n\n\t\t\t\tif(!IS_DIR) {\n\t\t\t\t\t\n\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\tarray[0] = mapping.getKey().split(\":\")[0] + \":\" + RELATIONAL_KEY;\n\t\t\t\t\trelationalValue = findValueByKey(record,array);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\tarray[0] = mapping.getKey().split(\":\")[0] + \":\" + RELATIONAL_KEY;\n\t\t\t\t\trelationalValue = findValueByKey(record,array);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tDataType dt = DataType.initDataType(StringUtils.capitalize(mapping.getDataType()));\n\t\t\t\t\n\t\t\t\tif(!mapping.getDataType().equalsIgnoreCase(\"OMIT\")){\n\t\t\t\t\tList<Object> values = new ArrayList<Object>();\n\t\t\t\t\t\n\t\t\t\t\tif(!IS_DIR) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\t\tarray[0] = mapping.getKey();\n\t\t\t\t\t\tvalues = findValueByKey2(record,new ArrayList(Arrays.asList(array)));\n\t\t\t\t\t\t//values = findValueByKey2(record, new ArrayList(Arrays.asList(mapping.getKey().split(\":\"))));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tString[] array = new String[mapping.getKey().split(\":\").length - 1];\n\t\t\t\t\t\tarray[0] = mapping.getKey();\n\t\t\t\t\t\tvalues = findValueByKey2(record,new ArrayList(Arrays.asList(array)));\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\tMap<String,String> options = mapping.buildOptions(mapping);\n\t\t\t\t\t\n\t\t\t\t\tif(!options.isEmpty()) {\n\t\t\t\t\t\tif(options.containsKey(\"TYPE\")) {\n\t\t\t\t\t\t\tString type = options.get(\"TYPE\");\n\t\t\t\t\t\t\tif(type.equalsIgnoreCase(\"datediffin\")) {\n\n\t\t\t\t\t\t\t\tString dateDiffFrom = options.containsKey(\"DIFFFROM\") ? options.get(\"DIFFFROM\").replaceAll(\"-\",\":\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString mask = options.containsKey(\"MASK\") ? options.get(\"MASK\"): null;\n\n\t\t\t\t\t\t\t\tString diffIn = options.containsKey(\"DIFFIN\") ? options.get(\"DIFFIN\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate startDateInclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate endDateExclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(dateDiffFrom.equalsIgnoreCase(\"sysdate\")) {\n\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.now();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tObject fromO = \n\t\t\t\t\t\t\t\t\t\t\tfindValueByKey(new LinkedHashMap(record), dateDiffFrom.split(\":\")).get(0);\n\n\t\t\t\t\t\t\t\t\tif(mask != null) {\n\t\t\t\t\t\t\t\t\t\tif(fromO != null) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tString from = fromO.toString();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.parse(from, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else throw new Exception(\"No mask given\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor(int x = 0; x < values.size(); x++) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString value = values.get(0).toString();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tendDateExclusive = value.isEmpty() ? null: LocalDate.parse(value, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(endDateExclusive != null) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tPeriod period = Period.between(endDateExclusive, startDateInclusive );\n\n\t\t\t\t\t\t\t\t\t\tvalues.remove(x);\n\t\t\t\t\t\t\t\t\t\tif(diffIn.equalsIgnoreCase(\"years\")) {\n\t\t\t\t\t\t\t\t\t\t\tvalues.add(x, period.getYears());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(type.equalsIgnoreCase(\"datedifffrom\")) {\n\t\t\t\t\t\t\t\tString dateDiffFrom = options.containsKey(\"DIFFFROM\") ? options.get(\"DIFFFROM\").replaceAll(\"-\",\":\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString mask = options.containsKey(\"MASK\") ? options.get(\"MASK\"): null;\n\n\t\t\t\t\t\t\t\tString diffIn = options.containsKey(\"DIFFIN\") ? options.get(\"DIFFIN\"): null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate startDateInclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLocalDate endDateExclusive = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(dateDiffFrom.equalsIgnoreCase(\"sysdate\")) {\n\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.now();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tObject fromO = \n\t\t\t\t\t\t\t\t\t\t\tfindValueByKey(new LinkedHashMap(record), dateDiffFrom.split(\":\")).get(0);\n\n\t\t\t\t\t\t\t\t\tif(mask != null) {\n\t\t\t\t\t\t\t\t\t\tif(fromO != null) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tString from = fromO.toString();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tstartDateInclusive = LocalDate.parse(from, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else throw new Exception(\"No mask given\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor(int x = 0; x < values.size(); x++) {\n\t\t\t\t\t\t\t\t\tif(values.get(0) != null) {\n\t\t\t\t\t\t\t\t\t\tString value = values.get(0).toString();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tendDateExclusive = value.isEmpty() ? null: LocalDate.parse(value, DateTimeFormatter.ofPattern(mask) );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(endDateExclusive != null) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tPeriod period = Period.between(startDateInclusive, endDateExclusive);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvalues.remove(x);\n\t\t\t\t\t\t\t\t\t\t\tif(diffIn.equalsIgnoreCase(\"years\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tvalues.add(x, period.getYears());\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\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}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString mappingK = mapping.getKey().split(\":\")[0];\n\t\t\t\t\tString recordK = record.keySet().iterator().next().toString().split(\":\")[0];\n\t\t\t\t\tif(mappingK.equals(recordK)) {\n\t\t\t\t\t\tif(values == null) throw new Exception(\"Following Mapping does not exist in the datafile: \\n\"\n\t\t\t\t\t\t\t\t+ mapping.toCSV() + \"\\n\" +\n\t\t\t\t\t\t\t\t\" be sure that the column and file exist.\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(relationalValue == null) throw new Exception(\"Following Mapping does not exist in the datafile: \\n\"\n\t\t\t\t\t\t\t\t+ mapping.toCSV() + \"\\n\" +\n\t\t\t\t\t\t\t\t\" be sure that the column and file exist.\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tSet<Entity> newEnts = new HashSet<Entity>();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(values.isEmpty()) {\n\t\t\t\t\t\t\tif(INCLUDE_EMPTY_VALUES == true) {\n\t\t\t\t\t\t\t\tnewEnts = dt.generateTables(mapping, entities, values, relationalValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewEnts = dt.generateTables(mapping, entities, values, relationalValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(newEnts != null && newEnts.size() > 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tbuiltEnts.addAll(newEnts);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn builtEnts;\t\t\n\t}", "@Override\n synchronized BookieId maybeSendSpeculativeRead(BitSet heardFrom) {\n if (nextReplicaIndexToReadFrom >= getLedgerMetadata().getWriteQuorumSize()) {\n return null;\n }\n\n BitSet sentTo = getSentToBitSet();\n sentTo.and(heardFrom);\n\n // only send another read if we have had no successful response at all\n // (even for other entries) from any of the other bookies we have sent the\n // request to\n if (sentTo.cardinality() == 0) {\n clientCtx.getClientStats().getSpeculativeReadCounter().inc();\n return sendNextRead();\n } else {\n return null;\n }\n }", "private void refillMap()\n {\n List<Block> blocks = map.getAllBlocks();\n blocks.forEach(block ->\n {\n if(block.isSpawnPoint())\n {\n while(!block.isAllWeaponsPresent() && !weaponCardDeck.isEmpty())\n {\n block.addWeaponCard(weaponCardDeck.getFirstCard());\n }\n }\n else\n {\n if(!block.isAmmoCardPresent())block.setAmmoCard(ammoCardDeck.getFirstCard());\n }\n });\n }", "@Override\n public void detectAndSendChanges()\n {\n super.detectAndSendChanges();\n TileEntitySmeltingFurnace.Result result = te.getResult(inventoryPlayer.player.getUniqueID());\n if(this.progress != result.progress)\n {\n this.progress = result.progress;\n for (Object crafter : this.crafters)\n {\n ((ICrafting) crafter).sendProgressBarUpdate(this, 0, this.progress);\n }\n }\n if(result.recipe != this.recipe)\n {\n this.recipe = result.recipe;\n if(result.recipe != null)\n {\n this.time = result.recipe.getTime();\n for (Object crafter : this.crafters)\n {\n if (crafter instanceof EntityPlayerMP)\n {\n ((EntityPlayerMP) crafter).isChangingQuantityOnly = false;\n }\n ((ICrafting) crafter).sendProgressBarUpdate(this, 1, this.time);\n ((ICrafting) crafter).sendSlotContents(this, inventorySlots.size(), recipe.getResult());\n }\n }\n else\n {\n for (Object crafter : this.crafters)\n {\n if (crafter instanceof EntityPlayerMP)\n {\n ((EntityPlayerMP) crafter).isChangingQuantityOnly = false;\n }\n ((ICrafting) crafter).sendSlotContents(this, inventorySlots.size(), null);\n }\n }\n }\n }", "default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }", "protected void readEntityFromNBT(NBTTagCompound var1)\n {\n this.fuse = var1.getByte(\"Fuse\");\n }", "public static void localVotouEleitor() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tRegistoVoto ans = null;\n\t\tString cc, idEleicao;\n\t\tSystem.out.println(\"Insira o CC do eleitor que pretende pesquisar: \");\n\t\tcc = sc.nextLine();\n\t\tSystem.out.println(\"Insira o ID da eleicao que pretende pesquisar: \");\n\t\tidEleicao = sc.nextLine();\n\t\t\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tans = rmiserver.pesquisaLocalVoto(cc, idEleicao);\n\t\t\t\tif(ans != null) {\n\t\t\t\t\tSystem.out.println(\"\\nCC: \"+ans.cc+\"\\nID Eleicao: \"+idEleicao+\"\\nLocal: \"+ans.nomeDep+\"Data/Hora: \"+ans.dataVoto.toString());\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Voto nao encontrado.\");\n\t\t\t\t}\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\n\t}", "private void initializeEntities() {\n arrAttack = new ArrayList<>();\n arrCollidable = new ArrayList<>();\n entities = new ArrayList<>();\n\n arrAttack = scene.entityManager.getEntitiesWithComponents(attackComponent.getClass(), tool.getClass());\n\n arrCollidable = scene.entityManager.getEntitiesWithComponents(collidable.getClass(), Playable.class);\n\n for (int i = 0; i < arrAttack.size(); i++) {\n\n tool = scene.entityManager.getEntityComponentInstance(arrAttack.get(i), tool.getClass());\n\n //A -1 means that the entity is not attacking, at least with that weapon\n if (tool.currentActive != -1) {\n entities.add(arrAttack.get(i));\n }\n }\n\n //adding collidables to entities\n for (int i = 0; i < arrCollidable.size(); i++) {\n entities.add(arrCollidable.get(i));\n }\n }", "@Override\n\tpublic Image loadEntity() {\n\t\ttry {\n\t\t\tImage entityImage = new Image(new FileInputStream(IMAGE_LOCATION));\n\t\t\treturn entityImage;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\treturn null;\n\t\t}\n\t}", "public void cargarInformacion()\r\n/* 159: */ {\r\n/* 160:168 */ if (this.indicadorFactura != null)\r\n/* 161: */ {\r\n/* 162:170 */ if (getTipoAnexoSRI().equals(TipoAnexoSRI.ATS.getNombreAbreviado()))\r\n/* 163: */ {\r\n/* 164:171 */ setMostrarBaseImponible(true);\r\n/* 165:172 */ setMostrarBasesDetalle(false);\r\n/* 166: */ }\r\n/* 167: */ else\r\n/* 168: */ {\r\n/* 169:174 */ setMostrarBaseImponible(false);\r\n/* 170:175 */ setMostrarBasesDetalle(true);\r\n/* 171: */ }\r\n/* 172: */ try\r\n/* 173: */ {\r\n/* 174:179 */ this.mensaje = null;\r\n/* 175: */ \r\n/* 176: */ \r\n/* 177:182 */ ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();\r\n/* 178:183 */ HttpSession session = (HttpSession)context.getSession(true);\r\n/* 179:184 */ CompraCajaChica compraCajaChica = (CompraCajaChica)session.getAttribute(\"compraCajaChica\");\r\n/* 180:185 */ FacturaProveedor facturaProveedor = (FacturaProveedor)session.getAttribute(\"facturaProveedor\");\r\n/* 181:186 */ Empresa empresa = null;\r\n/* 182:187 */ if (!this.indicadorFactura.booleanValue())\r\n/* 183: */ {\r\n/* 184:188 */ this.corrigeDatosRetencion = compraCajaChica.getFacturaProveedorSRI().isTraCorregirDatos();\r\n/* 185:189 */ CompraCajaChica ccc = this.servicioCompraCajaChica.cargarDetalle(compraCajaChica.getIdCompraCajaChica());\r\n/* 186:190 */ empresa = ccc.getEmpresa();\r\n/* 187:191 */ this.facturaProveedorSRI = ccc.getFacturaProveedorSRI();\r\n/* 188: */ }\r\n/* 189: */ else\r\n/* 190: */ {\r\n/* 191:193 */ this.corrigeDatosRetencion = facturaProveedor.getFacturaProveedorSRI().isTraCorregirDatos();\r\n/* 192:194 */ FacturaProveedor facProveedor = this.servicioFacturaProveedor.cargarDetalle(Integer.valueOf(facturaProveedor.getId()));\r\n/* 193:195 */ empresa = facProveedor.getEmpresa();\r\n/* 194:196 */ this.facturaProveedorSRI = facProveedor.getFacturaProveedorSRI();\r\n/* 195: */ }\r\n/* 196:200 */ if (empresa != null)\r\n/* 197: */ {\r\n/* 198:201 */ empresa = this.servicioEmpresa.cargarDetalle(empresa);\r\n/* 199:202 */ if (this.facturaProveedorSRI != null)\r\n/* 200: */ {\r\n/* 201:204 */ String email = \"\";\r\n/* 202:205 */ boolean tieneEmail = false;\r\n/* 203:206 */ if ((empresa.getListaContacto() != null) && (!empresa.getListaContacto().isEmpty()))\r\n/* 204: */ {\r\n/* 205:207 */ for (Contacto contacto : empresa.getListaContacto()) {\r\n/* 206:208 */ if ((contacto.getTipoContacto() != null) && (contacto.getTipoContacto().isIndicadorNotificarRetencion()))\r\n/* 207: */ {\r\n/* 208:209 */ if ((contacto.getEmail1() != null) && (!contacto.getEmail1().equals(\"\"))) {\r\n/* 209:210 */ email = email + contacto.getEmail1() + \";\";\r\n/* 210: */ }\r\n/* 211:212 */ if ((contacto.getEmail2() != null) && (!contacto.getEmail2().equals(\"\"))) {\r\n/* 212:213 */ email = email + contacto.getEmail2() + \";\";\r\n/* 213: */ }\r\n/* 214: */ }\r\n/* 215: */ }\r\n/* 216:217 */ if (!email.equals(\"\"))\r\n/* 217: */ {\r\n/* 218:218 */ email = email.substring(0, email.trim().length() - 1).trim();\r\n/* 219:219 */ tieneEmail = true;\r\n/* 220: */ }\r\n/* 221: */ }\r\n/* 222:223 */ if (!tieneEmail)\r\n/* 223: */ {\r\n/* 224:224 */ if ((empresa.getEmail1() != null) && (!empresa.getEmail1().equals(\"\"))) {\r\n/* 225:225 */ email = email + empresa.getEmail1();\r\n/* 226: */ }\r\n/* 227:227 */ if ((empresa.getEmail2() != null) && (!empresa.getEmail2().equals(\"\")))\r\n/* 228: */ {\r\n/* 229:228 */ if (!email.equals(\"\")) {\r\n/* 230:229 */ email = email + \";\";\r\n/* 231: */ }\r\n/* 232:231 */ email = email + empresa.getEmail2();\r\n/* 233: */ }\r\n/* 234: */ }\r\n/* 235:235 */ this.facturaProveedorSRI = this.servicioFacturaProveedorSRI.cargarDetalle(this.facturaProveedorSRI.getIdFacturaProveedorSRI());\r\n/* 236:236 */ this.facturaProveedorSRI.setEmail(email);\r\n/* 237:237 */ this.servicioFacturaProveedorSRI.cargarConceptosRetencion(this.facturaProveedorSRI, empresa);\r\n/* 238:238 */ this.facturaProveedorSRI.setTraCorregirDatos(this.corrigeDatosRetencion);\r\n/* 239:239 */ if ((this.facturaProveedorSRI.getDocumento() == null) && (getListaDocumento().size() > 0)) {\r\n/* 240:240 */ this.facturaProveedorSRI.setDocumento((Documento)this.listaDocumento.get(0));\r\n/* 241: */ }\r\n/* 242:242 */ cargarSecuencia(this.facturaProveedorSRI, AppUtil.getPuntoDeVenta());\r\n/* 243: */ }\r\n/* 244: */ }\r\n/* 245:246 */ if (this.facturaProveedorSRI != null)\r\n/* 246: */ {\r\n/* 247:247 */ this.facturaProveedorSRI.setTraCorregirDatos(this.corrigeDatosRetencion);\r\n/* 248:248 */ if ((!this.corrigeDatosRetencion) && (FuncionesUtiles.getAnio(this.facturaProveedorSRI.getFechaRegistro()) != 9999)) {\r\n/* 249:249 */ this.facturaProveedorSRI.setFechaEmisionRetencion(this.facturaProveedorSRI.getFechaRegistro());\r\n/* 250: */ }\r\n/* 251: */ }\r\n/* 252:252 */ if ((this.facturaProveedorSRI.isIndicadorRetencionEmitida()) && (!this.facturaProveedorSRI.isTraCorregirDatos())) {\r\n/* 253:253 */ this.mensaje = getLanguageController().getMensaje(\"msg_accion_implica_anulacion_previa\");\r\n/* 254: */ }\r\n/* 255: */ }\r\n/* 256: */ catch (ExcepcionAS2 e)\r\n/* 257: */ {\r\n/* 258:256 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 259:257 */ LOG.info(\"ERROR ExcepcionAS2 AL CARGAR DATOS EN FACTURAPROVEEDORSRIBEAN\", e);\r\n/* 260: */ }\r\n/* 261: */ catch (Exception e)\r\n/* 262: */ {\r\n/* 263:260 */ LOG.error(\"ERROR Exception AL CARGAR DATOS EN FACTURAPROVEEDORSRIBEAN \", e);\r\n/* 264:261 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_cargar_datos\"));\r\n/* 265: */ }\r\n/* 266: */ finally\r\n/* 267: */ {\r\n/* 268:264 */ cargarListaTipoComprobanteSRI();\r\n/* 269: */ \r\n/* 270:266 */ cargarListaCreditoTributarioSRI();\r\n/* 271: */ }\r\n/* 272:268 */ this.indicadorFactura = null;\r\n/* 273: */ }\r\n/* 274: */ }", "private void mutateNode(Node node, int tries) throws InterruptedException{\n \r\n \r\n int numOfInfected = 0;\r\n node.setOk(false);\r\n Node in = null;\r\n \r\n Thread.sleep(1000);\r\n \r\n boolean success = false;\r\n for(int x = 0; x < tries; x++){\r\n //System.out.println(\"Try - \" + x);\r\n if(infectednodes.size() == nodes.size()){\r\n System.out.println(\"ALL NODES INFECTED\");\r\n success = true;\r\n break;\r\n }\r\n if(in == null){\r\n in = node;\r\n }\r\n if(!infectednodes.contains(in)){\r\n infectednodes.add(in);\r\n }\r\n \r\n //System.out.println(\"INFECTED: \" + infectednodes);\r\n //System.out.println(\"RECOVERING: \" + recoveringnodes);\r\n //System.out.println(\"RECOVERED: \" + recoveringnodes);\r\n \r\n boolean pass = false;\r\n int rc = 0;\r\n int sleep = 1;\r\n do{\r\n //get random connection from in\r\n rc = new Random().nextInt(in.getConnected().size());\r\n Node rcn = (Node) in.getConnected().get(rc);\r\n \r\n \r\n \r\n //link not ok\r\n if(!rcn.getOk()){\r\n //x++;\r\n continue;\r\n }else if(!rcn.allConnectionsOk()){\r\n System.out.println(\"ALL CONNECTIONS INFECTED TO NODE:\" + rcn);\r\n int is = new Random().nextInt(infectednodes.size());\r\n in = (Node) infectednodes.get(is); \r\n //x++;\r\n continue;\r\n }else if(rcn.getOk() || rcn.recovering){\r\n if(rcn.recovering){\r\n rcn.setRecovering(false);\r\n recoveringnodes.remove(rcn);\r\n }\r\n if(in.getNodeLink().infectLink(rcn)){\r\n infectednodes.add(rcn);\r\n }else{\r\n recoverNode(rcn);\r\n }\r\n sleep = rcn.diff;\r\n pass = true;\r\n }\r\n }while(!pass);\r\n \r\n try {\r\n Thread.sleep((50*sleep)+sleep);\r\n } catch (Exception ex) {}\r\n \r\n \r\n \r\n if(!in.recovering){\r\n recoverNode(in);\r\n }\r\n int is = infectednodes.size();\r\n in = (Node) infectednodes.get(is-1); \r\n \r\n }\r\n System.out.println(\"END OF TRIES\");\r\n //break\r\n }", "public Item pickup(){\n\t\tfor(int i= 0; i< this.Items.length;i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tif(this.Items[i][p] != null && this.position[i][p] == 1){\n\t\t\t\t\tItem loot = Items[i][p];\n\t\t\t\t\tItems[i][p] = null;\n\t\t\t\t\treturn loot;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Item(ItemType.other, \"dust\", 0,0,0);\n\t}", "public IBusinessObject recover()\n throws OculusException;", "private void recoverINodes()\n {\n Map<String, DFSNode.SerializedDFSNode> serInodeMap = new HashMap<>();\n try (BufferedReader reader = new BufferedReader(new FileReader(dfsNodeFile)))\n {\n String line;\n while((line=reader.readLine())!=null)\n {\n DFSNode.SerializedDFSNode serializedINode = (DFSNode.SerializedDFSNode) JSONUtil.fromJSON(line, DFSNode.SerializedDFSNode.class);\n DFSNode inode = new DFSNode();\n inode.fqpn = serializedINode.fqpn;\n inode.dataBlockMetas = serializedINode.dataBlockMeta;\n inode.dirOrFile= serializedINode.dirOrFile;\n inodeMap.put(inode.fqpn,inode);\n\n\n serInodeMap.put(serializedINode.fqpn,serializedINode);\n if (NumberUtils.isCreatable(inode.fqpn))\n fileNodeCounter = Math.max(fileNodeCounter,Integer.valueOf(inode.fqpn));\n\n /* if (inode.dataBlockMetas!=null) {\n\n DFSDataBlockMeta meta = inode.dataBlockMetas.get(inode.dataBlockMetas.size()-1);\n\n meta.fileSystem = resolve(meta.fileSystemName);\n\n }*/\n\n\n }\n } catch (Exception ex) {\n ex.printStackTrace();}\n\n\n inodeMap.values().stream().forEach(inode->{\n\n DFSNode.SerializedDFSNode serializedINode = serInodeMap.get(inode.fqpn);\n\n // inode.next = inodeMap.get(serializedINode.nextNodeName);\n\n if (serializedINode.getNodeNames()!=null) {\n List<DFSNode> nodes = serializedINode.getNodeNames().stream().map(name -> {\n return inodeMap.get(name) ;\n }).collect(Collectors.toList());\n\n inode.setNodes(nodes);\n }\n });\n\n }", "private void loadSpeciesInFirstAnswer(int firstCriteria, int optionselected) {\n ArrayList<String> list = criteriaList.get(firstCriteria).getOptionList().get(optionselected).getEntities();\n for (String s : list) {\n speciesLeft.add(s);\n }\n }", "protected Entity readEntity(final UriInfoResource uriInfo) throws ODataApplicationException {\n return readEntity(uriInfo, false);\n }" ]
[ "0.50727594", "0.50636184", "0.47234035", "0.4639291", "0.46379358", "0.4633274", "0.46295813", "0.4628213", "0.4615595", "0.4593458", "0.4591471", "0.45602727", "0.4503603", "0.44974464", "0.44917879", "0.44712344", "0.44494867", "0.44475192", "0.44431525", "0.4436554", "0.44339272", "0.44251615", "0.44183314", "0.43982401", "0.43717414", "0.43633142", "0.4341308", "0.4297312", "0.42843726", "0.42618695", "0.42523846", "0.42393664", "0.423688", "0.42356005", "0.42239636", "0.4216167", "0.42079708", "0.42054132", "0.42038605", "0.41914698", "0.41889533", "0.41836467", "0.41496918", "0.41438654", "0.41426477", "0.41414285", "0.41384688", "0.41253015", "0.41216275", "0.41205823", "0.41186476", "0.41180068", "0.41156012", "0.4101263", "0.40995333", "0.40948012", "0.40944195", "0.4094251", "0.4094227", "0.4094021", "0.4086288", "0.40861416", "0.40859514", "0.40811813", "0.40811473", "0.40765658", "0.40761334", "0.40738457", "0.40694678", "0.40643114", "0.40633592", "0.4062515", "0.40620703", "0.4056974", "0.40494427", "0.4048354", "0.4038923", "0.4037344", "0.40345323", "0.40333664", "0.4032497", "0.4032156", "0.4031096", "0.40288535", "0.402759", "0.40265483", "0.40258625", "0.40223664", "0.40187222", "0.40186208", "0.40181282", "0.40173623", "0.40131986", "0.40041772", "0.3997657", "0.39910117", "0.39901304", "0.39891428", "0.39881232", "0.39872292" ]
0.58183604
0
Try to return one or more entities from the infected state to the susceptible state for a given Spreadable. This will not affect more entities than are infected.
default void suscept(Spreadable spreadable, int count) { changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Entity extends Immunizable {\n /**\n * Counts the total number of people in a certain state. An entity may be in multiple states if there are\n * multiple spreadables in play.\n *\n * @param state Which state to count\n * @return The number of entities in that state\n */\n int count(State state);\n\n /**\n * Counts the total number of people in a certain state for a given Spreadable. An entity will only ever be\n * in one state per spreadable.\n *\n * @param state Which state to count\n * @param spreadable Which spreadable to consider\n * @return The number of entities in that state for the given spreadable\n */\n int count(State state, Spreadable spreadable);\n\n /**\n * @return The total number of individuals that this Entity represents\n */\n int population();\n\n /**\n * Try to change entities from one state to another. If there aren't enough entities with the old state,\n * then only that many will be changed to the new state.\n *\n * @param spreadable\n * @param from\n * @param to\n * @param count\n */\n void changeState(Spreadable spreadable, State from, State to, int count);\n\n /**\n * Try to infect one or more entities with a specific Spreadable. This will not infect more people than are\n * susceptible, and may also be affected by rules for coexistence of spreadables.\n *\n * @param spreadable\n * @param count\n */\n default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }\n\n\n /**\n * Try to recover one or more entities with a specific Spreadable. This will not recover more entities than are\n * infected.\n *\n * @param spreadable\n * @param count\n */\n default void recover(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.RECOVERED, count);\n }\n\n /**\n * Try to return one or more entities from the infected state to the susceptible state for a given Spreadable.\n * This will not affect more entities than are infected.\n *\n * @param spreadable\n * @param count\n */\n default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }\n\n String getName();\n\n Collection<String> getLabels();\n\n Collection<Spreadable> getSpreadables();\n}", "default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }", "protected void handleEntitiesIndividually() {\n\n\t\tfinal Set<Long> originalBatch = getUidsToLoad();\n\t\tfinal Set<Long> batchOfOne = new HashSet<Long>();\n\n\t\t/**\n\t\t * We replace the batch of all the uids with our own which we'll only put one uid at a time.\n\t\t */\n\t\tsetBatch(batchOfOne);\n\n\t\tLOG.info(\"Loading \" + originalBatch.size() + \" entities individually\");\n\n\t\tfor (final Long uid : originalBatch) {\n\n\t\t\ttry {\n\n\t\t\t\tbatchOfOne.clear();\n\t\t\t\tbatchOfOne.add(uid);\n\n\t\t\t\tfinal Collection<ENTITY> loadedEntity = loadBatch();\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_loaded_individually\", loadedEntity.size());\n\n\t\t\t\tfor (final ENTITY entity : loadedEntity) {\n\t\t\t\t\tgetNextStage().send(entity);\n\t\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_out\", 1);\n\n\t\t\t\t}\n\t\t\t} catch (final Exception e) {\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:individual_entity_loading_failures\", 1);\n\n\t\t\t\tLOG.error(\"Could not load entity with uid \" + uid + \" for indexing, this entity will not be indexed. \", e);\n\t\t\t}\n\n\t\t}\n\n\t\t/** Put the original set of uids back. */\n\t\tsetBatch(originalBatch);\n\n\t}", "public void resolve(){\n logger.log(Level.FINE,attacker.getName()+\" withering attacked \"+defender.getName());\n AttackState state=new AttackState();\n state.weaponDamage=weapon.getDamage();\n state.initialAttackpool=baseAttackdice+baseAccuracy-woundpenalty;\n attacker.declareWitheringAttack(state); // If the attacker wants to change the pool, he modifies the state accordingly.\n defender.declareWitheringDV(state); // Defender declares their dv against this specific attack. This sets both initialdv and changedDv\n state.initialAttackRoll= new DiceThrow(state.changedAttackpool);\n attacker.modifyWitheringAttackRollAttacker(state); //This sets stuff like modifiedAttackRollAttacker and AttackerRollValuation\n defender.modifyWitheringAttackRollDefender(state); //This sets defender modifiedAttackRollDefender\n state.attackRollSuccesses=state.modifiedAttackRollDefender.evaluateResults(state.AttackRollValuationAttacker);\n state.threshholdSuccesses=state.attackRollSuccesses-state.changedDv;\n logger.log(Level.FINE,attacker.getName()+\" rolled \"+state.changedAttackpool+\" dice against \"+defender.getName()+\"'s dv of \"+state.changedDv+\" and gained \"+state.attackRollSuccesses+\" successes.\");\n attacker.changeWitheringThreshholdAttacker(state); //This sets thresholdModifiedAttacker\n defender.changeWitheringThreshholdDefender(state); //This sets thresholdModifiedDefender\n if(state.thresholdModifiedDefender>=0) {\n logger.log(Level.FINE,attacker.getName()+\" hit \"+defender.getName()+\" with \"+state.thresholdModifiedDefender+\" threshhold successes.\");\n attacker.modifyWitheringRawDamageAttacker(state); //Sets normal raw damageType, based on strength and weapon damageType, and then sets rawDamagemModifiedAttacker\n defender.modifyWitheringRawDamageDefender(state); //this sets rawDamageModifiedDefender, and sets up the various soak values, so natural soak and armor soak.\n logger.log(Level.FINE, \"The raw damage of the attack is: \"+state.rawDamageModifiedDefender);\n state.totalSoak = Math.max(state.defenderArmorSoak - ignoredArmorSoak, 0) + state.defenderNaturalSoak; //\n attacker.modifyTotalSoakAttacker(state); //This sets totalSoakmodifiedAttacker. Don't think this actually has support in the solar charmset, but giving opportunities to work with.\n defender.modifyTotalSoakDefender(state); // This sets totalSoakmodifiedDefender.\n state.postSoakSuccesses=Math.max(state.rawDamageModifiedDefender-state.totalSoakModifiedDefender,weapon.getOverwhelming());\n logger.log(Level.FINE,state.totalSoakModifiedDefender+\" damage is soaked, leading to post soak dice of \"+state.postSoakSuccesses);\n attacker.declarePostSoakAttacker(state); //sets postSoakSuccessesModifiedAttacker\n defender.declarePostSoakDefender(state); //sets postSoakSuccessesModifiedDefender\n DiceThrow droll=new DiceThrow(state.postSoakSuccessesModifiedDefender);\n state.damageRoll=droll;\n attacker.modifyWitheringDamageRollAttacker(state); //sets damageRollmodifiedAttacker and damageRollvValuation\n defender.modifyWitheringDamageRollDefender(state); //sets damageRollmodifiedDefender\n state.initiativeDamageDone=state.damageRollModifiedDefender.evaluateResults(state.damageRollValuation);\n logger.log(Level.FINE,attacker.getName()+\" rolls \"+state.postSoakSuccessesModifiedDefender+\" dice and achieves \"+state.initiativeDamageDone+\" successes.\");\n attacker.modifyInitiativeDamageAttacker(state);\n defender.modifyInitiativeDamageDefender(state); //Since this is the last change of initiative, we can check whether the defender was crashed here.\n attacker.updateInitiativeAttacker(state);\n defender.updateInitiativeDefender(state);//Here we should handle all the initiative changes respectively, with checking if people are crashed etc.\n }\n else{\n attacker.failedWitheringAttackAttacker(state);\n defender.failedWitheringAttackDefender(state);\n }\n\n }", "@Override\n\tpublic boolean attackEntityFrom(DamageSource src, float par2) {\n\t\tif (isInvulnerableTo(src)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// don't just sit there!\n\t\taiSit.setSitting(false);\n\n\t\treturn super.attackEntityFrom(src, par2);\n\t}", "default void recover(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.RECOVERED, count);\n }", "private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}", "public void infect() {\n\t\tPlagueAgent current = this;\n\t\tif (!current.infected) {\n\t\t\tfor (PlagueAgent a : plagueWorld.getNeighbors(current, 5)) {\n\t\t\t\tif (a.infected) {\n\t\t\t\t\tint luck = Utilities.rng.nextInt(100);\n\t\t\t\t\tif (luck < plagueWorld.VIRULENCE) {\n\t\t\t\t\t\tthis.infected = true;\n\t\t\t\t\t\tplagueWorld.newInfection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplagueWorld.changed();\n\t}", "public void infect() {\n isInfected = true;\n }", "@Suspendable\n @Override\n public StateAndRef<SanctionedEntities> call() throws FlowException {\n // Obtain a reference to the notary we want to use.\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n\n // Stage 1\n progressTracker.setCurrentStep(GENERATING_TRANSACTION);\n // Generate an unsigned transaction.\n SanctionedEntities state = new SanctionedEntities(Collections.emptyList(), getServiceHub().getMyInfo().getLegalIdentities().get(0));\n Command txCommand = new Command(new SanctionedEntitiesContract.Commands.Create(), getServiceHub().getMyInfo().getLegalIdentities().get(0).getOwningKey());\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addOutputState(state, SanctionedEntitiesContract.SANCTIONS_CONTRACT_ID)\n .addCommand(txCommand);\n txBuilder.verify(getServiceHub());\n\n // Stage 2\n progressTracker.setCurrentStep(SIGNING_TRANSACTION);\n // Sign the transaction\n SignedTransaction partSignedTx = getServiceHub().signInitialTransaction(txBuilder);\n\n // Stage 3\n progressTracker.setCurrentStep(FINALISING_TRANSACTION);\n // Notarise and record the transaction in both parties' vaults.\n return subFlow(\n new FinalityFlow(\n partSignedTx,\n Collections.emptyList(),\n FINALISING_TRANSACTION.childProgressTracker()\n )\n ).getTx().outRefsOfType(SanctionedEntities.class).get(0);\n }", "protected Entity findPlayerToAttack()\n {\n EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);\n return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;\n }", "public void smelt() {\n if (this.canSmelt()) {\n ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.items[0]);\n if (this.items[1] == null) {\n this.items[1] = itemstack.copy();\n } else if (this.items[1].getItem() == itemstack.getItem()) {\n this.items[1].stackSize += itemstack.stackSize; // Forge BugFix:\n // Results may\n // have multiple\n // items\n }\n\n --this.items[0].stackSize;\n\n if (this.items[0].stackSize <= 0) {\n this.items[0] = null;\n }\n // TODO: Enable after update\n //energy.extractEnergy(1600, false);\n }\n }", "@Override\n\tprotected Vector2f decide(final List<IPerceivable> _surroundingEntities) {\n\t\treturn null;// TODO\n\t}", "public void findEnemySnake() {\n // Cheap fix to GameState spawning a food on a person's HeadPiece\n if (this.gb.heads.size() == 1) {\n if (print) System.out.println(\" ONLY 1 HEAD FOUND IN GAME BOARD!\");\n HeadPiece h1 = this.gb.heads.get(0);\n if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {\n // fucking panic i guess\n if (print) System.out.println(\" CANNOT FIND ENEMY HEAD?????\");\n this.enemy_head_x = 0;\n this.enemy_head_y = 0;\n } else {\n // Correctly found enemy head\n this.enemy_head_x = h1.getX();\n this.enemy_head_y = h1.getY();\n }\n return;\n }\n\n // Find the enemy snake head and update member variables\n HeadPiece h1 = this.gb.heads.get(0);\n HeadPiece h2 = this.gb.heads.get(1);\n HeadPiece enemyHead;\n if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {\n enemyHead = h2;\n } else {\n enemyHead = h1;\n }\n this.enemy_head_x = enemyHead.getX();\n this.enemy_head_y = enemyHead.getY();\n }", "public void attack() {\n //Grab an attacker.\n Territory attacker = potentialAttackers.remove(0);\n \n //Find the weakest adjacent territory\n int victimStrength = Integer.MAX_VALUE;\n Territory victim = null;\n List<Territory> adjs = gameController.getBoard().getAdjacentTerritories(attacker);\n for(Territory adj : adjs){\n \n //Verify that our odds are good enough for this attack to consider it.\n int aTroops = attacker.getNumTroops() - 1;\n int dTroops = adj.getNumTroops();\n double odds = MarkovLookupTable.getOddsOfSuccessfulAttack(aTroops, dTroops);\n boolean yes = Double.compare(odds, ACCEPTABLE_RISK) >= 0;\n \n //If we have a chance of winning this fight and its the weakest opponent.\n if(yes && adj.getNumTroops() < victimStrength && !adj.getOwner().equals(this)){\n victim = adj;\n victimStrength = adj.getNumTroops();\n }\n }\n \n //Resolve the Attack by building forces and settle the winner in Victim's land\n Force atkForce = attacker.buildForce(attacker.getNumTroops() - 1);\n Force defForce = victim.buildForce(victimStrength); //Guaranteed not null\n Force winner = atkForce.attack(defForce);\n victim.settleForce(winner);\n }", "@Override\n protected @Nonnull ItemStack dispenseStack(@Nonnull IBlockSource source, @Nonnull ItemStack stack) {\n ItemStack secondaryResult = Prep.getEmpty();\n EnumFacing enumfacing = source.getBlockState().getValue(BlockDispenser.FACING);\n\n CapturedMob capturedMob = CapturedMob.create(stack);\n\n if (capturedMob != null) {\n if (capturedMob.spawn(source.getWorld(), source.getBlockPos(), enumfacing, true)) {\n stack.shrink(1);\n secondaryResult = new ItemStack(ItemSoulVial.this);\n }\n } else {\n for (EntityLivingBase entity : source.getWorld().<EntityLivingBase> getEntitiesWithinAABB(EntityLivingBase.class,\n new AxisAlignedBB(source.getBlockPos().offset(enumfacing)), EntitySelectors.NOT_SPECTATING)) {\n if (!(entity instanceof IEntityOwnable) || ((IEntityOwnable) entity).getOwnerId() == null) {\n capturedMob = CapturedMob.create(entity);\n if (capturedMob != null) {\n entity.setDead();\n if (entity.isDead) {\n stack.shrink(1);\n secondaryResult = capturedMob.toStack(ItemSoulVial.this, 1, 1);\n break;\n }\n }\n }\n }\n }\n\n if (Prep.isValid(secondaryResult)) {\n if (Prep.isInvalid(stack)) {\n stack = secondaryResult;\n } else {\n TileEntity blockTileEntity = source.getBlockTileEntity();\n if (!(blockTileEntity instanceof TileEntityDispenser) || ((TileEntityDispenser) blockTileEntity).addItemStack(secondaryResult) < 0) {\n Block.spawnAsEntity(source.getWorld(), source.getBlockPos().offset(enumfacing), secondaryResult);\n }\n }\n }\n\n return stack;\n }", "public void checkEntityOverlap(){\n for(Entity entity:entityList){\n if(entity.getEntityType().equals(\"Sandwich\")) {\n if (player.getPlayerCoordinates() == entity.getEntityCoordinates()) {\n player.eatSandwich();\n entityList.remove(entity);\n }\n }\n }\n }", "@Override\r\n public void detectAndSendChanges()\r\n {\r\n super.detectAndSendChanges();\r\n\r\n for (int i = 0; i < this.crafters.size(); ++i)\r\n {\r\n ICrafting icrafting = (ICrafting)this.crafters.get(i);\r\n\r\n }\r\n }", "private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}", "public void gameAttack(){\n int counter = 0;\n while (currentPlayer.wantToAttack(this)){\n counter++;\n if (counter > 100) break;\n /*In rare cases, AI players will repeatedly select the same attackers and defenders\n while also not wanting to dice fight. That will infinitely loop here and this counter will prevent it\n Under normal circumstances, no reasonable player will ever try to do more than 100 separate attacks in the same turn\n */\n\n String[] attackerDefender = {\"\",\"\"};\n //AttackStarterSelection\n attackerDefender[0] = currentPlayer.chooseAttackStarter(this);\n\n //AttackDefenderSelection\n attackerDefender[1] = currentPlayer.chooseAttackDefender(this, attackerDefender[0]);\n\n //DiceFightOrQuit\n int attackerDice, defenderDice;\n while (currentPlayer.wantToDiceFight(this, attackerDefender[0]+ \",\" + attackerDefender[1])){\n //DiceFightAttackerChoice\n attackerDice = currentPlayer.getAttackerDice(this, getTerritory(attackerDefender[0]));\n\n //DiceFightDefenderChoice\n Player defender = this.getPlayerFromList(this.getTerritory(attackerDefender[1]).getOwner());\n defenderDice = defender.getDefenderDice(this, this.getTerritory(attackerDefender[1]));\n\n\n //DiceFight results\n displayMessage(this.diceFight(attackerDefender, attackerDice,defenderDice));\n\n //Possible elimination and announcement of winner\n //Current diceFight ends if attacker has 1 troop left, or territory is conquered\n if (endDiceFight(attackerDefender, attackerDice)) break;\n\n }//End diceFightOrQuit\n\n\n }//End wantToAttack\n //Proceed to fortify stage of turn\n }", "private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }", "public BoardPiece[] evaluatePieces(BoardPiece attackingPiece, BoardPiece defendingPiece) {\n\t\tint attackingPieceType = attackingPiece.getPieceType();\n\t\tint defendingPieceType = defendingPiece.getPieceType();\n\t\t\n\t\tBoardPiece[] result = new BoardPiece[2];\n\t\t\n\t\tLog.d(TAG, \"Arbiter evaluate! Attacking: \" +attackingPieceType+ \" Defending: \" +defendingPieceType);\n\t\t\n\t\tif(attackingPieceType == defendingPieceType) {\n\t\t\tif(attackingPieceType == PieceHierarchy.FLAG && defendingPieceType == PieceHierarchy.FLAG) {\n\t\t\t\t//attacking piece wins the game\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//both pieces are eliminated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//spies case\n\t\telse if(attackingPieceType == PieceHierarchy.SPY) {\n\t\t\tif(defendingPieceType == PieceHierarchy.PRIVATE) {\n\t\t\t\t//attacking piece defeated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = defendingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = attackingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//defending piece is defeated\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\t\t\t\treturn result;\n\n\t\t\t}\n\t\t}\n\t\telse if(defendingPieceType == PieceHierarchy.SPY) {\n\t\t\tif(attackingPieceType == PieceHierarchy.PRIVATE) {\n\t\t\t\t//defending piece is defeated\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//attacking piece is defeated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = defendingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = attackingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\t//any other cases\n\t\telse {\n\t\t\tif(attackingPieceType > defendingPieceType) {\n\t\t\t\t//defending piece type is defeated\n\t\t\t\tthis.eliminatePiece(defendingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = attackingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = defendingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//attacking piece type is defeated\n\t\t\t\tthis.eliminatePiece(attackingPiece);\n\t\t\t\tresult[WINNING_PIECE_INDEX] = defendingPiece;\n\t\t\t\tresult[DEFEATED_PIECE_INDEX] = attackingPiece;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}", "@PostMapping(value = \"/monster/battle/\")\n public ResponseEntity<Monster> battleMonster(@RequestBody List<Monster> monsters) {\n\n Monster monster1 = monsterService.findById(monsters.get(0).getId());\n if (monster1== null) {\n System.out.println(\"Monster with id \" + monsters.get(0).getId() + \" not found\");\n return new ResponseEntity<Monster>(HttpStatus.NOT_FOUND);\n }\n\n Monster monster2 = monsterService.findById(monsters.get(1).getId());\n if (monster2== null) {\n System.out.println(\"Monster with id \" + monsters.get(1).getId() + \" not found\");\n return new ResponseEntity<Monster>(HttpStatus.NOT_FOUND);\n }\n\n Monster firstAtk, secondAtk;\n\n\n if((((int) Math.random() *2) + 1) == 1) {\n firstAtk = monster1;\n secondAtk = monster2;\n }\n else {\n firstAtk = monster2;\n secondAtk = monster1;\n }\n long monster1Health = firstAtk.getHealth();\n long monster2Health = secondAtk.getHealth();\n\n while(true) {\n monster2Health -= firstAtk.getAttack();\n System.out.println(firstAtk.getMonstername() + \" Attack \" + secondAtk.getMonstername() + \" | Health : \" + monster2Health);\n if(monster2Health <= 0) {\n monster2Health = 0;\n break;\n }\n monster1Health -= secondAtk.getAttack();\n System.out.println(secondAtk.getMonstername() + \" Attack \" + firstAtk.getMonstername() + \" | Health : \" + monster1Health);\n if(monster1Health <= 0) {\n monster1Health = 0;\n break;\n }\n }\n\n Monster winMonster;\n if(monster1Health == 0) {\n winMonster = secondAtk;\n }\n else {\n winMonster = firstAtk;\n }\n\n return new ResponseEntity<Monster>(winMonster, HttpStatus.OK);\n }", "public List<Entity> shootoutEntities(List<Entity> ents, boolean simulate);", "@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }", "public void swapReplicatedEntities(Set<Entity> newReplicatedEntities, Portal portal) {\n // Loop through all of the existing fake entities and remove any that will no longer be visible to the player\n Iterator<ViewableEntity> removingIterator = replicatedEntites.values().iterator();\n while(removingIterator.hasNext()) {\n // Get the next entity, check if it is still visible in the new entities\n ViewableEntity playerEntity = removingIterator.next();\n Entity entity = playerEntity.getEntity();\n\n // If an entity is now vanished, or is no longer shown, hide it\n if(!newReplicatedEntities.contains(entity) || isVanished(entity)) {\n // If not, send an entity destroy packet, then remove the entity\n hideEntity(playerEntity.getEntityId());\n removingIterator.remove();\n }\n }\n\n // Loop through all the new entities\n for(Entity entity : newReplicatedEntities) {\n // Skip vanished players\n if(isVanished(entity)) {\n continue;\n }\n\n // If the current entity does not exist in the list\n if(!replicatedEntites.containsKey(entity)) {\n // Make a new PlayerViewableEntity instance from the entity, then send the packets to show it\n ViewableEntity newEntity = new ViewableEntity(this, entity, portal, random);\n showEntity(entity, newEntity.getLocation(), newEntity.getRotation(), newEntity.getEntityId());\n replicatedEntites.put(entity, newEntity); // Add the entity to the list\n }\n }\n }", "private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public void tournamentWithElitism(){\n\t\tEvolvable spring[] = new Evolvable[populationSize];\n\t\t\n\t\t//elite individuals go directly to new population\n\t\tfor (int i = 0; i < SNSLearningAgent.elitism; i++){\n\t\t\tspring[i] = population[i];\t\n\t\t}\n\t\t\n\t\t//other individuals are selected via tournament\n\t\tfor (int i = SNSLearningAgent.elitism; i < populationSize; i+=2) {\n\t\t\t//parents selected via tournament\n\t\t\tint p1 = tournament(SNSLearningAgent.tournamentSize);\t\n\t\t\tint p2 = tournament(SNSLearningAgent.tournamentSize);\n\t\t\twhile(p1 == p2)\tp2 = tournament(SNSLearningAgent.tournamentSize);\n\t\t\t\n\t\t\t//performs crossover if probability is matched\n\t\t\tif(R.nextFloat() < SNSLearningAgent.crossoverProb){\n\t\t\t\tif (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\t\tint point = R.nextInt(SNSAgent.DNA_LENGTH);\n\t\t\t\t\t\n\t\t\t\t\tspring[i] = cross(population[p1], population[p2], point);\n\t\t\t\t\tif (i+1 < populationSize) spring[i+1] = cross(population[p2], population[p1], point);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tspring[i] = cross(population[p1], population[p2]);\n\t\t\t\t\tif (i+1 < populationSize) spring[i+1] = cross(population[p2], population[p1]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tspring[i] = population[p1];\n\t\t\t\tif (i+1 < populationSize) spring[i+1] = population[p2];\n\t\t\t}\n\t\t\t\n\t\t\t//performs mutation if probability is reached\n\t\t\tif(R.nextFloat() < SNSLearningAgent.mutationProb){\n\t\t\t\tspring[i].mutate();\n\t\t\t}\n\t\t\tif(i+1 < populationSize && R.nextFloat() < SNSLearningAgent.mutationProb){\n\t\t\t\tspring[i+1].mutate();\n\t\t\t}\n\t }\n\t\t\n\t\t//replaces old population with the new one\n\t\tfor(int i = 1; i < populationSize; i++) {\n\t\t\tpopulation[i] = spring[i];\n\t\t}\n\t}", "public void infect() {\n\n if (random.getRandom() <= getProbability()) {\n isInfected = true;\n isInfectedOnThisStep = true;\n }\n }", "protected Entity findPlayerToAttack() {\n/* 339 */ double var1 = 8.0D;\n/* 340 */ return getIsSummoned() ? null : this.field_70170_p.func_72890_a(this, var1);\n/* */ }", "@Override\r\n\tpublic <S extends Candidat> Iterable<S> save(Iterable<S> entities) {\n\t\treturn null;\r\n\t}", "@Override\n public void interagit() {\n super.interagit();\n ArrayList<EtreVivant> cibles = this.ciblesPotentiellesAdjacentes(this.getPosition(),this.nombreVoisins);\n cibles.stream().filter((vivants) -> (vivants.getEtat().equals(EtatEtreVivant.MALADE))).forEach((vivants) -> {\n this.soigne(vivants);\n });\n }", "@Override\n\tprotected void onImpact(MovingObjectPosition p_70184_1_) {\n\t\tif (p_70184_1_.entityHit != null) {\n\t\t\tp_70184_1_.entityHit.attackEntityFrom(\n\t\t\t\t\tDamageSource.causeThrownDamage(this, getThrower()), 0.0F);\n\t\t}\n\n\t\tfor (int var2 = 0; var2 < 32; ++var2) {\n\t\t\tworldObj.spawnParticle(\"portal\", posX, posY + rand.nextDouble()\n\t\t\t\t\t* 2.0D, posZ, rand.nextGaussian(), 0.0D,\n\t\t\t\t\trand.nextGaussian());\n\t\t}\n\n\t\tif (!worldObj.isClient) {\n\t\t\tif (getThrower() != null && getThrower() instanceof EntityPlayerMP) {\n\t\t\t\tfinal EntityPlayerMP var3 = (EntityPlayerMP) getThrower();\n\n\t\t\t\tif (var3.playerNetServerHandler.func_147362_b().isChannelOpen()\n\t\t\t\t\t\t&& var3.worldObj == worldObj) {\n\t\t\t\t\tif (getThrower().isRiding()) {\n\t\t\t\t\t\tgetThrower().mountEntity((Entity) null);\n\t\t\t\t\t}\n\n\t\t\t\t\tgetThrower().setPositionAndUpdate(posX, posY, posZ);\n\t\t\t\t\tgetThrower().fallDistance = 0.0F;\n\t\t\t\t\tgetThrower().attackEntityFrom(DamageSource.fall, 5.0F);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetDead();\n\t\t}\n\t}", "private void condenseSteam() {\n if (getPressure()> Constants.ATMOSPHERIC_PRESSURE) {\n double boilingPoint = Water.getBoilingTemperature(getPressure());\n if (boilingPoint > steam.getTemperature()) { // remove steam such that it equalizes to the boiling point\n double newSteamPressure = Math.max(Water.getBoilingPressure(steam.getTemperature()), Constants.ATMOSPHERIC_PRESSURE);\n \n\n int newQuantity = steam.getParticlesAtState(newSteamPressure, getCompressibleVolume());\n int deltaQuantity = steam.getParticleNr() - newQuantity;\n if (deltaQuantity < 0) {\n System.out.println(\"BAD\");\n }\n steam.remove(deltaQuantity);\n getWater().add(new Water(steam.getTemperature(), deltaQuantity));\n }\n } \n }", "public void solveGame() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\n\t\t\tif(!relaxAllControllables){\n\t\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\n\t\t\t\t\t\tcurrentSet.add(s);\n\t\t\t\t}\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "@Override\n protected Entity findPlayerToAttack() {\n EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 64.0);\n if (player != null) {\n if (this.shouldAttackPlayer(player)) {\n if (this.lookDelay++ == 5) {\n this.lookDelay = 0;\n return player;\n }\n }\n else {\n this.lookDelay = 0;\n }\n }\n return null;\n }", "public Item pickup(){\n\t\tfor(int i= 0; i< this.Items.length;i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tif(this.Items[i][p] != null && this.position[i][p] == 1){\n\t\t\t\t\tItem loot = Items[i][p];\n\t\t\t\t\tItems[i][p] = null;\n\t\t\t\t\treturn loot;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Item(ItemType.other, \"dust\", 0,0,0);\n\t}", "private void processPlayerTurns() throws DeficitException {\n\n while(!game.isGameOver())\n {\n if(humanPlayer.allDoctorOccupied())\n {\n\n game.turns ++;\n humanPlayer.processAtEndOfTurn();\n humanPlayer.processAtStartOfTurn(); //prepare for the next turn/season\n update();\n printResult.add(\"------------------------------------- Human player ends -------------------------------------\");\n\n\n printResult.add(\"------------------------------------- Computer player 1 starts-------------------------------------\");\n processComputerPlayerTurns(computerPlayer_1);\n computerPlayer_1.processAtEndOfTurn();\n computerPlayer_1.processAtStartOfTurn();\n update();\n printResult.add(\"------------------------------------- Computer player 1 ends -------------------------------------\");\n\n printResult.add(\"------------------------------------- Computer player 2 starts------------------------------------- \");\n processComputerPlayerTurns(computerPlayer_2);\n computerPlayer_2.processAtEndOfTurn();\n computerPlayer_2.processAtStartOfTurn();\n update();\n printResult.add(\"------------------------------------- Computer player 2 ends ------------------------------------- \");\n\n\n }\n }\n showGameOver();\n\n }", "private Collection<? extends AbstractState> getFollowStates(AutomatonState state, List<AbstractState> otherElements, CFAEdge edge, boolean failOnUnknownMatch) throws CPATransferException {\n Preconditions.checkArgument(!(state instanceof AutomatonUnknownState));\n if (state == cpa.getBottomState()) {\n //return Collections.singleton(state);\n return Collections.emptySet();\n }\n\n if (state.getInternalState().getTransitions().isEmpty()) {\n // shortcut\n return Collections.singleton(state);\n }\n\n Collection<AbstractState> lSuccessors = new HashSet<AbstractState>(2);\n AutomatonExpressionArguments exprArgs = new AutomatonExpressionArguments(state.getVars(), otherElements, edge, logger);\n boolean edgeMatched = false;\n boolean nonDetState = state.getInternalState().isNonDetState();\n\n // these transitions cannot be evaluated until last, because they might have sideeffects on other CPAs (dont want to execute them twice)\n // the transitionVariables have to be cached (produced during the match operation)\n // the list holds a Transition and the TransitionVariables generated during its match\n List<Pair<AutomatonTransition, Map<Integer, String>>> transitionsToBeTaken = new ArrayList<Pair<AutomatonTransition, Map<Integer, String>>>(2);\n\n for (AutomatonTransition t : state.getInternalState().getTransitions()) {\n exprArgs.clearTransitionVariables();\n\n matchTime.start();\n ResultValue<Boolean> match = t.match(exprArgs);\n matchTime.stop();\n if (match.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition condition could not be evaluated: \" + match.getFailureMessage());\n }\n // if one transition cannot be evaluated the evaluation must be postponed until enough information is available\n return Collections.singleton(new AutomatonUnknownState(state));\n } else {\n if (match.getValue()) {\n edgeMatched = true;\n assertionsTime.start();\n ResultValue<Boolean> assertionsHold = t.assertionsHold(exprArgs);\n assertionsTime.stop();\n\n if (assertionsHold.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition assertions could not be evaluated: \" + assertionsHold.getFailureMessage());\n }\n // cannot yet be evaluated\n return Collections.singleton(new AutomatonUnknownState(state));\n\n } else if (assertionsHold.getValue()) {\n if (!t.canExecuteActionsOn(exprArgs)) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition action could not be executed\");\n }\n // cannot yet execute, goto UnknownState\n return Collections.singleton(new AutomatonUnknownState(state));\n }\n\n // delay execution as described above\n Map<Integer, String> transitionVariables = ImmutableMap.copyOf(exprArgs.getTransitionVariables());\n transitionsToBeTaken.add(Pair.of(t, transitionVariables));\n\n } else {\n // matching transitions, but unfulfilled assertions: goto error state\n AutomatonState errorState = AutomatonState.automatonStateFactory(Collections.<String, AutomatonVariable>emptyMap(), AutomatonInternalState.ERROR, cpa);\n logger.log(Level.INFO, \"Automaton going to ErrorState on edge \\\"\" + edge.getDescription() + \"\\\"\");\n lSuccessors.add(errorState);\n }\n\n if (!nonDetState) {\n // not a nondet State, break on the first matching edge\n break;\n }\n }\n // do nothing if the edge did not match\n }\n }\n\n if (edgeMatched) {\n // execute Transitions\n for (Pair<AutomatonTransition, Map<Integer, String>> pair : transitionsToBeTaken) {\n // this transition will be taken. copy the variables\n AutomatonTransition t = pair.getFirst();\n Map<Integer, String> transitionVariables = pair.getSecond();\n actionTime.start();\n Map<String, AutomatonVariable> newVars = deepCloneVars(state.getVars());\n exprArgs.setAutomatonVariables(newVars);\n exprArgs.putTransitionVariables(transitionVariables);\n t.executeActions(exprArgs);\n actionTime.stop();\n AutomatonState lSuccessor = AutomatonState.automatonStateFactory(newVars, t.getFollowState(), cpa);\n //if (!(lSuccessor instanceof AutomatonState.BOTTOM)) {\n lSuccessors.add(lSuccessor);\n //} // else add nothing\n }\n return lSuccessors;\n } else {\n // stay in same state, no transitions to be executed here (no transition matched)\n return Collections.singleton(state);\n }\n }", "private static void soldierCode() throws GameActionException {\n\t\tRobotInfo[] visibleEnemyArray = rc.senseHostileRobots(rc.getLocation(), 1000000);\n\t\tSignal[] incomingSignals = rc.emptySignalQueue();\n\t\tfor(Signal s:incomingSignals){\n\t\t\tint[] message = s.getMessage();\n\t\t\tif(s.getTeam()==rc.getTeam()){\n\t\t\t\tif(message!=null){\n\t\t\t\t\tif(message[0]%10==0){\n\t\t\t\t\t\tint x = message[1]/100000;\n\t\t\t\t\t\tint y = message[1]%100000;\n\t\t\t\t\t\tcenter= new MapLocation(x,y);\n\t\t\t\t\t\tint r = message[0]/10;\n\t\t\t\t\t\tradius=r;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint dist = rc.getLocation().distanceSquaredTo(center);\n\t\tif (visibleEnemyArray.length==0) {\n\t\t\tif (goal!=null&&(rc.senseRubble(goal)<100 || rc.senseRobotAtLocation(goal)!=null)) {\n\t\t\t\tgoal = null;\n\t\t\t\trc.setIndicatorString(0, \"done clearing\");\n\t\t\t}\t\n\t\t\tif(goal==null) {\n\t\t\t\tMapLocation[] locs = MapLocation.getAllMapLocationsWithinRadiusSq(rc.getLocation(), 8);\n\t\t\t\tArrayList<MapLocation> inside = new ArrayList<MapLocation>();\n\t\t\t\tfor(MapLocation loc: locs) {\n\t\t\t\t\tif (loc.distanceSquaredTo(center)<=1.5*radius) {\n\t\t\t\t\t\tinside.add(loc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(MapLocation l: inside) {\n\t\t\t\t\tif (rc.senseRubble(l)>99 && rc.senseRobotAtLocation(l)==null) {\n\t\t\t\t\t\tgoal = l;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tUtility.tryToMove(goal);\n\t\t\t}\n\t\t\t\n\t\t\tif (dist>radius && dist< 4*radius) { //Explore\n\t\t\t\tMapLocation travel = soldierFind();\n\t\t\t\tUtility.tryToMove(travel);\n\t\t\t}else{ //Move back\n\t\t\t\tMapLocation loc = center.add(center.directionTo(rc.getLocation()), (int)Math.pow(radius, 0.5)+1);\n\t\t\t\tUtility.tryToMove(loc);\n\t\t\t}\n\t\t} else { //Kite\n\t\t\tkite(visibleEnemyArray);\n\t\t}\n\t}", "public void attack() {\n if (st instanceof RedAlienState.Attacking) {\n \tRedAlienState.Attacking att = (RedAlienState.Attacking)st;\n \ttry{\n \t\tDelta d = att.path.remove();\n \t\tthis.x += d.xd;\n \t\tthis.y += d.yd;\n \t\tif(Math.random() > .99){\n \t\t\tthis.fire();\n \t\t}\n \t}catch(NoSuchElementException e){\n \t\tthis.x = this.column;\n \t\tthis.y = this.row;\n \t\tst = new RedAlienState.Normal();\n \t\tthis.isAttacking = false;\n \t}\n }\n }", "public void doGameOver() {\r\n\t// all players takes seeds left on their side of the game\r\n\tfor (short i = 0; i < this.size; i++) {\r\n\t if (this.territory[0][i] != 0) {\r\n\t\tthis.points[0] += this.territory[0][i];\r\n\t\tthis.territory[0][i] = 0;\r\n\t\tfireChanged(TERRITORY, (short) 0, i);\r\n\t }\r\n\r\n\t if (this.territory[1][i] != 0) {\r\n\t\tthis.points[1] += this.territory[1][i];\r\n\t\tthis.territory[1][i] = 0;\r\n\t\tfireChanged(TERRITORY, (short) 1, i);\r\n\t }\r\n\t}\r\n\tfireChanged(POINTS, NO_SIDE, NO_POSITION);\r\n }", "private Response consoleGetResponse(Attack attack, int defender) {\n int row = attack.getRow();\n int col = attack.getColumn();\n int idx; // once we know the location index on a ship that's hit\n Ship[] ships = playerShips[defender];\n Ship ship = null; // once we know which Ship is hit\n if (!collide(row, col, ships)) {\n return new Response(Response.MISS);\n }\n // From here we know it's a hit at least\n for (Ship s : ships) {\n if (collide(row, col, s)) {\n ship = s;\n }\n }\n if (ship == null) {\n // Should not be reached; we've already verified that (row,col) collides with at least one ship\n throw new Error(\"Error in TextUI.consoleGetResponse()\");\n }\n idx = ship.getHitIndex(row, col);\n ship.setHasBeenHit(idx);\n if (! ship.checkSunk()) {\n return new Response(Response.HIT);\n }\n // From here we know a ship is sunk\n for (int i = 0; i < ships.length; i++) {\n \tif (ships[i].checkSunk()) {\n \t\tships[i].setHasBeenSunk(true); }\n }\n for (Ship s : ships) {\n if (! s.checkSunk()) {\n // At least one ship remains\n \treturn new Response(Response.SUNK, ship.getName(), ship.getSize());\n \n }\n }\n // From here we know all ships are sunk\n return new Response(Response.ALLSUNK, ship.getName(), ship.getSize());\n }", "@Override\n public void detectAndSendChanges()\n {\n super.detectAndSendChanges();\n TileEntitySmeltingFurnace.Result result = te.getResult(inventoryPlayer.player.getUniqueID());\n if(this.progress != result.progress)\n {\n this.progress = result.progress;\n for (Object crafter : this.crafters)\n {\n ((ICrafting) crafter).sendProgressBarUpdate(this, 0, this.progress);\n }\n }\n if(result.recipe != this.recipe)\n {\n this.recipe = result.recipe;\n if(result.recipe != null)\n {\n this.time = result.recipe.getTime();\n for (Object crafter : this.crafters)\n {\n if (crafter instanceof EntityPlayerMP)\n {\n ((EntityPlayerMP) crafter).isChangingQuantityOnly = false;\n }\n ((ICrafting) crafter).sendProgressBarUpdate(this, 1, this.time);\n ((ICrafting) crafter).sendSlotContents(this, inventorySlots.size(), recipe.getResult());\n }\n }\n else\n {\n for (Object crafter : this.crafters)\n {\n if (crafter instanceof EntityPlayerMP)\n {\n ((EntityPlayerMP) crafter).isChangingQuantityOnly = false;\n }\n ((ICrafting) crafter).sendSlotContents(this, inventorySlots.size(), null);\n }\n }\n }\n }", "private static void decisionWhenAttacking() {\n\t\tif (isNewAttackState()) {\n\t\t\tchangeStateTo(STATE_ATTACK_PENDING);\n\n\t\t\t// We will try to define place for our army where to attack. It\n\t\t\t// probably will be center around a crucial building like Command\n\t\t\t// Center. But what we really need is the point where to go, not the\n\t\t\t// unit. As long as the point is defined we can attack the enemy.\n\n\t\t\t// If we don't have defined point where to attack it means we\n\t\t\t// haven't yet decided where to go. So it's the war's very start.\n\t\t\t// Define this assault point now. It would be reasonable to relate\n\t\t\t// it to a particular unit.\n\t\t\t// if (!isPointWhereToAttackDefined()) {\n\t\t\tStrategyManager.defineInitialAttackTarget();\n\t\t\t// }\n\t\t}\n\n\t\t// Attack is pending, it's quite \"regular\" situation.\n\t\tif (isGlobalAttackInProgress()) {\n\n\t\t\t// Now we surely have defined our point where to attack, but it can\n\t\t\t// be so, that the unit which was the target has been destroyed\n\t\t\t// (e.g. just a second ago), so we're standing in the middle of\n\t\t\t// wasteland.\n\t\t\t// In this case define next target.\n\t\t\t// if (!isSomethingToAttackDefined()) {\n\t\t\tdefineNextTarget();\n\t\t\t// }\n\n\t\t\t// Check again if continue attack or to retreat.\n\t\t\tboolean shouldAttack = decideIfWeAreReadyToAttack();\n\t\t\tif (!shouldAttack) {\n\t\t\t\tretreatsCounter++;\n\t\t\t\tchangeStateTo(STATE_RETREAT);\n\t\t\t}\n\t\t}\n\n\t\t// If we should retreat... fly you fools!\n\t\tif (isRetreatNecessary()) {\n\t\t\tretreat();\n\t\t}\n\t}", "@Override\r\n\tpublic InputSource resolveEntity(String publicId, String systemId)\r\n\t\t\tthrows SAXException, IOException {\n\t\treturn null;\r\n\t}", "private void obtainProblem(){\n followers = frame.getFollowers();\n followers = Math.min(followers, CreatureFactory.getStrongestMonster().getFollowers() * Formation.MAX_MEMBERS);\n maxCreatures = frame.getMaxCreatures();\n heroes = frame.getHeroes();//is this field needed?\n prioritizedHeroes = frame.getHeroes(Priority.ALWAYS);\n //create boss formation\n LinkedList<Creature> list = new LinkedList<>();\n list.add(frame.getBoss());\n bossFormation = new Formation(list);\n containsRandomBoss = bossFormation.containsRandomHeroes();\n yourRunes = frame.getYourRunes();\n for (int i = 0; i < Formation.MAX_MEMBERS; i++){\n //System.out.println(yourRunes[i]);\n if (!(yourRunes[i] instanceof Nothing)){\n hasRunes = true;\n //System.out.println(\"hasRunes\");\n break;\n }\n }\n \n NHWBEasy = heroes.length == 0 && prioritizedHeroes.length == 0 && frame.getBoss().getMainSkill().WBNHEasy() && !hasRunes && !containsRandomBoss;\n \n }", "public UnloadStrandedTurn(Iterator<Entity> entities) {\n super(IPlayer.PLAYER_NONE);\n\n // Validate input.\n if (null == entities) {\n throw new IllegalArgumentException(\n \"the passed enumeration of entities is null\");\n }\n if (!entities.hasNext()) {\n throw new IllegalArgumentException(\n \"the passed enumeration of entities is empty\");\n }\n\n // Get the first entity.\n Entity entity = entities.next();\n\n // Do we need to get more entities?\n if (entities.hasNext()) {\n\n // It's a bit of a hack, but get the Game from the first\n // entity, and create a temporary array that can hold the\n // IDs of every entity in the game.\n int[] ids = new int[entity.game.getNoOfEntities()];\n int length = 0;\n\n // Store the first entity's ID.\n ids[length++] = entity.getId();\n\n // Walk the list of remaining stranded entities.\n while (entities.hasNext()) {\n ids[length++] = entities.next().getId();\n }\n\n // Create an array that just holds the stranded entity ids.\n entityIds = new int[length];\n System.arraycopy(ids, 0, entityIds, 0, length);\n\n } // End have-more-stranded-entities\n else {\n // There was only one stranded entity.\n entityIds = new int[1];\n entityIds[0] = entity.getId();\n }\n }", "public void getEnemyBattleEffects(Enemy enemy) {\n try {\n Ability chosenAbility = enemy.getLastUsableAbility().clone();\n ArrayList<Entity> players = new ArrayList<>();\n players.add(playerInCombat);\n addEffect(enemy.parse(chosenAbility,players,true));\n } catch (InsufficientResourceException ignored) {\n ;\n }\n }", "public static Player getEffectedPlayers(Player efPlayer) {\r\n //the chosen player will be returned\r\n return efPlayer;\r\n }", "synchronized int attemptSteal(ActivityRecord[] tmp, WorkerContext context,\n StealStrategy s, StealPool pool, ConstellationIdentifier src,\n int size, boolean local) {\n if (src.equals(identifier)) {\n logger.error(\"INTERAL ERROR: attemp steal from self!\",\n new Throwable());\n return 0;\n }\n\n if (!pool.overlap(wrapper.belongsTo())) {\n logger.info(\"attemptSteal: wrong pool!\");\n return 0;\n }\n\n // First steal from the activities that I cannot run myself.\n int offset = wrongContext.steal(context, s, tmp, 0, size);\n if (logger.isDebugEnabled() && !local) {\n logger.debug(\"Stole \" + offset + \" jobs from wrongContext of \"\n + identifier.id + \", size = \" + wrongContext.size());\n }\n\n if (local) {\n\n // Only peers from our own constellation are allowed to steal\n // restricted or stolen jobs.\n if (offset < size) {\n offset += restrictedWrongContext.steal(context, s, tmp, offset,\n size - offset);\n }\n\n if (offset < size) {\n offset += restricted.steal(context, s, tmp, offset,\n size - offset);\n }\n\n if (offset < size) {\n offset += stolen.steal(context, s, tmp, offset, size - offset);\n }\n }\n\n // Anyone may steal a fresh job\n if (offset < size) {\n int n = fresh.steal(context, s, tmp, offset, size - offset);\n offset += n;\n if (logger.isDebugEnabled() && !local) {\n logger.debug(\"Stole \" + n + \" jobs from fresh, size = \"\n + fresh.size());\n }\n\n }\n\n if (offset == 0) {\n // steal failed, no activities stolen\n return 0;\n }\n\n // Success. Trim if necessary\n if (offset != size) {\n tmp = trim(tmp, offset);\n }\n\n // System.out.println(\"ST: \" + identifier + \" returning \" + offset +\n // \" stolen jobs to \" + src);\n\n // Next, remove activities from lookup, and mark and register them as\n // relocated or stolen/exported\n registerLeavingActivities(tmp, offset, src, local);\n\n return offset;\n }", "private static void explore(\n final Deque<AbstractEntity<?>> frontier, \n final Set<String> explored) {\n \n if (frontier.isEmpty()) {\n throw new DefinersExecutorException(\"There is nothing to process.\");\n }\n\n final AbstractEntity<?> entity = frontier.pop();\n final String identity = getEntityIdentity(entity);\n if (explored.contains(identity) || !entity.isInstrumented()) {\n return;\n }\n\n if (!entity.isInitialising()) {\n throw new DefinersExecutorException(format(\"Entity [%s] of type [%s] is not in the 'initialising' phase.\", entity, entity.getClass()));\n }\n \n explored.add(identity);\n\n final boolean isEntityPersisted = entity.isPersisted();\n\n // FIXME please, consider applicability of the following logic (legacy code from EntityUtils.handleMetaProperties method):\n //------------------------------------------------------------------\n // if (!unionEntity && instance.getProperties().containsKey(\"key\")) {\n // final Object keyValue = instance.get(\"key\");\n // if (keyValue != null) {\n // // handle property \"key\" assignment\n // instance.set(\"key\", keyValue);\n // }\n // }\n //------------------------------------------------------------------\n\n // collect properties to process\n final Map<Boolean, List<Field>> propFieldsToProcess = streamRealProperties(entity.getType())\n .filter(field -> !isPropertyProxied(entity, field.getName()) && !isCritOnlySingle(entity.getType(), field.getName()) )\n .collect(partitioningBy(field -> isValueProxied(entity, field)));\n\n // process original values of properties that have id-only-proxy value if the entity is instrumented and persisted\n if (isEntityPersisted) {\n final List<Field> idOnlyProxyPropFields = propFieldsToProcess.get(true);\n for (final Field propField : idOnlyProxyPropFields) {\n final String propName = propField.getName();\n final Object propertyValue = entity.get(propName);\n entity.getProperty(propName).setOriginalValue(propertyValue);\n }\n }\n\n // process non-proxied properties, which excludes non-proxied properties that have id-only-proxy values\n final List<Field> nonProxiedPropFields = propFieldsToProcess.get(false);\n for (final Field propField : nonProxiedPropFields) {\n final String propName = propField.getName();\n final boolean isEntity = AbstractEntity.class.isAssignableFrom(propField.getType());\n final boolean isCollectional = Collection.class.isAssignableFrom(propField.getType());\n\n final Object propertyValue = entity.get(propName);\n\n if (isCollectional) { // handle collectional properties\n if (propertyValue != null) {\n final Collection<?> collection = (Collection<?>) propertyValue;\n for (final Object item: collection) {\n if (item != null && item instanceof AbstractEntity) {\n final AbstractEntity<?> value = (AbstractEntity<?>) item;\n frontier.push(value);\n explore(frontier, explored);\n }\n }\n }\n } else if (isEntity) { // handle entity-typed properties\n if (propertyValue != null) {\n final AbstractEntity<?> value = (AbstractEntity<?>) propertyValue;\n // produce fetch\n frontier.push(value);\n explore(frontier, explored);\n }\n }\n \n // original values and execution of ACE handlers is relevant only for instrumented entities\n handleOriginalValueAndACE(entity.getProperty(propName), propertyValue, isEntityPersisted);\n }\n\n entity.endInitialising();\n }", "protected void attackEntity(Entity par1Entity, float par2) {\n/* 310 */ if (this.attackTime <= 0 && par2 < 3.0F && (par1Entity.func_174813_aQ()).field_72337_e > (func_174813_aQ()).field_72338_b && (par1Entity.func_174813_aQ()).field_72338_b < (func_174813_aQ()).field_72337_e) {\n/* */ \n/* 312 */ if (getIsSummoned()) {\n/* 313 */ ((EntityLivingBase)par1Entity).field_70718_bc = 100;\n/* */ }\n/* */ \n/* 316 */ this.attackTime = 15 + this.field_70146_Z.nextInt(10);\n/* */ \n/* 318 */ double mx = par1Entity.field_70159_w;\n/* 319 */ double my = par1Entity.field_70181_x;\n/* 320 */ double mz = par1Entity.field_70179_y;\n/* 321 */ if (func_70652_k(par1Entity) && \n/* 322 */ !this.field_70170_p.field_72995_K && par1Entity instanceof EntityLivingBase) {\n/* 323 */ ((EntityLivingBase)par1Entity).func_70690_d(new PotionEffect(MobEffects.field_76437_t, 100, 0));\n/* */ }\n/* */ \n/* 326 */ par1Entity.field_70160_al = false;\n/* 327 */ par1Entity.field_70159_w = mx;\n/* 328 */ par1Entity.field_70181_x = my;\n/* 329 */ par1Entity.field_70179_y = mz;\n/* */ \n/* 331 */ func_184185_a(SoundsTC.swarmattack, 0.3F, 0.9F + this.field_70170_p.field_73012_v.nextFloat() * 0.2F);\n/* */ } \n/* */ }", "protected void onImpact(RayTraceResult result) {\n\t\tif (result.entityHit != null) {\n\t\t\tfloat i = 2.5F;\n\n\t\t\tif (result.entityHit instanceof EntityBlizzard) {\n\t\t\t\ti = 0;\n\t\t\t}\n\n result.entityHit.attackEntityFrom(WorldsRetold.HAIL, i);\n\n\t\t\tif (result.entityHit instanceof EntityLivingBase) {\n\t\t\t\tEntityLivingBase target = (EntityLivingBase) result.entityHit;\n\t\t\t\tif (!this.world.isRemote) {\n\t\t\t\t\ttarget.addPotionEffect(new PotionEffect(HailstormPotions.FREEZING, 100, 0));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!this.world.isRemote) {\n\t\t\tthis.world.setEntityState(this, (byte) 3);\n\t\t\tthis.setDead();\n\t\t}\n\t}", "public static void possibleSuicideEffect (boolean isInterchangingMonsters, boolean isDoubleKill) {\r\n SummonedMonster DyingMonster;\r\n SummonedMonster OpposingMonster;\r\n if (isInterchangingMonsters) {\r\n DyingMonster = AttMonster;\r\n OpposingMonster = GuardMonster;\r\n }\r\n else {\r\n DyingMonster = GuardMonster;\r\n OpposingMonster = AttMonster;\r\n }\r\n int effectiveMonsterId = DyingMonster.relevantEffectiveSuicidalMonsterId();\r\n int effectiveMonsterIdOpponent = OpposingMonster.relevantEffectiveSuicidalMonsterId();\r\n boolean isContinuingGame = true;\r\n if (YMonster.getMonsterById(effectiveMonsterId).isBurning) { // effect of Napalm\r\n if (isDoubleKill) {\r\n if (YMonster.getMonsterById(effectiveMonsterIdOpponent).isBurning) {\r\n isContinuingGame = isDealingBurnDamageToBothPlayersAndContinuingGame(Mon.Napalm.NapalmBurnDamage());\r\n }\r\n else {\r\n isContinuingGame = YMonster.dealBurnDamage(Mon.Napalm.NapalmBurnDamage(), OpposingMonster.isPlayersMonster);\r\n }\r\n if (isContinuingGame) {endDamageStep(false);}\r\n } // other suicide effects don't apply, since they don't have a valid target any more\r\n else {\r\n isContinuingGame = YMonster.dealBurnDamage(Mon.Napalm.NapalmBurnDamage(), OpposingMonster.isPlayersMonster);\r\n if (isContinuingGame) {endDamageStep(true);}\r\n }\r\n }\r\n else if (YMonster.getMonsterById(effectiveMonsterId).isDestroying || YMonster.getMonsterById(effectiveMonsterId).isGettingAnotherToHand) {\r\n boolean opposingMonsterIndestructible = OpposingMonster.isIndestructibleByEffect();\r\n boolean opposingMonsterImmuneWhileWinning = OpposingMonster.isImmuneWhileWinning();\r\n boolean opposingMonsterImmune = OpposingMonster.isImmune();\r\n boolean opposingMonsterStillExisting = getNthSummonedMonster(OpposingMonster.sumMonsterNumber, OpposingMonster.isPlayersMonster).isExisting;\r\n if (YMonster.getMonsterById(effectiveMonsterId).isDestroying) { // effect of Suicide Commando\r\n if (opposingMonsterStillExisting && !opposingMonsterIndestructible && !opposingMonsterImmuneWhileWinning && !opposingMonsterImmune) {\r\n YuGiOhJi.informationDialog(OpposingMonster.Monster.monsterName + \" is killed due to the effect of \" + YuGiOhJi.SuicideCommando.monsterName + \".\", \"Passive effect\");\r\n getNthSummonedMonster(OpposingMonster.sumMonsterNumber, OpposingMonster.isPlayersMonster).killMonster();\r\n if (YMonster.getMonsterById(effectiveMonsterIdOpponent).isBurning) { // this part here already contains the case of double kill\r\n isContinuingGame = YMonster.dealBurnDamage(Mon.Napalm.NapalmBurnDamage(), DyingMonster.isPlayersMonster);\r\n } // other suicide effects don't apply, since they don't have a valid target any more\r\n if (isContinuingGame) {\r\n endAttack(false);\r\n }\r\n }\r\n else {\r\n if (isDoubleKill) {endAttack(false);}\r\n else {endDamageStep(true);}\r\n }\r\n }\r\n else if (YMonster.getMonsterById(effectiveMonsterId).isGettingAnotherToHand) { // effect of Back Bouncer (check that one last)\r\n // only do something, if Back Bouncer got destroyed and opposing monster is still there and not immune\r\n // (that means nothing happens here in case of double kill)\r\n if (opposingMonsterStillExisting && !opposingMonsterImmuneWhileWinning && !opposingMonsterImmune && !isDoubleKill) { // at max. one monster gets bounced back\r\n YMonster.effectBackBouncerActivate(getNthSummonedMonster(OpposingMonster.sumMonsterNumber, OpposingMonster.isPlayersMonster));\r\n // still add endAttack(false);? No. The typical ending of the attack happens at the end of YMonster.effectBackBouncerExecute().\r\n }\r\n else {\r\n if (isDoubleKill) {endAttack(false);}\r\n else {endDamageStep(true);}\r\n }\r\n }\r\n }\r\n else {\r\n if (isDoubleKill) {endAttack(false);}\r\n else {endDamageStep(true);}\r\n }\r\n \r\n }", "public void chooseAttackStarter(){\n gameState = GameState.ATTACKERSELECTION;\n currentTerritoriesOfInterest = Player.getTerritoryStringArray(currentPlayer.getAttackStarters());\n notifyObservers();\n }", "@Override\n public boolean shouldRiderSit()\n {\n return entityData.get(SHOULD_SIT);\n }", "private void initializeEntities() {\n arrAttack = new ArrayList<>();\n arrCollidable = new ArrayList<>();\n entities = new ArrayList<>();\n\n arrAttack = scene.entityManager.getEntitiesWithComponents(attackComponent.getClass(), tool.getClass());\n\n arrCollidable = scene.entityManager.getEntitiesWithComponents(collidable.getClass(), Playable.class);\n\n for (int i = 0; i < arrAttack.size(); i++) {\n\n tool = scene.entityManager.getEntityComponentInstance(arrAttack.get(i), tool.getClass());\n\n //A -1 means that the entity is not attacking, at least with that weapon\n if (tool.currentActive != -1) {\n entities.add(arrAttack.get(i));\n }\n }\n\n //adding collidables to entities\n for (int i = 0; i < arrCollidable.size(); i++) {\n entities.add(arrCollidable.get(i));\n }\n }", "GameObject findSeaweed(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Seaweed)return g;\r\n\t\t}\r\n\treturn nullSeaweed;\r\n\t}", "public static CraftEntity getEntity(CraftServer server, Entity entity) {\n/* 199 */ if (entity instanceof EntityLiving)\n/* */ \n/* 201 */ { if (entity instanceof EntityHuman) {\n/* 202 */ if (entity instanceof EntityPlayer) return new CraftPlayer(server, (EntityPlayer)entity); \n/* 203 */ return new CraftHumanEntity(server, (EntityHuman)entity);\n/* */ } \n/* */ \n/* 206 */ if (entity instanceof EntityWaterAnimal) {\n/* 207 */ if (entity instanceof EntitySquid) return new CraftSquid(server, (EntitySquid)entity); \n/* 208 */ if (entity instanceof EntityFish) {\n/* 209 */ if (entity instanceof EntityCod) return new CraftCod(server, (EntityCod)entity); \n/* 210 */ if (entity instanceof EntityPufferFish) return new CraftPufferFish(server, (EntityPufferFish)entity); \n/* 211 */ if (entity instanceof EntitySalmon) return new CraftSalmon(server, (EntitySalmon)entity); \n/* 212 */ if (entity instanceof EntityTropicalFish) return new CraftTropicalFish(server, (EntityTropicalFish)entity); \n/* 213 */ return new CraftFish(server, (EntityFish)entity);\n/* */ } \n/* 215 */ if (entity instanceof EntityDolphin) return new CraftDolphin(server, (EntityDolphin)entity); \n/* 216 */ return new CraftWaterMob(server, (EntityWaterAnimal)entity);\n/* */ } \n/* 218 */ if (entity instanceof EntityCreature)\n/* */ \n/* 220 */ { if (entity instanceof EntityAnimal)\n/* 221 */ { if (entity instanceof EntityChicken) return new CraftChicken(server, (EntityChicken)entity); \n/* 222 */ if (entity instanceof EntityCow) {\n/* 223 */ if (entity instanceof EntityMushroomCow) return new CraftMushroomCow(server, (EntityMushroomCow)entity); \n/* 224 */ return new CraftCow(server, (EntityCow)entity);\n/* */ } \n/* 226 */ if (entity instanceof EntityPig) return new CraftPig(server, (EntityPig)entity); \n/* 227 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityTameableAnimal) {\n/* 228 */ if (entity instanceof EntityWolf) return new CraftWolf(server, (EntityWolf)entity); \n/* 229 */ if (entity instanceof EntityCat) return new CraftCat(server, (EntityCat)entity); \n/* 230 */ if (entity instanceof EntityParrot) return new CraftParrot(server, (EntityParrot)entity); \n/* */ } else {\n/* 232 */ if (entity instanceof EntitySheep) return new CraftSheep(server, (EntitySheep)entity); \n/* 233 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseAbstract)\n/* 234 */ { if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseChestedAbstract)\n/* 235 */ { if (entity instanceof EntityHorseDonkey) return new CraftDonkey(server, (EntityHorseDonkey)entity); \n/* 236 */ if (entity instanceof EntityHorseMule) return new CraftMule(server, (EntityHorseMule)entity); \n/* 237 */ if (entity instanceof EntityLlamaTrader) return new CraftTraderLlama(server, (EntityLlamaTrader)entity); \n/* 238 */ if (entity instanceof EntityLlama) return new CraftLlama(server, (EntityLlama)entity); }\n/* 239 */ else { if (entity instanceof EntityHorse) return new CraftHorse(server, (EntityHorse)entity); \n/* 240 */ if (entity instanceof EntityHorseSkeleton) return new CraftSkeletonHorse(server, (EntityHorseSkeleton)entity); \n/* 241 */ if (entity instanceof EntityHorseZombie) return new CraftZombieHorse(server, (EntityHorseZombie)entity); }\n/* */ }\n/* 243 */ else { if (entity instanceof EntityRabbit) return new CraftRabbit(server, (EntityRabbit)entity); \n/* 244 */ if (entity instanceof EntityPolarBear) return new CraftPolarBear(server, (EntityPolarBear)entity); \n/* 245 */ if (entity instanceof EntityTurtle) return new CraftTurtle(server, (EntityTurtle)entity); \n/* 246 */ if (entity instanceof EntityOcelot) return new CraftOcelot(server, (EntityOcelot)entity); \n/* 247 */ if (entity instanceof EntityPanda) return new CraftPanda(server, (EntityPanda)entity); \n/* 248 */ if (entity instanceof EntityFox) return new CraftFox(server, (EntityFox)entity); \n/* 249 */ if (entity instanceof EntityBee) return new CraftBee(server, (EntityBee)entity); \n/* 250 */ if (entity instanceof EntityHoglin) return new CraftHoglin(server, (EntityHoglin)entity); \n/* 251 */ if (entity instanceof EntityStrider) return new CraftStrider(server, (EntityStrider)entity); \n/* 252 */ return new CraftAnimals(server, (EntityAnimal)entity); }\n/* */ \n/* */ } }\n/* 255 */ else { if (entity instanceof EntityMonster) {\n/* 256 */ if (entity instanceof EntityZombie) {\n/* 257 */ if (entity instanceof EntityPigZombie) return new CraftPigZombie(server, (EntityPigZombie)entity); \n/* 258 */ if (entity instanceof EntityZombieHusk) return new CraftHusk(server, (EntityZombieHusk)entity); \n/* 259 */ if (entity instanceof EntityZombieVillager) return new CraftVillagerZombie(server, (EntityZombieVillager)entity); \n/* 260 */ if (entity instanceof EntityDrowned) return new CraftDrowned(server, (EntityDrowned)entity); \n/* 261 */ return new CraftZombie(server, (EntityZombie)entity);\n/* */ } \n/* 263 */ if (entity instanceof EntityCreeper) return new CraftCreeper(server, (EntityCreeper)entity); \n/* 264 */ if (entity instanceof EntityEnderman) return new CraftEnderman(server, (EntityEnderman)entity); \n/* 265 */ if (entity instanceof EntitySilverfish) return new CraftSilverfish(server, (EntitySilverfish)entity); \n/* 266 */ if (entity instanceof EntityGiantZombie) return new CraftGiant(server, (EntityGiantZombie)entity); \n/* 267 */ if (entity instanceof EntitySkeletonAbstract) {\n/* 268 */ if (entity instanceof EntitySkeletonStray) return new CraftStray(server, (EntitySkeletonStray)entity); \n/* 269 */ if (entity instanceof EntitySkeletonWither) return new CraftWitherSkeleton(server, (EntitySkeletonWither)entity); \n/* 270 */ return new CraftSkeleton(server, (EntitySkeletonAbstract)entity);\n/* */ } \n/* 272 */ if (entity instanceof EntityBlaze) return new CraftBlaze(server, (EntityBlaze)entity); \n/* 273 */ if (entity instanceof EntityWitch) return new CraftWitch(server, (EntityWitch)entity); \n/* 274 */ if (entity instanceof EntityWither) return new CraftWither(server, (EntityWither)entity); \n/* 275 */ if (entity instanceof EntitySpider) {\n/* 276 */ if (entity instanceof EntityCaveSpider) return new CraftCaveSpider(server, (EntityCaveSpider)entity); \n/* 277 */ return new CraftSpider(server, (EntitySpider)entity);\n/* */ } \n/* 279 */ if (entity instanceof EntityEndermite) return new CraftEndermite(server, (EntityEndermite)entity); \n/* 280 */ if (entity instanceof EntityGuardian) {\n/* 281 */ if (entity instanceof EntityGuardianElder) return new CraftElderGuardian(server, (EntityGuardianElder)entity); \n/* 282 */ return new CraftGuardian(server, (EntityGuardian)entity);\n/* */ } \n/* 284 */ if (entity instanceof EntityVex) return new CraftVex(server, (EntityVex)entity); \n/* 285 */ if (entity instanceof EntityIllagerAbstract) {\n/* 286 */ if (entity instanceof EntityIllagerWizard) {\n/* 287 */ if (entity instanceof EntityEvoker) return new CraftEvoker(server, (EntityEvoker)entity); \n/* 288 */ if (entity instanceof EntityIllagerIllusioner) return new CraftIllusioner(server, (EntityIllagerIllusioner)entity); \n/* 289 */ return new CraftSpellcaster(server, (EntityIllagerWizard)entity);\n/* */ } \n/* 291 */ if (entity instanceof EntityVindicator) return new CraftVindicator(server, (EntityVindicator)entity); \n/* 292 */ if (entity instanceof EntityPillager) return new CraftPillager(server, (EntityPillager)entity); \n/* 293 */ return new CraftIllager(server, (EntityIllagerAbstract)entity);\n/* */ } \n/* 295 */ if (entity instanceof EntityRavager) return new CraftRavager(server, (EntityRavager)entity); \n/* 296 */ if (entity instanceof EntityPiglinAbstract) {\n/* 297 */ if (entity instanceof EntityPiglin) return new CraftPiglin(server, (EntityPiglin)entity); \n/* 298 */ if (entity instanceof EntityPiglinBrute) return new CraftPiglinBrute(server, (EntityPiglinBrute)entity); \n/* 299 */ return new CraftPiglinAbstract(server, (EntityPiglinAbstract)entity);\n/* */ } \n/* 301 */ if (entity instanceof EntityZoglin) return new CraftZoglin(server, (EntityZoglin)entity);\n/* */ \n/* 303 */ return new CraftMonster(server, (EntityMonster)entity);\n/* */ } \n/* 305 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityGolem) {\n/* 306 */ if (entity instanceof EntitySnowman) return new CraftSnowman(server, (EntitySnowman)entity); \n/* 307 */ if (entity instanceof EntityIronGolem) return new CraftIronGolem(server, (EntityIronGolem)entity); \n/* 308 */ if (entity instanceof EntityShulker) return new CraftShulker(server, (EntityShulker)entity); \n/* */ } else {\n/* 310 */ if (entity instanceof EntityVillagerAbstract) {\n/* 311 */ if (entity instanceof EntityVillager) return new CraftVillager(server, (EntityVillager)entity); \n/* 312 */ if (entity instanceof EntityVillagerTrader) return new CraftWanderingTrader(server, (EntityVillagerTrader)entity); \n/* 313 */ return new CraftAbstractVillager(server, (EntityVillagerAbstract)entity);\n/* */ } \n/* 315 */ return new CraftCreature(server, (EntityCreature)entity);\n/* */ } }\n/* */ }\n/* 318 */ else { if (entity instanceof EntitySlime) {\n/* 319 */ if (entity instanceof EntityMagmaCube) return new CraftMagmaCube(server, (EntityMagmaCube)entity); \n/* 320 */ return new CraftSlime(server, (EntitySlime)entity);\n/* */ } \n/* */ \n/* 323 */ if (entity instanceof EntityFlying) {\n/* 324 */ if (entity instanceof EntityGhast) return new CraftGhast(server, (EntityGhast)entity); \n/* 325 */ if (entity instanceof EntityPhantom) return new CraftPhantom(server, (EntityPhantom)entity); \n/* 326 */ return new CraftFlying(server, (EntityFlying)entity);\n/* */ } \n/* 328 */ if (entity instanceof EntityEnderDragon) {\n/* 329 */ return new CraftEnderDragon(server, (EntityEnderDragon)entity);\n/* */ }\n/* */ \n/* 332 */ if (entity instanceof EntityAmbient) {\n/* 333 */ if (entity instanceof EntityBat) return new CraftBat(server, (EntityBat)entity); \n/* 334 */ return new CraftAmbient(server, (EntityAmbient)entity);\n/* */ } \n/* 336 */ if (entity instanceof EntityArmorStand) return new CraftArmorStand(server, (EntityArmorStand)entity); \n/* 337 */ return new CraftLivingEntity(server, (EntityLiving)entity); }\n/* */ }\n/* 339 */ else { if (entity instanceof EntityComplexPart) {\n/* 340 */ EntityComplexPart part = (EntityComplexPart)entity;\n/* 341 */ if (part.owner instanceof EntityEnderDragon) return new CraftEnderDragonPart(server, (EntityComplexPart)entity); \n/* 342 */ return new CraftComplexPart(server, (EntityComplexPart)entity);\n/* */ } \n/* 344 */ if (entity instanceof EntityExperienceOrb) return new CraftExperienceOrb(server, (EntityExperienceOrb)entity); \n/* 345 */ if (entity instanceof EntityTippedArrow) return new CraftTippedArrow(server, (EntityTippedArrow)entity); \n/* 346 */ if (entity instanceof EntitySpectralArrow) return new CraftSpectralArrow(server, (EntitySpectralArrow)entity); \n/* 347 */ if (entity instanceof EntityArrow) {\n/* 348 */ if (entity instanceof EntityThrownTrident) return new CraftTrident(server, (EntityThrownTrident)entity); \n/* 349 */ return new CraftArrow(server, (EntityArrow)entity);\n/* */ } \n/* 351 */ if (entity instanceof EntityBoat) return new CraftBoat(server, (EntityBoat)entity); \n/* 352 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityProjectile) {\n/* 353 */ if (entity instanceof EntityEgg) return new CraftEgg(server, (EntityEgg)entity); \n/* 354 */ if (entity instanceof EntitySnowball) return new CraftSnowball(server, (EntitySnowball)entity); \n/* 355 */ if (entity instanceof EntityPotion) return new CraftThrownPotion(server, (EntityPotion)entity); \n/* 356 */ if (entity instanceof EntityEnderPearl) return new CraftEnderPearl(server, (EntityEnderPearl)entity); \n/* 357 */ if (entity instanceof EntityThrownExpBottle) return new CraftThrownExpBottle(server, (EntityThrownExpBottle)entity); \n/* */ } else {\n/* 359 */ if (entity instanceof EntityFallingBlock) return new CraftFallingBlock(server, (EntityFallingBlock)entity); \n/* 360 */ if (entity instanceof EntityFireball) {\n/* 361 */ if (entity instanceof EntitySmallFireball) return new CraftSmallFireball(server, (EntitySmallFireball)entity); \n/* 362 */ if (entity instanceof EntityLargeFireball) return new CraftLargeFireball(server, (EntityLargeFireball)entity); \n/* 363 */ if (entity instanceof EntityWitherSkull) return new CraftWitherSkull(server, (EntityWitherSkull)entity); \n/* 364 */ if (entity instanceof EntityDragonFireball) return new CraftDragonFireball(server, (EntityDragonFireball)entity); \n/* 365 */ return new CraftFireball(server, (EntityFireball)entity);\n/* */ } \n/* 367 */ if (entity instanceof EntityEnderSignal) return new CraftEnderSignal(server, (EntityEnderSignal)entity); \n/* 368 */ if (entity instanceof EntityEnderCrystal) return new CraftEnderCrystal(server, (EntityEnderCrystal)entity); \n/* 369 */ if (entity instanceof EntityFishingHook) return new CraftFishHook(server, (EntityFishingHook)entity); \n/* 370 */ if (entity instanceof EntityItem) return new CraftItem(server, (EntityItem)entity); \n/* 371 */ if (entity instanceof EntityLightning) return new CraftLightningStrike(server, (EntityLightning)entity); \n/* 372 */ if (entity instanceof EntityMinecartAbstract)\n/* 373 */ { if (entity instanceof EntityMinecartFurnace) return new CraftMinecartFurnace(server, (EntityMinecartFurnace)entity); \n/* 374 */ if (entity instanceof EntityMinecartChest) return new CraftMinecartChest(server, (EntityMinecartChest)entity); \n/* 375 */ if (entity instanceof EntityMinecartTNT) return new CraftMinecartTNT(server, (EntityMinecartTNT)entity); \n/* 376 */ if (entity instanceof EntityMinecartHopper) return new CraftMinecartHopper(server, (EntityMinecartHopper)entity); \n/* 377 */ if (entity instanceof EntityMinecartMobSpawner) return new CraftMinecartMobSpawner(server, (EntityMinecartMobSpawner)entity); \n/* 378 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityMinecartRideable) return new CraftMinecartRideable(server, (EntityMinecartAbstract)entity); \n/* 379 */ if (entity instanceof EntityMinecartCommandBlock) return new CraftMinecartCommand(server, (EntityMinecartCommandBlock)entity); }\n/* 380 */ else { if (entity instanceof EntityHanging) {\n/* 381 */ if (entity instanceof EntityPainting) return new CraftPainting(server, (EntityPainting)entity); \n/* 382 */ if (entity instanceof EntityItemFrame) return new CraftItemFrame(server, (EntityItemFrame)entity); \n/* 383 */ if (entity instanceof EntityLeash) return new CraftLeash(server, (EntityLeash)entity); \n/* 384 */ return new CraftHanging(server, (EntityHanging)entity);\n/* */ } \n/* 386 */ if (entity instanceof EntityTNTPrimed) return new CraftTNTPrimed(server, (EntityTNTPrimed)entity); \n/* 387 */ if (entity instanceof EntityFireworks) return new CraftFirework(server, (EntityFireworks)entity); \n/* 388 */ if (entity instanceof EntityShulkerBullet) return new CraftShulkerBullet(server, (EntityShulkerBullet)entity); \n/* 389 */ if (entity instanceof EntityAreaEffectCloud) return new CraftAreaEffectCloud(server, (EntityAreaEffectCloud)entity); \n/* 390 */ if (entity instanceof EntityEvokerFangs) return new CraftEvokerFangs(server, (EntityEvokerFangs)entity); \n/* 391 */ if (entity instanceof EntityLlamaSpit) return new CraftLlamaSpit(server, (EntityLlamaSpit)entity); }\n/* */ \n/* */ } }\n/* 394 */ throw new AssertionError(\"Unknown entity \" + ((entity == null) ? null : entity.getClass()));\n/* */ }", "private Character select_Aim(Character attacker, HashSet set) {\n destination = null;\n if (!(attacker.getEquiped_Weapon() instanceof Staff)) {\n for (Object o : set) {\n if (o instanceof Character) {\n ((Character) o).first_Weapon();\n for (Weapon weapon : attacker.getWeapons()) {\n if (weapon.isDominant(((Character) o).getEquiped_Weapon()) && compare_Range(weapon, (Character) o)) {\n //check position\n for (Node n : generate_SafePosition(weapon, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n attacker.equip(weapon);\n return (Character) o;\n }\n }\n\n }\n }\n }\n }\n for (Object o : set) {\n if (o instanceof Character) {\n for (Weapon weapon : attacker.getWeapons()) {\n if (weapon.isDominant(((Character) o).getEquiped_Weapon())) {\n for (Node n : generate_AttackPosition(weapon, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n attacker.equip(weapon);\n return (Character) o;\n }\n }\n }\n }\n }\n }\n for (Object o : set) {\n if (o instanceof Character) {\n for (Weapon weapon : attacker.getWeapons()) {\n if (compare_Range(weapon, (Character) o)) {\n for (Node n : generate_SafePosition(weapon, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n attacker.equip(weapon);\n return (Character) o;\n }\n }\n }\n }\n }\n }\n //No suitable aim but still aim_set is not empty, so select the weakest one.\n\n return getWeakest(attacker, set);\n\n } else {\n Character aim = null;\n Staff staff = (Staff) attacker.getEquiped_Weapon();\n switch (staff.getMagicEffect().getClass().getName()) {\n case \"Item.HealMagic\":\n int hp = 61;\n for (Object o : set) {\n if (((Character) o).gethp() < hp) {\n for (Node n : generate_AttackPosition(staff, (Character) o)) {\n if (bottom_screen.AI_MoveRange.contains(n) && check_Blank(attacker, n)) {\n destination = n;\n hp = ((Character) o).gethp();\n aim = (Character) o;\n }\n }\n }\n }\n System.out.println(\"temp aim is \" + aim.getName());\n return aim;\n case \"Item.OffensiveMagic\":\n int Hit = 0;\n for (Object o : set) {\n int hit = bottom_screen.calculate_StaffHit((Staff) attacker.getEquiped_Weapon(), attacker, (Character) o);\n if (hit > Hit) {\n Hit = hit;\n aim = (Character) o;\n }\n }\n return aim;\n default:\n return null;\n }\n }\n\n }", "@PostConstruct\n public void restartInterruptedMatching() throws Exception {\n if(getProperties().isCollectTrainingData()) {\n return;\n }\n\n List<State> states;\n states = getMatcherStateRepository().popAllStates();\n if (states != null) {\n setRemainingStates(states);\n for(State state : getRemainingStates()) {\n if (state.getPhase() == (byte) 1) {\n getCache().updatePhase(state.getShopId(), (byte) (state.getPhase() + 1), state.getPhase());\n }\n\n matchShop(state.getShopId(), state.getPhase(), state.getImageIds());\n getRemainingStates().remove(state);\n }\n }\n }", "private static void checkForEnemies() throws GameActionException {\n //No need to hijack code for structure\n if (rc.isWeaponReady()) {\n // basicAttack(enemies);\n HQPriorityAttack(enemies, attackPriorities);\n }\n \n //Old splash damage code\n //Preserve because can use to improve current splash damage code\n //But not so simple like just checking directions, since there are many more \n //locations to consider hitting.\n /*if (numberOfTowers > 4) {\n //can do splash damage\n RobotInfo[] enemiesInSplashRange = rc.senseNearbyRobots(37, enemyTeam);\n if (enemiesInSplashRange.length > 0) {\n int[] enemiesInDir = new int[8];\n for (RobotInfo info: enemiesInSplashRange) {\n enemiesInDir[myLocation.directionTo(info.location).ordinal()]++;\n }\n int maxDirScore = 0;\n int maxIndex = 0;\n for (int i = 0; i < 8; i++) {\n if (enemiesInDir[i] >= maxDirScore) {\n maxDirScore = enemiesInDir[i];\n maxIndex = i;\n }\n }\n MapLocation attackLoc = myLocation.add(directions[maxIndex],5);\n if (rc.isWeaponReady() && rc.canAttackLocation(attackLoc)) {\n rc.attackLocation(attackLoc);\n }\n }\n }//*/\n \n }", "public void enemyAttack() {\n Log.i(\"enemyAttack\", \"Begins\");\n AIisAttacking = true;\n setHit(false);\n\n // Loop until A.I. selects a cell it has not chosen before.\n int counter = 0;\n int myRow = 0, myCol = 0;\n boolean selectionFound = false;\n String aiSelectedHit = \"Empty\";\n Random newRow, newCol;\n\n while (selectionFound || counter < aiAttacks.size()) {\n selectionFound = false;\n // Select random row and col\n newRow = new Random();\n myRow = newRow.nextInt(maxN);\n newCol = new Random();\n myCol = newCol.nextInt(maxN);\n\n aiSelectedHit = myRow + \", \" + myCol;\n\n while (counter < aiAttacks.size()) {\n // Check if grid has been selected before\n if (aiAttacks.get(counter).equals(aiSelectedHit)) {\n selectionFound = true;\n counter = 0;\n break;\n }\n counter++;\n }\n }\n aiAttacks.add(aiSelectedHit);\n\n checkIfOccupied(myRow, myCol);\n\n if (getHit()) {\n ivCell[myRow][myCol].setImageResource(R.drawable.mushroom);\n Log.i(\"AI getHit\", \"\" + getHit() + \", (\" + myRow + \", \" + myCol + \")\");\n } else {\n ivCell[myRow][myCol].setImageResource(R.drawable.crater);\n Log.i(\"AI getHit\", \"\" + getHit() + \", (\" + myRow + \", \" + myCol + \")\");\n }\n AIisAttacking = false;\n Log.i(\"enemyAttack\", \"Ends\");\n }", "private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n enemyName = e.getName();\n \n }\n enemyPresent = true;\n clearExits();\n }\n else{\n setExits(); \n }\n }", "public boolean infect() {\n\t\t/* Remove all events related to this virus */\n\t\tfor (int i = 0; i < Sim.events.size(); i++)\n\t\t\tif (Sim.events.elementAt(i).org.equals(this))\n\t\t\t\tSim.events.elementAt(i).delete = true;\n\n\t\t/* Choose a bacteria to infect */\n\t\tBacterium chosen_bacterium = Sim.bas.get(Sim.randy.nextInt(Sim.bas\n\t\t\t\t.size()));\n\n\t\t/* check probability of successful infection */\n\t\tif ((((1 - chosen_bacterium.prob_surface) * this.prob_surface) >= Sim.randy\n\t\t\t\t.nextDouble())\n\t\t\t\t&& (((1 - chosen_bacterium.prob_enzymes) * this.prob_enzymes) >= Sim.randy\n\t\t\t\t\t\t.nextDouble()) && !chosen_bacterium.infected) {\n\n\t\t\t/* Update virus object */\n\t\t\tthis.current_ba = chosen_bacterium;\n\n\t\t\t/* Update bacteria object */\n\t\t\tchosen_bacterium.infected = true;\n\t\t\tchosen_bacterium.lp = this;\n\n\t\t\t/* Update bas_infected DataSeries in Sim */\n\t\t\tSim.bas_infected++;\n\n\t\t\t/* Create \"switch\" and \"secrete\" event */\n\t\t\tSim.events.add(new Event(this, rate_switch, EVENT_TYPE.SWITCHPHASE));\n\t\t\tSim.events.add(new Event(this, rate_secrete, EVENT_TYPE.SECRETE));\n\n\t\t\treturn true;\n\t\t\t\n\t\t} \n\t\t/* check to see if virus has failed to infect */\n\t\telse{ \n\t\t\n\t\t\t/* Remove this virus from lambda vector and update counters */\n\t\t\tfor (int i = 0; i < Sim.lps.size(); i++) {\n\t\t\t\tif (Sim.lps.elementAt(i).equals(this)) {\n\t\t\t\t\tSim.lps.remove(i);\n\t\t\t\t\tSim.lps_sum_sr -= this.prob_surface;\n\t\t\t\t\tSim.lps_sum_enz -= this.prob_enzymes;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false; \n\t\t}\n\n\t}", "public void setIsInfected(boolean isInfected) {\n this.isInfected = isInfected;\n }", "private void processAttack(Figure currentFigure) {\n\n if (desiredField.isObstacle() && currentFigure.isAttackValid(currentField.getY(), currentField.getX(), desiredField.getY(), desiredField.getX())) {\n desiredField.setObstacle(false);\n showMessageOnScreen(\"The obstacle is destroyed!\");\n } else if ( desiredField.getCurrentFigure() !=null && !desiredField.getCurrentFigure().getOwner().equals(currentPlayer)) {\n\n Figure attackedFigure = desiredField.getCurrentFigure();\n\n if (currentFigure.isAttackValid(currentField.getY(), currentField.getX(), desiredField.getY(), desiredField.getX())) {\n attack(currentFigure, attackedFigure);\n } else {\n showMessageOnScreen(\"Invalid attack\");\n }\n\n\n } else {\n showMessageOnScreen(\"Invalid\");\n\n\n }\n clearChosenFields();\n }", "private static Sittable[] makePeopleWhoCanSit() {\n\t\treturn null;\n\t}", "@Override\n protected void doCheckEffect ()\n {\n List<LivingEntity> entities = getLivingEntities(1.5);\n if (entities.size() > 0)\n {\n for (LivingEntity entity : entities)\n {\n if (entity.getUniqueId() == player.getUniqueId())\n continue;\n\n entity.damage(usesModifier * 2, player);\n\n kill();\n return;\n }\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "private Pit getPit(List<Entity> entities) {\r\n for (Entity e : entities) {\r\n if (e instanceof Pit) return (Pit) e;\r\n }\r\n return null;\r\n }", "public void readyNextAttackers() {\n if(battleAlly == null && battleEnemy == null){\n //if(battleAlly == null && battleEnemy == null && !isBattleOver()){\n battleAlly = battleAllies.get(0);\n battleEnemy = battleEnemies.get(0);\n }\n }", "public void infectedBy(Organism infectingOrganism) {\n\t\tinfectingOrganism._nTotalInfected++;\n\t\t_infectedGeneticCode = infectingOrganism.getGeneticCode();\n\t\t_infectedGeneration = infectingOrganism.getGeneration();\n\t\t_world.organismHasBeenInfected(this, infectingOrganism);\n\t}", "void updateEnemies() {\n getEnemies().forEach(e -> {\n if (!e.isAlive()) {\n e.die();\n SoundPlayer.play(SoundPlayer.enemyDestroyed);\n }\n });\n objectsInMap.removeIf(o -> o instanceof Enemy && !(((Enemy) o).isAlive()));//Removing Dead Enemies\n getEnemies().forEach(e -> e.setTarget(objectsInMap.stream().filter(p -> p.identifier.contains(\"PlayerTank0.\") &&\n p.isBlocking && ((Tank) p).isVisible()).collect(Collectors.toList())));//Giving Possible target to enemies to decide\n }", "public States infectProb(int numInfected, int numInfectedV2, int V2infectivity){\n //TODO maybe adjust probability, currently each infected neighbor adds 5% chance of infection\n int risk = numInfected * 10; // 10/100 (10% chance)\n int riskV2 = numInfectedV2 * V2infectivity;\n int riskVal = rand.nextInt(100);\n int riskValV2 = rand.nextInt(100);\n if(riskVal < risk && riskValV2 < riskV2){ //TODO test this, should trigger if risk of infection for both viruses\n if(riskVal > riskValV2) { //risk for virus 1 higher than virus 2, infected with virus 1\n myAut.numberInfectedV1++;\n myAut.numberSusceptible--;\n return States.Infected;\n }\n else return States.InfectedVirus2;\n } else if(riskVal < risk){ //infected with virus 1\n myAut.numberInfectedV1++;\n myAut.numberSusceptible--;\n return States.Infected;\n } else if(riskValV2 < riskV2){ //infected with virus 2\n return States.InfectedVirus2;\n } else return cellState;\n }", "protected Solution<T> backTrace(State<T> s){\r\n\t\tSolution<T> sol = new Solution<T>(); // Initiate Solution\r\n\t\tState<T> itr = s; // Initiate Iterator as the given state (needs to be the goal state)\r\n\t\tsol.addState(itr);\r\n\t\twhile(itr != null) {\r\n\t\t\titr = itr.getCameFrom();\r\n\t\t\tsol.addState(itr); // add to the solution where it came from\r\n\t\t}\r\n\t\treturn sol;\r\n\t}", "public void updateFakeEntities() { \n for(ViewableEntity playerEntity : replicatedEntites.values()) {\n playerEntity.update();\n }\n }", "@Override\n public List<List<ICrosser>> solveGame() {\n return null;\n }", "public void attackEntity(Entity entityToHit) {\n ItemStack item = tinkerProjectile.getItemStack();\n ItemStack launcher = tinkerProjectile.getLaunchingStack();\n\n // deal damage if we have everything\n if(item.getItem() instanceof ToolCore && this.attacker != null) {\n EntityLivingBase attacker = (EntityLivingBase) this.attacker;\n //EntityLivingBase target = (EntityLivingBase) raytraceResult.entityHit;\n\n // find the actual itemstack in the players inventory\n ItemStack inventoryItem = AmmoHelper.getMatchingItemstackFromInventory(tinkerProjectile.getItemStack(), attacker, false);\n if(inventoryItem.isEmpty() || inventoryItem.getItem() != item.getItem()) {\n // backup, use saved itemstack\n inventoryItem = item;\n }\n\n // for the sake of dealing damage we always ensure that the impact itemstack has the correct broken state\n // since the ammo stack can break while the arrow travels/if it's the last arrow\n boolean brokenStateDiffers = ToolHelper.isBroken(inventoryItem) != ToolHelper.isBroken(item);\n if(brokenStateDiffers) {\n toggleBroken(inventoryItem);\n }\n\n Multimap<String, AttributeModifier> projectileAttributes = null;\n // remove stats from held items\n if(!world.isRemote) {\n unequip(attacker, EntityEquipmentSlot.OFFHAND);\n unequip(attacker, EntityEquipmentSlot.MAINHAND);\n\n // apply stats from projectile\n if(item.getItem() instanceof IProjectile) {\n projectileAttributes = ((IProjectile) item.getItem()).getProjectileAttributeModifier(inventoryItem);\n\n if(launcher.getItem() instanceof ILauncher) {\n ((ILauncher) launcher.getItem()).modifyProjectileAttributes(projectileAttributes, tinkerProjectile.getLaunchingStack(), tinkerProjectile.getItemStack(), tinkerProjectile.getPower());\n }\n\n // factor in power\n projectileAttributes.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(),\n new AttributeModifier(PROJECTILE_POWER_MODIFIER, \"Weapon damage multiplier\", tinkerProjectile.getPower() - 1f, 2));\n\n attacker.getAttributeMap().applyAttributeModifiers(projectileAttributes);\n }\n // deal the damage\n// ToolHelper.attackEntity(item, (ToolCore) item.getItem(), attacker, entityToHit, null);\n// float speed = MathHelper.sqrt(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);\n\n boolean attack = ToolHelper.attackEntity(item, (ToolCore) item.getItem(), attacker, entityToHit, null);\n// if(attack) {\n//// for(IProjectileTrait trait : tinkerProjectile.getProjectileTraits()) {\n//// trait.afterHit(tinkerProjectile.get, this.world, inventoryItem, attacker, entityToHit, (double) 0.0);\n//// }\n//\n// // if on fire, set the entity on fire, like vanilla arrows\n//// if (this.isBurning() && !(entityToHit instanceof EntityEnderman)) {\n//// entityToHit.setFire(5);\n//// }\n// }\n if(brokenStateDiffers) {\n toggleBroken(inventoryItem);\n }\n\n // remove stats from projectile\n // apply stats from projectile\n if(item.getItem() instanceof IProjectile) {\n assert projectileAttributes != null;\n attacker.getAttributeMap().removeAttributeModifiers(projectileAttributes);\n }\n\n // readd stats from held items\n equip(attacker, EntityEquipmentSlot.MAINHAND);\n equip(attacker, EntityEquipmentSlot.OFFHAND);\n }\n }else {\n System.out.println(\"something failed with attacking.\");\n }\n }", "private void handleAttackOnAnotherClient(Battle battle, Coordinates coordinates, String name)\n throws GameOverException, NoSuchUserException {\n Pair<String> users = GAME_DAO.getRegisteredPair(name);\n FiringResult firingResult;\n if (Objects.equals(users.getFirst(), name)) {\n firingResult = battle.shootAtSecondPlayer(coordinates);\n sendMessage(Response.attackResultResponse(users.getFirst(), firingResult));\n sendMessage(Response.attackResultResponse(users.getSecond(), firingResult));\n } else if (Objects.equals(users.getSecond(), name)) {\n firingResult = battle.shootAtFirstPlayer(coordinates);\n sendMessage(Response.attackResultResponse(users.getFirst(), firingResult));\n sendMessage(Response.attackResultResponse(users.getSecond(), firingResult));\n }\n\n }", "public void prisonerUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tcreature.setAttacking(false);\r\n\t\troamArea();\r\n\t\tif (!checkCollision(x, y)) {\r\n\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}", "public Student honorsStudent(){\n Student out = this.students.get(0);\n boolean notFoundChamp = true;\n ArrayList<Student> studentArrayList = this.students;\n for (Student s : studentArrayList) {\n if (!s.getPlayer().getComponent(PlayerComponent.class).isDead() && notFoundChamp) {\n s.setChamp(true);\n out = s;\n notFoundChamp = false;\n } else {\n s.setChamp(false);\n }\n }\n return out;\n }", "public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }", "private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }", "public void chase() throws GameActionException {\n\t\tRobotInfo closestEnemy = dc.getClosestEnemy();\n\t\tif (closestEnemy == null) {\n\t\t\tcurrState = RobotState.RUSH;\n\t\t\treturn;\n\t\t}\n\t\t// attack closest enemy\n\t\tmi.setObjective(closestEnemy.location);\n\t\tmi.setChargeMode();\n\t\tmi.attackMove();\n\t\t// send dead enemy archon IDs\n\t\tsendDeadEnemyArchonIDs();\n\t}", "protected ItemStack dispenseStack(IBlockSource p_82487_1_, ItemStack p_82487_2_)\n {\n EnumFacing var3 = BlockDispenser.func_149937_b(p_82487_1_.getBlockMetadata());\n IPosition var4 = BlockDispenser.func_149939_a(p_82487_1_);\n ItemStack var5 = p_82487_2_.splitStack(1);\n doDispense(p_82487_1_.getWorld(), var5, 6, var3, var4);\n return p_82487_2_;\n }", "public void attack() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].attack();\n }\n }", "@Override\n public DetectPiiEntitiesResult detectPiiEntities(DetectPiiEntitiesRequest request) {\n request = beforeClientExecution(request);\n return executeDetectPiiEntities(request);\n }", "public void reveal(GameState pState, int[] pSpecies, Deadline pDue) {\n for (int i = 0; i < pSpecies.length; i++) {\n if (pDue.remainingMs() < timeBreak)\n break;\n int birdType = pSpecies[i];\n if (birdType == Constants.SPECIES_UNKNOWN)\n continue;\n\n BirdModel bm = birdModelGuesses.get(birdType);\n Bird bird = pState.getBird(i);\n int[] obsSeq = getBirdSeqUntilDeath(bird);\n if (bm == null) {\n birdModelGuesses.put(birdType, new BirdModel(birdType));\n }\n birdModelGuesses.get(birdType).addSequence(obsSeq);\n// System.err.println(\"Bird \" + i + \" is of specie \" + pSpecies[i]);\n }\n\n\n //Räkna Baum welch\n for(BirdModel bm : birdModelGuesses.values()) {\n if (pDue.remainingMs() < timeBreak)\n break;\n int seqCount = bm.savedSequences.size();\n if (seqCount > 0) {\n// int[][] obsSeqs = bm.savedSequences.toArray(new int[seqCount][timePeriod]);\n\n BaumWelch bw = new BaumWelch(bm.model, bm.savedSequences);\n bw.run();\n// bm.emptySavedSequences();\n }\n }\n t=0;\n }", "private ServiceResponseTransform<JsonElement, ResponseResult> getPhysiciansResponseTransform(\n final boolean sponsors)\n {\n return new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result = checkResultFromAuthService(json);\n final JsonElement response = getResponseFromJson(json);\n if (result.success)\n {\n if (checkResultFromDataService(json))\n {\n if (response != null && response.isJsonArray())\n {\n final ArrayList<Physician> physicians =\n new ArrayList<Physician>();\n for (final JsonElement element : response\n .getAsJsonArray())\n {\n if (element.isJsonObject())\n {\n final JsonObject jsonObject =\n element.getAsJsonObject();\n // Append specialties separated by commas.\n String specialties = null;\n if (getJsonArrayFromJson(jsonObject,\n SPECIALTIES) != null)\n {\n for (final JsonElement specialtyElement : getJsonArrayFromJson(\n jsonObject, SPECIALTIES))\n {\n if (specialtyElement.isJsonObject())\n {\n final JsonObject specialtyJson =\n specialtyElement\n .getAsJsonObject();\n final String name =\n getStringFromJson(\n specialtyJson, NAME);\n if (!StringHelper\n .isNullOrEmpty(name))\n {\n if (specialties == null)\n {\n specialties = name;\n }\n else\n {\n specialties +=\n \", \" + name;\n }\n }\n }\n }\n }\n\n // Get insurance plans and carriers.\n final ArrayList<InsurancePlanAndCarrier> insurancePlansAndCarriers =\n new ArrayList<InsurancePlanAndCarrier>();\n if (getJsonArrayFromJson(jsonObject,\n INSURANCE_PLANS) != null)\n {\n for (final JsonElement insuranceElement : getJsonArrayFromJson(\n jsonObject, INSURANCE_PLANS))\n {\n if (insuranceElement.isJsonObject())\n {\n final JsonObject insuranceJson =\n insuranceElement\n .getAsJsonObject();\n final String planId =\n getStringFromJson(\n insuranceJson, PLAN_ID);\n final String planName =\n getStringFromJson(\n insuranceJson,\n PLAN_NAME);\n final String carrierId =\n getStringFromJson(\n insuranceJson,\n CARRIER_ID);\n final String carrierName =\n getStringFromJson(\n insuranceJson,\n CARRIER_NAME);\n final InsurancePlanAndCarrier insurancePlanAndCarrier =\n new InsurancePlanAndCarrier(\n planId, planName,\n carrierId, carrierName);\n insurancePlansAndCarriers\n .add(insurancePlanAndCarrier);\n }\n }\n }\n\n final String avatarURL =\n getStringFromJson(jsonObject,\n AVATAR_URI);\n final String city =\n getStringFromJson(jsonObject, CITY);\n final String country =\n getStringFromJson(jsonObject, COUNTRY);\n final double distance =\n getDoubleFromJson(jsonObject, DISTANCE,\n 0);\n final String firstName =\n getStringFromJson(jsonObject,\n FIRST_NAME);\n final String physicianID =\n getStringFromJson(jsonObject, ID);\n final String lastName =\n getStringFromJson(jsonObject, LAST_NAME);\n final double lat =\n getDoubleFromJson(jsonObject, LAT, 0);\n final double lng =\n getDoubleFromJson(jsonObject, LNG, 0);\n final String middleInitial =\n getStringFromJson(jsonObject,\n MIDDLE_INITIAL);\n final String clinic =\n getStringFromJson(jsonObject,\n PRACTICE_NAME);\n final String state =\n getStringFromJson(jsonObject, STATE);\n final String streetAddress1 =\n getStringFromJson(jsonObject,\n STREET_ADDRESS_ONE);\n final String streetAddress2 =\n getStringFromJson(jsonObject,\n STREET_ADDRESS_TWO);\n final String suffix =\n getStringFromJson(jsonObject, SUFFIX);\n final String zip =\n getStringFromJson(jsonObject, ZIP);\n\n // Parse raw phone number.\n String phoneNumber =\n getStringFromJson(jsonObject,\n PHONE_NUMBER);\n phoneNumber =\n phoneNumber.replaceAll(\"[^\\\\d]\", \"\");\n\n final OfficeLocation officeLocation =\n new OfficeLocation(lat, lng,\n streetAddress1, streetAddress2,\n city, state, zip, country);\n final Physician physician =\n new Physician(physicianID, firstName,\n lastName, middleInitial, suffix,\n avatarURL, specialties, clinic,\n officeLocation, distance,\n phoneNumber, sponsors,\n insurancePlansAndCarriers);\n physicians.add(physician);\n if (sponsors && physicians.size() >= 3)\n {\n break;\n }\n }\n }\n if (physicians.size() > 0)\n {\n // Removes duplicate physicians, I think.\n @SuppressWarnings(\"unchecked\")\n final ArrayList<Physician> duplicate =\n (ArrayList<Physician>)physicians.clone();\n for (final Physician physician : physicians)\n {\n for (final Physician test : physicians)\n {\n if (physician.lastName != null\n && physician.lastName\n .equalsIgnoreCase(test.lastName)\n && physician.firstName != null\n && physician.firstName\n .equalsIgnoreCase(test.firstName))\n {\n if (physician != test)\n { // Remove\n // if\n // not\n // same\n // object\n // reference.\n duplicate.remove(physician);\n }\n }\n\n }\n }\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(PHYSICIAN, duplicate);\n result.parameters = parameters;\n }\n }\n }\n else\n {\n if (response != null)\n {\n try\n {\n result.errorMessage = response.getAsString();\n }\n catch (final ClassCastException e)\n {\n// Crashlytics.logException(e);\n }\n }\n result.success = false;\n result.responseCode =\n ServiceClientConstants.SERVICE_RESPONSE_STATUS_CODE_SERVER_ERROR;\n }\n }\n else if (response != null)\n {\n try\n {\n result.errorMessage = response.getAsString();\n }\n catch (final ClassCastException e)\n {\n// Crashlytics.logException(e);\n }\n }\n LogError(\"getPhysiciansResponseTransform\", result);\n return result;\n }\n };\n }", "public void battleTrainer(PokemonTrainer otherTrainer)\n {\n ArrayList<AbstractPokemon> otherTrainersPokemon = otherTrainer.getPokemon();\n AbstractPokemon myPokemon = caughtPokemon.get(0);\n AbstractPokemon otherPokemon = otherTrainersPokemon.get(0);\n while(caughtPokemon.size() > 0 && otherTrainersPokemon.size() > 0)\n {\n System.out.println(toString() + \" sent out \" + caughtPokemon.get(0).toString() + \".\");\n System.out.println(otherTrainer.toString() + \" sent out \" + otherTrainersPokemon.get(0).toString() + \".\");\n System.out.println(otherTrainer.toString() + \"'s \" + otherPokemon.toString() + \" has \" + otherPokemon.getHealth() + \" HP.\");\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n while (otherPokemon.getHealth() > 0 && myPokemon.getHealth() > 0)\n {\n otherPokemon.takeDamage(myPokemon);\n if(otherPokemon.getHealth() < 0)\n otherPokemon.setHealth(0);\n System.out.println(otherTrainer.toString() + \"'s \" + otherPokemon.toString() + \" has \" + otherPokemon.getHealth() + \" HP.\");\n if(otherPokemon.getHealth() > 0)\n {\n myPokemon.takeDamage(otherPokemon);\n if(myPokemon.getHealth() < 0)\n myPokemon.setHealth(0);\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n }\n }\n if (myPokemon.getHealth() <= 0)\n {\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has fainted!\");\n caughtPokemon.remove(0);\n }\n else\n {\n System.out.println(otherTrainer.toString() + \"'s \" +otherPokemon.toString() + \" has fainted!\");\n otherTrainersPokemon.remove(0);\n }\n if (caughtPokemon.size() > 0)\n {\n System.out.println(toString() + \" sent out \" + caughtPokemon.get(0).toString() + \".\");\n myPokemon = caughtPokemon.get(0);\n }\n if (otherTrainersPokemon.size() > 0)\n {\n System.out.println(otherTrainer.toString() + \" sent out \" + otherTrainersPokemon.get(0).toString() + \".\");\n otherPokemon = otherTrainersPokemon.get(0);\n }\n }\n if (otherTrainersPokemon.size() == 0)\n {\n System.out.println(otherTrainer.toString() + \" has blacked out! \" + otherTrainer.toString() + \" has appeared at a PokeCenter.\");\n otherTrainer.removeSelfFromGrid();\n myPokemon.setHealth(20);\n }\n else\n {\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n removeSelfFromGrid();\n }\n System.out.println(\"\");\n }", "private List<EnrichmentEntity> enrichmentEntities (BirthCaseEnrichment birthCaseEnrichment) {\n ArrayList<EnrichmentEntity> entities = new ArrayList<>();\n\n// for(OrganisationsToInformResponse otir : birthCaseEnrichment.getOrganisationsToInform()) {\n for(OrganisationsToInformResponse otir : birthCaseEnrichment.getOrganisationsToInformResponse()) {\n entities.add(\n createEnrichmentEntity(birthCaseEnrichment.getCouncil(), otir.getOrganisation(), otir.isResponse() ) );\n }\n\n return entities;\n }", "public void checkForHits(){\n\t\tfor(Missile missile : this.missiles){\n\t\t\tif(missile != null && !missile.isDestroyed()){\n\t\t\t\t// Check buildings\n\t\t\t\tfor (int i = 0; i < this.buildings.length; i++) {\n\t\t\t\t\tif(!this.buildings[i].isDestroyed()){\n\t\t\t\t\t\tif (this.buildings[i].getHitBox().intersects(missile.getHitBox())) {\n\t\t\t\t\t\t\tthis.buildings[i].destroy();\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Check turrets\n\t\t\t\tfor (int i = 0; i < this.turrets.length; i++ ) {\n\t\t\t\t\tif(!this.turrets[i].isDestroyed()){\n\t\t\t\t\t\tif (!missile.isFriendly() && this.turrets[i].getHitBox().intersects(missile.getHitBox())) {\n\t\t\t\t\t\t\tthis.turrets[i].destroy();\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Checks Missile vs. Friendly Missile collisions\n\t\t\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\t\t\tif (missile.getHitBox().intersects(fMissile.getHitBox())) {\n\t\t\t\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tthis.incrementScore(this.SCORE_INCREASE);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void cleanStatuses(){\n\n System.out.println(\"cleaning battle statuses: \");\n // for(MovingEntity enemy: enemies){\n for(MovingEntity enemy: battleEnemies){\n for (Status enemyStatus: enemy.getStatusList()) {\n if (enemyStatus != null) enemyStatus.endStatus(enemy);\n }\n }\n\n //for(MovingEntity friendly: friendlies){\n for(MovingEntity friendly: battleAllies){\n System.out.println(\"cleaning battle statuses for: \" + friendly.getID());\n System.out.println(friendly.getStatusIDs().toString());\n if (friendly.getStatusIDs().contains(\"Tranced\")) {\n // kill off tranced entities\n friendly.setCurrHP(0);\n }\n for (Status friendlyStatus: friendly.getStatusList()) {\n System.out.println(\"status was: \" + friendlyStatus.getID());\n if (friendlyStatus != null) friendlyStatus.endStatus(friendly);\n }\n }\n\n }", "@Override\n protected void performActionResults(Action targetingAction) {\n PhysicalCard finalTarget = action.getPrimaryTargetCard(targetGroupId);\n\n // Perform result(s)\n action.appendEffect(\n new FindMissingCharacterEffect(action, finalTarget, false));\n }", "public String attack(Entity e) {\n return super.attack(e) + \"\\n\" + super.attack(e);\n }", "private void targetLostResponse(){\n\t\tswitch(state){\r\n\t\tcase(PURSUIT):\r\n\t\t\tstate=HUNTING;\r\n\t\t\tTile[] targetChoices=adjacentUnseenTiles(level(),targetTile);\r\n\t\t\tif(targetChoices[0]==null)\r\n\t\t\t\tstate=IDLE;\r\n\t\t\ttargetLostResponse();\r\n\t\t\tbreak;\r\n\t\tcase(HUNTING):\t//TODO: after reaching target tile, guess a new target tile, up to a point. (define what that point is) Eventually resume wandering.\r\n\t\t\tif(targetTile!=null){\r\n\t\t\t\tif(!targetTile.equalTo(monster.currentTile)){\r\n\t\t\t\t\tsaveMove();\r\n\t\t\t\t\tmonster.moveTowards(targetTile);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//if(!monster.currentTile.equalTo(plannedPath[0]))\r\n\t\t\t\t\t//\tmonster.moveTowards(plannedPath[0]);\r\n\t\t\t\t\tstate=IDLE;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstate=IDLE;\r\n\t\t\t\ttargetLostResponse();\r\n\t\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase(IDLE):\r\n\t\t\twander();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void solveGame4() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "@Override\n public ArrayList<Entity> getEntities() {\n ArrayList<Entity> enemies = new ArrayList<>();\n\n // Fire Dragon (Near Starting Area)\n enemies.add(new Enemy(\"Dracoflame\", 31, 32) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n // Evil Tree (Far Right)\n enemies.add(new Enemy(\"Trevil\", 90, 40) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n // Evil Mushroom (Bottom Left)\n enemies.add(new Enemy(\"Mycovolence\", 72, 80) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n // Ship\n enemies.add(new Enemy(\"SailingShip\", 11, 76) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n return enemies;\n }", "protected void onImpact(MovingObjectPosition position)\n {\n if (!this.worldObj.isRemote)\n {\n List<PotionEffect> list = ItemPotionCorePotion.instance.getEffects(potion);\n\n if (list != null && !list.isEmpty())\n {\n AxisAlignedBB axisalignedbb = this.getEntityBoundingBox().expand(4.0D, 2.0D, 4.0D);\n List<EntityLivingBase> list1 = this.worldObj.<EntityLivingBase>getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);\n\n if (!list1.isEmpty())\n {\n for (EntityLivingBase entitylivingbase : list1)\n {\n double d0 = this.getDistanceSqToEntity(entitylivingbase);\n\n if (d0 < 16.0D)\n {\n double d1 = 1.0D - Math.sqrt(d0) / 4.0D;\n\n if (entitylivingbase == position.entityHit)\n {\n d1 = 1.0D;\n }\n\n for (PotionEffect potioneffect : list)\n {\n int i = potioneffect.getPotionID();\n\n if (Potion.potionTypes[i].isInstant())\n {\n Potion.potionTypes[i].affectEntity(this, this.getThrower(), entitylivingbase, potioneffect.getAmplifier(), d1);\n }\n else\n {\n int j = (int)(d1 * (double)potioneffect.getDuration() + 0.5D);\n\n if (j > 20)\n {\n entitylivingbase.addPotionEffect(new PotionEffect(i, j, potioneffect.getAmplifier()));\n }\n }\n }\n }\n }\n }\n }\n this.worldObj.playSoundAtEntity(this, \"game.potion.smash\", 1.0F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);\n this.setDead();\n }\n else {\n \tif(!smashed) {\n \t\tdoSmashEffects();\n \t\tsmashed = true;\n \t}\n }\n }" ]
[ "0.57459474", "0.53485864", "0.5287068", "0.52468294", "0.5046443", "0.50372195", "0.49362317", "0.49302536", "0.49196076", "0.4891137", "0.48612097", "0.48254496", "0.4786617", "0.47635657", "0.47347605", "0.4725266", "0.470711", "0.47044894", "0.4692131", "0.46914658", "0.46891478", "0.46829095", "0.46118814", "0.46036613", "0.46011272", "0.45962495", "0.45876542", "0.45844963", "0.45796967", "0.457207", "0.456994", "0.45588648", "0.45566088", "0.45557156", "0.45464277", "0.4544848", "0.4531307", "0.45278445", "0.4515932", "0.45150325", "0.45129916", "0.45128652", "0.44907585", "0.44778267", "0.44772303", "0.44720644", "0.44651157", "0.44615918", "0.44382608", "0.44379038", "0.44367963", "0.4435659", "0.44356254", "0.44286457", "0.4426602", "0.44187754", "0.44181535", "0.44175503", "0.44060123", "0.440517", "0.440188", "0.43947288", "0.43629688", "0.43597788", "0.43588108", "0.43556523", "0.43516377", "0.4345577", "0.43444315", "0.4342844", "0.43399572", "0.4339687", "0.4332488", "0.43298244", "0.43291777", "0.4325117", "0.43224564", "0.432042", "0.43178234", "0.43149713", "0.43146324", "0.43138504", "0.4312535", "0.4311457", "0.43112704", "0.4308749", "0.43085292", "0.43069175", "0.43006852", "0.4298472", "0.42958102", "0.42937618", "0.4293383", "0.42911288", "0.42880553", "0.4287103", "0.42857346", "0.42816138", "0.42718267", "0.427019" ]
0.5380208
1
Batch:B2 PRN:2020016400783091 Date: 26 Aug,2021 Prac07: SYNCHRONIZATION
public interface P7_Q1_Buffer_SJ { public void set(int value) throws InterruptedException; public int get() throws InterruptedException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testExplicitGcAnalsysisParallelSerialOld() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset56.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertTrue(JdkUtil.LogEventType.PARALLEL_SCAVENGE.toString() + \" collector not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.PARALLEL_SCAVENGE));\n Assert.assertTrue(JdkUtil.LogEventType.PARALLEL_SERIAL_OLD.toString() + \" collector not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.PARALLEL_SERIAL_OLD));\n Assert.assertTrue(Analysis.WARN_EXPLICIT_GC_SERIAL_PARALLEL + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_EXPLICIT_GC_SERIAL_PARALLEL));\n Assert.assertTrue(Analysis.ERROR_SERIAL_GC_PARALLEL + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_SERIAL_GC_PARALLEL));\n }", "private void concurrencyWrites2() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites2\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans---put[v2]---------------------------commit\");\n\t\t\tlog.info(\"t2-------------------------------------beginTrans---put[v3]----------abort\");\n\t\t\tlog.info(\"main---get[v2]\");\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx11 t1 = new P0Trx11();\n\t\t\tfinal P0Trx12 t2 = new P0Trx12();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl2.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl2.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl2.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites2\");\n\n\t\t\tif (result.length == 1 && result[0] == 2) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void processSynchronizationPoints(boolean force, String desc) {\n if (_vm == null || _eventThread == null || !_eventThread.isConnected()) {\n return;\n }\n _writer.println(\"// Note: Attempting to process sync points - \" + desc);\n _vm.suspend();\n try {\n List<ReferenceType> classes = _vm.classesByName(\"edu.rice.cs.cunit.SyncPointBuffer\");\n ClassType bufferClass = null;\n ClassObjectReference bufferClassObject = null;\n for (ReferenceType cl : classes) {\n if (cl.name().equals(\"edu.rice.cs.cunit.SyncPointBuffer\")) {\n if (cl instanceof ClassType) {\n bufferClass = (ClassType) cl;\n bufferClassObject = bufferClass.classObject();\n break;\n }\n }\n }\n if (null == bufferClass) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer class.\");\n }\n Field nextObjectIDField = bufferClass.fieldByName(\"_nextObjectID\");\n if (null == nextObjectIDField) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer._nextObjectID field.\");\n }\n Value nextObjectIDValue = bufferClass.getValue(nextObjectIDField);\n if (!(nextObjectIDValue instanceof LongValue)) {\n throw new Error(\"Unexpected type for edu.rice.cs.cunit.SyncPointBuffer._nextObjectID.\");\n }\n LongValue nextObjectID = (LongValue) nextObjectIDValue;\n setProperty(\"nextObjectID\", nextObjectID.longValue());\n Field nextThreadIDField = bufferClass.fieldByName(\"_nextThreadID\");\n if (null == nextThreadIDField) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer._nextThreadID field.\");\n }\n Value nextThreadIDValue = bufferClass.getValue(nextThreadIDField);\n if (!(nextThreadIDValue instanceof LongValue)) {\n throw new Error(\"Unexpected type for edu.rice.cs.cunit.SyncPointBuffer._nextThreadID.\");\n }\n LongValue nextThreadID = (LongValue) nextThreadIDValue;\n setProperty(\"nextThreadID\", nextThreadID.longValue());\n boolean success = _processor.process(force, bufferClass, bufferClassObject, _methodDatabase);\n if (_objectProcessor != null) {\n success &= _objectProcessor.process(force, bufferClass, bufferClassObject, _methodDatabase);\n }\n if (success) {\n setProperty(\"numUpdates\", getNumUpdates() + 1);\n setProperty(\"isUpdateDelayed\", false);\n _transferHistoryModel.add(((Integer) getProperty(\"numSyncPointsInList\")), ((Integer) getProperty(\"numSyncPointsInCompactList\")), System.currentTimeMillis() - _startTime, desc);\n } else {\n _writer.println(\"// Note: Postponing update. Slave VM in edu.rice.cs.cunit.SyncPointBuffer.add or compactAdd.\");\n _writer.flush();\n _eventThread.setSyncPointBufferExitRequestEnable(true, desc);\n setProperty(\"numDelayedUpdates\", getNumDelayedUpdates() + 1);\n setProperty(\"isUpdateDelayed\", true);\n }\n } finally {\n _writer.println(\"// Note: Finished processing sync points - \" + desc);\n int userThreads = (Integer) getProperty(\"userThreads\");\n boolean transferImmediately = (Boolean) getProperty(\"transferImmediately\");\n if ((userThreads == 0) && _includeTermSyncPoints && !transferImmediately) {\n enableImmediateTransfers();\n }\n _vm.resume();\n _infoTableModel.fireTableDataChanged();\n }\n }", "public static void main(String[] args) throws Exception {\n \r\n long beginTime = System.nanoTime();\r\n for (int i = 0; i < 50000000; i++) {\r\n// System.out.println(getFlowNo());\r\n getFlowNo();\r\n \r\n }\r\n long endTime = System.nanoTime();\r\n System.out.println(\"onLineWithTransaction cost:\"+((endTime-beginTime)/1000000000) + \"s \" + ((endTime-beginTime)%1000000000) + \"us\");\r\n// \r\n// System.out.println(System.currentTimeMillis());\r\n// TimeUnit.SECONDS.sleep(3);\r\n// System.out.println(System.currentTimeMillis());\r\n }", "public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(\"sample.txt\"));\n String st;\n /*Created LinkedHashMaps for transactions and locks for keeping the records of both*/\n HashMap<String, HashMap<String, Object>> transactions = new LinkedHashMap<>();\n HashMap<Character, HashMap<String, Object>> locks = new LinkedHashMap<>();\n\n /*Created HashMap for keeping the records for blocked operation with respect to the transactionId which blocks those operation*/\n HashMap<String, LinkedList<String>> blockedOp = new HashMap<>();\n int i = 1;\n ConcurrencyControl cc = new ConcurrencyControl();\n fw = new FileWriter(\"output.txt\");\n while ((st = br.readLine()) != null) {\n st = st.trim();\n int index = st.indexOf(';');\n fw.write(\"Input : \"+ st.substring(0, index) +\"\\n\");\n if (st.charAt(0) == 'b') {\n /* will just create record of current transaction with active state and timestamp */\n cc.beginTransaction(transactions, locks, st, i);\n i++;\n }\n else if (st.charAt(0) == 'r') {\n /* will perform read operation */\n cc.readTransaction(transactions, locks, st, blockedOp);\n }\n else if (st.charAt(0) == 'w') {\n /* will perform read operation */\n cc.writeTransaction(transactions, locks, st, blockedOp);\n }\n else {\n String key = \"T\"+st.charAt(1);\n /* If a transaction is aborted then it will not commit */\n if (!transactions.get(key).get(\"State\").equals(\"Aborted\"))\n cc.endOrAbort(transactions, locks, key, \"Commited\", blockedOp);\n }\n cc.printRecords(transactions, locks);\n }\n System.out.println(\"Output written in output.txt successfully !!\");\n fw.close();\n }", "void requestSequenceNumber() {\r\n\t\t// 부모가 가지고있는 메시지의 순서번호(시작 ~ 끝)를 요청 \r\n\t}", "private void m145781k() {\n int i = this.f119477j.f119583i;\n StringBuilder sb = new StringBuilder(\"PRAGMA synchronous=\");\n sb.append(i);\n mo115433a(sb.toString(), null, null);\n }", "@DISPID(1611005972) //= 0x60060014. The runtime will prefer the VTID if present\n @VTID(47)\n short designTablesSynchronization();", "private void concurrencyWrites8() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites8\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans------------------------------------------put[v2]---abort\");\n\t\t\tlog.info(\"t2-------------------------beginTrans---put[v3]---abort\");\n\t\t\tlog.info(\"main---get[v1]\");\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx71 t1 = new P0Trx71();\n\t\t\tfinal P0Trx72 t2 = new P0Trx72();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl8.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl8.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl8.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites8\");\n\n\t\t\tif (result.length == 1 && result[0] == 1) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void concurrencyWrites4() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites4\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans---put[v2]---------------------------abort\");\n\t\t\tlog.info(\"t2-------------------------------------beginTrans---put[v3]----------abort\");\n\t\t\tlog.info(\"main---get[v1]\");\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx31 t1 = new P0Trx31();\n\t\t\tfinal P0Trx32 t2 = new P0Trx32();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl4.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl4.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl4.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites4\");\n\n\t\t\tif (result.length == 1 && result[0] == 1) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void concurrencyWrites1() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites1\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans---put[v2]---------------------------commit\");\n\t\t\tlog.info(\"t2-------------------------------------beginTrans---put[v3]----------commit\");\n\t\t\tlog.info(\"main---get[v2]\");\n\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx01 t1 = new P0Trx01();\n\t\t\tfinal P0Trx02 t2 = new P0Trx02();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl.await();\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites1\");\n\n\t\t\tif (result.length == 1 && result[0] == 2) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private SyncState() {}", "private void finalise(int regency, CertifiedDecision lastHighestCID,\n HashSet<SignedObject> signedCollects, byte[] propose, int batchSize, boolean iAmLeader) {\n\n int currentCID = lastHighestCID.getCID() + 1;\n logger.debug(\"Final stage of LC protocol\");\n int me = this.controller.getStaticConf().getProcessId();\n Consensus cons = null;\n Epoch e = null;\n\n if (tom.getLastExec() + 1 < lastHighestCID.getCID()) { // is this a delayed replica?\n\n logger.info(\"NEEDING TO USE STATE TRANSFER!! (\" + lastHighestCID.getCID() + \")\");\n\n tempRegency = regency;\n tempLastHighestCID = lastHighestCID;\n tempSignedCollects = signedCollects;\n tempPropose = propose;\n tempBatchSize = batchSize;\n tempIAmLeader = iAmLeader;\n\n execManager.getStoppedMsgs().add(acceptor.getFactory().createPropose(currentCID, 0, propose));\n stateManager.requestAppState(lastHighestCID.getCID());\n\n return;\n\n } /*else if (tom.getLastExec() + 1 == lastHighestCID.getCID()) { // Is this replica still executing the last decided consensus?\n\n System.out.println(\"(Synchronizer.finalise) I'm still at the CID before the most recent one!!! (\" + lastHighestCID.getCID() + \")\");\n\n cons = execManager.getConsensus(lastHighestCID.getCID());\n e = cons.getLastEpoch();\n \n int ets = cons.getEts();\n \n if (e == null || e.getTimestamp() != ets) {\n e = cons.createEpoch(ets, controller);\n } else {\n e.clear();\n }\n \n byte[] hash = tom.computeHash(lastHighestCID.getCIDDecision());\n e.propValueHash = hash;\n e.propValue = lastHighestCID.getCIDDecision();\n\n e.deserializedPropValue = tom.checkProposedValue(lastHighestCID.getCIDDecision(), false);\n cons.decided(e, true); // pass the decision to the delivery thread\n }*/\n \n // install proof of the last decided consensus\n cons = execManager.getConsensus(lastHighestCID.getCID());\n e = null;\n \n Set<ConsensusMessage> consMsgs = lastHighestCID.getConsMessages();\n if (consMsgs == null) consMsgs = new HashSet();\n \n for (ConsensusMessage cm : consMsgs) {\n \n if (e == null) e = cons.getEpoch(cm.getEpoch(), true, controller);\n if (e.getTimestamp() != cm.getEpoch()) {\n logger.warn(\"Strange... proof of last decided consensus contains messages from more than just one epoch\");\n e = cons.getEpoch(cm.getEpoch(), true, controller);\n }\n e.addToProof(cm);\n \n if (cm.getType() == MessageFactory.ACCEPT) {\n e.setAccept(cm.getSender(), cm.getValue());\n }\n \n else if (cm.getType() == MessageFactory.WRITE) {\n e.setWrite(cm.getSender(), cm.getValue());\n }\n \n \n }\n if (e != null) {\n\n logger.info(\"Installed proof of last decided consensus \" + lastHighestCID.getCID());\n \n byte[] hash = tom.computeHash(lastHighestCID.getDecision());\n e.propValueHash = hash;\n e.propValue = lastHighestCID.getDecision();\n e.deserializedPropValue = tom.checkProposedValue(lastHighestCID.getDecision(), false);\n\n // Is this replica still executing the last decided consensus?\n if (tom.getLastExec() + 1 == lastHighestCID.getCID()) {\n \n logger.info(\"I'm still at the CID before the most recent one!!! (\" + lastHighestCID.getCID() + \")\");\n cons.decided(e, true);\n }\n else {\n cons.decided(e, false);\n }\n\n } else {\n logger.info(\"I did not install any proof of last decided consensus \" + lastHighestCID.getCID());\n }\n \n cons = null;\n e = null;\n \n // get a value that satisfies the predicate \"bind\"\n byte[] tmpval = null;\n HashSet<CollectData> selectedColls = lcManager.selectCollects(signedCollects, currentCID, regency);\n\n tmpval = lcManager.getBindValue(selectedColls);\n logger.debug(\"Trying to find a binded value\");\n\n // If such value does not exist, obtain the value written by the new leader\n if (tmpval == null && lcManager.unbound(selectedColls)) {\n logger.debug(\"Did not found a value that might have already been decided\");\n tmpval = propose;\n } else {\n logger.debug(\"Found a value that might have been decided\");\n }\n\n if (tmpval != null) { // did I manage to get some value?\n\n logger.debug(\"Resuming normal phase\");\n lcManager.removeCollects(regency); // avoid memory leaks\n\n // stop the re-transmission of the STOP message for all regencies up to this one\n removeSTOPretransmissions(regency);\n \n cons = execManager.getConsensus(currentCID);\n\n e = cons.getLastEpoch();\n\n int ets = cons.getEts();\n\n //Update current consensus with latest ETS. This may be necessary\n //if I 'jumped' to a consensus instance ahead of the one I was executing\n \n //int currentETS = lcManager.getETS(currentCID, selectedColls);\n //if (currentETS > ets) {\n if (regency > ets) {\n \n //System.out.println(\"(Synchronizer.finalise) Updating consensus' ETS after SYNC (from \" + ets + \" to \" + currentETS +\")\");\n logger.debug(\"Updating consensus' ETS after SYNC (from \" + ets + \" to \" + regency +\")\");\n\n /*do {\n cons.incEts();\n } while (cons.getEts() != currentETS);*/\n \n cons.setETS(regency);\n \n //cons.createEpoch(currentETS, controller);\n cons.createEpoch(regency, controller);\n \n e = cons.getLastEpoch();\n }\n\n // Make sure the epoch is created\n /*if (e == null || e.getTimestamp() != ets) {\n e = cons.createEpoch(ets, controller);\n } else {\n e.clear();\n }*/\n if (e == null || e.getTimestamp() != regency) {\n e = cons.createEpoch(regency, controller);\n } else {\n e.clear();\n }\n \n /********* LEADER CHANGE CODE ********/\n cons.removeWritten(tmpval);\n cons.addWritten(tmpval);\n /*************************************/\n \n byte[] hash = tom.computeHash(tmpval);\n e.propValueHash = hash;\n e.propValue = tmpval;\n\n e.deserializedPropValue = tom.checkProposedValue(tmpval, false);\n\n if (cons.getDecision().firstMessageProposed == null) {\n if (e.deserializedPropValue != null\n && e.deserializedPropValue.length > 0) {\n cons.getDecision().firstMessageProposed = e.deserializedPropValue[0];\n } else {\n cons.getDecision().firstMessageProposed = new TOMMessage(); // to avoid null pointer\n }\n }\n if (this.controller.getStaticConf().isBFT()) {\n e.setWrite(me, hash);\n } else {\n e.setAccept(me, hash);\n\n /********* LEADER CHANGE CODE ********/\n logger.debug(\"[CFT Mode] Setting consensus \" + currentCID + \" QuorumWrite tiemstamp to \" + e.getConsensus().getEts() + \" and value \" + Arrays.toString(hash));\n \t e.getConsensus().setQuorumWrites(hash);\n /*************************************/\n\n }\n\n // resume normal operation\n execManager.restart();\n //leaderChanged = true;\n tom.setInExec(currentCID);\n if (iAmLeader) {\n logger.debug(\"Waking up proposer thread\");\n tom.imAmTheLeader();\n } // waik up the thread that propose values in normal operation\n\n // send a WRITE/ACCEPT message to the other replicas\n if (this.controller.getStaticConf().isBFT()) {\n logger.info(\"Sending WRITE message for CID \" + currentCID + \", timestamp \" + e.getTimestamp() + \", value \" + Arrays.toString(e.propValueHash));\n communication.send(this.controller.getCurrentViewOtherAcceptors(),\n acceptor.getFactory().createWrite(currentCID, e.getTimestamp(), e.propValueHash));\n e.writeSent();\n } else {\n logger.info(\"Sending ACCEPT message for CID \" + currentCID + \", timestamp \" + e.getTimestamp() + \", value \" + Arrays.toString(e.propValueHash));\n communication.send(this.controller.getCurrentViewOtherAcceptors(),\n acceptor.getFactory().createAccept(currentCID, e.getTimestamp(), e.propValueHash));\n e.acceptSent();\n }\n } else {\n logger.warn(\"Sync phase failed for regency\" + regency);\n }\n }", "private void processSynchronizationPointsImmediately(boolean force, String desc) {\n if (_vm == null || _eventThread == null || !_eventThread.isConnected()) {\n return;\n }\n _writer.println(\"// Note: Attempting to process sync point immediately - \" + desc);\n _vm.suspend();\n try {\n List<ReferenceType> classes = _vm.classesByName(\"edu.rice.cs.cunit.SyncPointBuffer\");\n ClassType bufferClass = null;\n ClassObjectReference bufferClassObject = null;\n for (ReferenceType cl : classes) {\n if (cl.name().equals(\"edu.rice.cs.cunit.SyncPointBuffer\")) {\n if (cl instanceof ClassType) {\n bufferClass = (ClassType) cl;\n bufferClassObject = bufferClass.classObject();\n break;\n }\n }\n }\n if (null == bufferClass) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer class.\");\n }\n Field nextObjectIDField = bufferClass.fieldByName(\"_nextObjectID\");\n if (null == nextObjectIDField) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer._nextObjectID field.\");\n }\n Value nextObjectIDValue = bufferClass.getValue(nextObjectIDField);\n if (!(nextObjectIDValue instanceof LongValue)) {\n throw new Error(\"Unexpected type for edu.rice.cs.cunit.SyncPointBuffer._nextObjectID.\");\n }\n LongValue nextObjectID = (LongValue) nextObjectIDValue;\n setProperty(\"nextObjectID\", nextObjectID.longValue());\n Field nextThreadIDField = bufferClass.fieldByName(\"_nextThreadID\");\n if (null == nextThreadIDField) {\n throw new Error(\"Could not find edu.rice.cs.cunit.SyncPointBuffer._nextThreadID field.\");\n }\n Value nextThreadIDValue = bufferClass.getValue(nextThreadIDField);\n if (!(nextThreadIDValue instanceof LongValue)) {\n throw new Error(\"Unexpected type for edu.rice.cs.cunit.SyncPointBuffer._nextThreadID.\");\n }\n LongValue nextThreadID = (LongValue) nextThreadIDValue;\n setProperty(\"nextThreadID\", nextThreadID.longValue());\n boolean success = _processor.processImmediately(force, bufferClass, bufferClassObject, _methodDatabase);\n if (_objectProcessor != null) {\n success &= _objectProcessor.processImmediately(force, bufferClass, bufferClassObject, _methodDatabase);\n }\n if (success) {\n setProperty(\"numUpdates\", getNumUpdates() + 1);\n setProperty(\"isUpdateDelayed\", false);\n _transferHistoryModel.add(((Integer) getProperty(\"numSyncPointsInList\")), ((Integer) getProperty(\"numSyncPointsInCompactList\")), System.currentTimeMillis() - _startTime, desc);\n } else {\n _writer.println(\"// Note: Postponing update. Slave VM in edu.rice.cs.cunit.SyncPointBuffer.add or compactAdd.\");\n _writer.flush();\n _eventThread.setSyncPointBufferExitRequestEnable(true, desc);\n setProperty(\"numDelayedUpdates\", getNumDelayedUpdates() + 1);\n setProperty(\"isUpdateDelayed\", true);\n }\n } finally {\n _writer.println(\"// Note: Finished processing sync points - \" + desc);\n _vm.resume();\n _infoTableModel.fireTableDataChanged();\n }\n }", "public static void main(String[] args) {\n CorrelatorAutoSideband casb = new CorrelatorAutoSideband();\n casb.createTestData();\n ByteBuffer bb = casb.serial();\n\n System.err.println(\"ByteBuffer(CorrelatorAutoSideband) length= \" +\n bb.array().length);\n\n CorrelatorAutoSideband casb2 = new CorrelatorAutoSideband();\n casb2.deserial(bb);\n if (casb.isEqual(casb2))\n System.err.println(\"CorrelatorAutoSideband serial/deserial: PASSED\");\n else\n System.err.println(\"CorrelatorAutoSideband serial/deserial: FAILED\");\n }", "private void concurrencyWrites7() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites7\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans------------------------------------------put[v2]---commit\");\n\t\t\tlog.info(\"t2-------------------------beginTrans---put[v3]---abort\");\n\t\t\tlog.info(\"main---get[v2]\");\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx61 t1 = new P0Trx61();\n\t\t\tfinal P0Trx62 t2 = new P0Trx62();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl7.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl7.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl7.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites7\");\n\n\t\t\tif (result.length == 1 && result[0] == 2) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run() {\n \t\t\tif (! (curConnType.equals(\"disulf\") || curConnType.equals(\"covale\"))) {\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tAtom atom1 = findAtom(curAsymId1, curSeqId1, curAtomName1, curCompId1, curInsertionCode1, curAltId1);\n \t\t\tAtom atom2 = findAtom(curAsymId2, curSeqId2, curAtomName2, curCompId2, curInsertionCode2, curAltId2);\n \n \t\t\tif (atom1 == null) {\n \t\t\t\tSystem.err.println(\"Error parsing _struct_conn record. Atom cannot be found: \");\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr1_auth_asym_id : \" + curAsymId1);\t\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr1_auth_seq_id : \" + curSeqId1);\t\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr1_label_atom_id : \" + curAtomName1);\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr1_label_comp_id : \" + curCompId1);\n \t\t\t\tSystem.err.println(\"_struct_conn.pdbx_ptnr1_PDB_ins_code : \" + curInsertionCode1);\n \t\t\t\tSystem.err.println(\"_struct_conn.pdbx_ptnr1_label_alt_id : \" + curAltId1);\n \t\t\t}\n \t\t\tif (atom2 == null) {\n \t\t\t\tSystem.err.println(\"Error parsing _struct_conn record. Atom cannot be found: \");\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr2_auth_asym_id : \" + curAsymId2);\t\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr2_auth_seq_id : \" + curSeqId2);\t\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr2_label_atom_id : \" + curAtomName2);\n \t\t\t\tSystem.err.println(\"_struct_conn.ptnr2_label_comp_id : \" + curCompId2);\n \t\t\t\tSystem.err.println(\"_struct_conn.pdbx_ptnr2_PDB_ins_code : \" + curInsertionCode2);\n \t\t\t\tSystem.err.println(\"_struct_conn.pdbx_ptnr2_label_alt_id : \" + curAltId2);\n \t\t\t}\n \t\t\t\n \t\t // ignore bonds to metals. They will be handled separately in the MBT viewers\n \t\t\tif (isMetal(atom1) || isMetal(atom2)) {\n \t\t\t\treturn;\n \t\t\t}\n \t\t\n \t\t\tBond bond = new Bond(atom1, atom2);\n bondVector.add(bond);\n \t\t\tclearParsingFlag(eIsParsing.STRUCT_CONN);\n \t\t}", "@PostConstruct\n public void init() {\n prevBatchTime = transients.now();\n }", "private void concurrencyWrites6() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites6\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans------------------------------------------put[v2]---abort\");\n\t\t\tlog.info(\"t2-------------------------beginTrans---put[v3]---commit\");\n\t\t\tlog.info(\"main---get[v3]\");\n\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx51 t1 = new P0Trx51();\n\t\t\tfinal P0Trx52 t2 = new P0Trx52();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl6.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl6.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl6.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites6\");\n\n\t\t\tif (result.length == 1 && result[0] == 3) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void m4999b() {\n if (C1663a.m5979a().m5993N()) {\n int timeStamp = (int) ((System.currentTimeMillis() + ((long) TimeZone.getDefault().getRawOffset())) / 1000);\n Builder builder = CarlifeConnectTimeSync.newBuilder();\n builder.setTimeStamp(timeStamp);\n CarlifeConnectTimeSync proto = builder.build();\n C1212c command = new C1212c(true);\n command.m4199b(proto.toByteArray());\n command.m4203d(proto.getSerializedSize());\n command.m4201c(C1253f.f3541H);\n C1663a.m5979a().m6017a(Message.obtain(null, command.m4202d(), 1001, 0, command));\n }\n }", "private void concurrencyWrites3() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites3\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans---put[v2]---------------------------abort\");\n\t\t\tlog.info(\"t2-------------------------------------beginTrans---put[v3]----------commit\");\n\t\t\tlog.info(\"main---get[v1]\");\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx21 t1 = new P0Trx21();\n\t\t\tfinal P0Trx22 t2 = new P0Trx22();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl3.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl3.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl3.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites3\");\n\n\t\t\tif (result.length == 1 && result[0] == 1) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run() {\n\t\t\tBundle b = null;\n\t\t\tint i = 0, j;\n\t\t\ttry {\n\t\t\t\tfor (i = 0; i < t.length; i++) {\n\t\t\t\t\tString timestamp = \"\";\n\t\t\t\t\twhile (t[i].noOfBundles == 0)\n\t\t\t\t\t\t;\n\t\t\t\t\tfor (j = seq; j < t[i].noOfBundles; j++) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t// System.out.println(\"SEQ ACK : \" +\n\t\t\t\t\t\t\t// t[i].noOfBundles);\n\t\t\t\t\t\t\tbyte[] buffer = (byte[]) ois.readObject();\n\t\t\t\t\t\t\tb = new Bundle();\n\t\t\t\t\t\t\tb.parse(buffer);\n\t\t\t\t\t\t\tif (b.bundleNumber == b.noOfBundles - 1)\n\t\t\t\t\t\t\t\ttimestamp = new String(b.data);\n\t\t\t\t\t\t\t// System.out.println(\"ACK WAITING : \" + j);\n\t\t\t\t\t\t\t// System.out.println(\"ACK RECEIVED : \"\n\t\t\t\t\t\t\t// + b.bundleNumber);\n\t\t\t\t\t\t\t// System.out.println(t[i].transactionId + \" \"\n\t\t\t\t\t\t\t// + t[i].noOfBundles + \" \" + j);\n\t\t\t\t\t\t} while (!b.isAcknowledgement(t[i].transactionId,\n\t\t\t\t\t\t\t\tt[i].noOfBundles, j));\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"TIMESTAMP RECEIVED IS :\" +\n\t\t\t\t\t// timestamp);\n\t\t\t\t\tlong ts = Long.parseLong(timestamp);\n\t\t\t\t\tdh.setSynced(ts, t[i].records);\n\t\t\t\t\tseq = 0;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tObjectOutputStream fout;\n\t\t\t\ttry {\n\t\t\t\t\tfout = new ObjectOutputStream(new FileOutputStream(\n\t\t\t\t\t\t\tnew File(storagePath + \"/push\")));\n\t\t\t\t\tfout.writeObject(t);\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\t// System.out.println(\"Written broken transaction!!!\");\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\tfout.close();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"ACK ENDED\");\n\t\t}", "protected IBDS()\r\n {\r\n \tthis.modifyBuffer = new StringBuffer(300); // all update operations belong to this only\r\n this.nodeList = new ArrayList<int []>(50);\r\n this.lastUpdated = System.nanoTime();\r\n //this.objectArray = new ArrayList();\r\n }", "public void parseGCRecord(double timestamp, String line) {\n /*\n (STW) [GC (CMS Initial Mark) [1 CMS-initial-mark: 53400K(344064K)] 79710K(498944K), 0.0032015 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]\n [CMS-concurrent-mark-start]\n [CMS-concurrent-mark: 0.005/0.005 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]\n [CMS-concurrent-preclean-start]\n [CMS-concurrent-preclean: 0.002/0.002 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]\n [CMS-concurrent-abortable-preclean-start]\n [CMS-concurrent-abortable-preclean: 0.711/1.578 secs] [Times: user=5.00 sys=0.12, real=1.58 secs]\n (STW) [GC (CMS Final Remark) [YG occupancy: 97189 K (154880 K)]2017-11-20T19:55:50.907+0800: 4.148: [Rescan (parallel) , 0.0325130 secs]2017-11-20T19:55:50.940+0800: 4.181: [weak refs processing, 0.0000407 secs]2017-11-20T19:55:50.940+0800: 4.181: [class unloading, 0.0059425 secs]2017-11-20T19:55:50.946+0800: 4.187: [scrub symbol table, 0.0044211 secs]2017-11-20T19:55:50.950+0800: 4.191: [scrub string table, 0.0006347 secs][1 CMS-remark: 118936K(344064K)] 216125K(498944K), 0.0442861 secs] [Times: user=0.13 sys=0.00, real=0.04 secs]\n [CMS-concurrent-sweep-start]\n [CMS-concurrent-sweep: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]\n [CMS-concurrent-reset-start]\n [CMS-concurrent-reset: 0.108/0.109 secs] [Times: user=0.34 sys=0.05, real=0.11 secs]\n */\n\n // Full GC\n if (line.startsWith(\"[CMS-concurrent\") || line.startsWith(\"[GC (CMS Initial Mark)\") || line.startsWith(\"[GC (CMS Final Remark)\")) {\n\n if (line.startsWith(\"[GC (CMS Initial Mark)\")) {\n // 53400K(344064K)] 79710K(498944K), 0.0032015 secs\n String CMS_initial_mark = line.substring(line.indexOf(':') + 2, line.indexOf(\"secs]\") + 4);\n double oCurrentMB = computeMB(CMS_initial_mark.substring(0, CMS_initial_mark.indexOf('K')));\n double oldMB = computeMB(CMS_initial_mark.substring(CMS_initial_mark.indexOf(\"(\") + 1, CMS_initial_mark.indexOf(\"K)\")));\n\n // 79710K(498944K), 0.0032015 secs\n CMS_initial_mark = CMS_initial_mark.substring(CMS_initial_mark.indexOf(']') + 2);\n double heapCurrentMB = computeMB(CMS_initial_mark.substring(0, CMS_initial_mark.indexOf('K')));\n double heapMB = computeMB(CMS_initial_mark.substring(CMS_initial_mark.indexOf('(') + 1, CMS_initial_mark.indexOf(\"K)\")));\n\n double fgcSeconds = Double.parseDouble(CMS_initial_mark.substring(CMS_initial_mark.indexOf(\", \") + 2, CMS_initial_mark.indexOf(\" secs\")));\n\n// double yCurrentMB = heapCurrentMB - oCurrentMB;\n// double youngMB = heapMB - oldMB;\n//\n// usage.addYoungUsage(timestamp, yCurrentMB, youngMB, \"FGC\");\n //usage.addOldUsage(timestamp, oCurrentMB, oldMB, \"FGC\");\n\n } else if (line.startsWith(\"[GC (CMS Final Remark)\")) {\n // 97189 K (154880 K)\n String YG_occupancy = line.substring(line.indexOf(':') + 2, line.indexOf(']'));\n double yCurrentMB = computeMB(YG_occupancy.substring(0, YG_occupancy.indexOf('K') - 1));\n double youngMB = computeMB(YG_occupancy.substring(YG_occupancy.indexOf(\"(\") + 1, YG_occupancy.indexOf(\"K)\") - 1));\n\n // 118936K(344064K)] 216125K(498944K), 0.0442861 secs] [Times: user=0.13 sys=0.00, real=0.04 secs]\n String CMS_remark = line.substring(line.indexOf(\"CMS-remark\") + 12);\n double oCurrentMB = computeMB(CMS_remark.substring(0, CMS_remark.indexOf('K')));\n double oldMB = computeMB(CMS_remark.substring(CMS_remark.indexOf(\"(\") + 1, CMS_remark.indexOf(\"K)\")));\n\n // 216125K(498944K), 0.0442861 secs] [Times: user=0.13 sys=0.00, real=0.04 secs]\n CMS_remark = CMS_remark.substring(CMS_remark.indexOf(']') + 2);\n double heapCurrentMB = computeMB(CMS_remark.substring(0, CMS_remark.indexOf('K')));\n double heapMB = computeMB(CMS_remark.substring(CMS_remark.indexOf('(') + 1, CMS_remark.indexOf(\"K)\")));\n\n double fgcSeconds = Double.parseDouble(CMS_remark.substring(CMS_remark.indexOf(\", \") + 2, CMS_remark.indexOf(\" secs\")));\n\n //usage.addYoungUsage(timestamp, yCurrentMB, youngMB, \"FGC\");\n //usage.addOldUsage(timestamp, oCurrentMB, oldMB, \"FGC\");\n\n }\n }\n // Young GC\n /*\n [GC (Allocation Failure) 2017-11-20T19:55:51.305+0800: 4.546: [ParNew: 148472K->15791K(154880K), 0.0136927 secs] 267406K->137259K(498944K), 0.0138721 secs] [Times: user=0.04 sys=0.01, real=0.02 secs]\n [GC (GCLocker Initiated GC) 2017-11-20T19:55:52.467+0800: 5.708: [ParNew: 2611K->1477K(154880K), 0.0019634 secs] 132956K->131822K(498944K), 0.0020074 secs] [Times: user=0.02 sys=0.00, real=0.00 secs]\n CMS: abort preclean due to time 2017-11-20T19:57:04.539+0800: 77.780: [CMS-concurrent-abortable-preclean: 0.651/5.055 secs] [Times: user=0.65 sys=0.01, real=5.06 secs]\n */\n else if (line.startsWith(\"[GC\") && line.contains(\"[ParNew:\")){\n String ygcCause = line.substring(line.indexOf('(') + 1, line.indexOf(')'));\n\n // 148472K->15791K(154880K), 0.0136927 secs\n String ParNew = line.substring(line.indexOf(\"[ParNew:\") + 9, line.indexOf(']'));\n // System.out.println(ParNew);\n double yBeforeMB = computeMB(ParNew.substring(0, ParNew.indexOf('K')));\n double yAfterMB = computeMB(ParNew.substring(ParNew.indexOf('>') + 1, ParNew.indexOf(\"K(\")));\n double youngMB = computeMB(ParNew.substring(ParNew.indexOf('(') + 1, ParNew.indexOf(\"K)\")));\n\n double ygcSeconds = Double.parseDouble(ParNew.substring(ParNew.indexOf(\", \") + 2, ParNew.indexOf(\" secs\")));\n // System.out.println(ParNew);\n // System.out.println(\" yBeforeMB = \" + yBeforeMB + \", yAfterMB = \" + yAfterMB + \", youngMB = \" + youngMB);\n\n // 267406K->137259K(498944K), 0.0138721 secs\n String heapUsage = line.substring(line.indexOf(\"]\") + 2, line.indexOf(\"] [Times:\"));\n double heapBeforeMB = computeMB(heapUsage.substring(0, heapUsage.indexOf('K')));\n double heapAfterMB = computeMB(heapUsage.substring(heapUsage.indexOf('>') + 1, heapUsage.indexOf(\"K(\")));\n double heapMB = computeMB(heapUsage.substring(heapUsage.indexOf('(') + 1, heapUsage.indexOf(\"K)\")));\n\n double oldBeforeMB = heapBeforeMB - yBeforeMB;\n double oldAfterMB = heapAfterMB - yAfterMB;\n double oldMB = heapMB - youngMB;\n\n //usage.addYoungUsage(timestamp, yBeforeMB, youngMB, \"YGC\");\n //usage.addYoungUsage(timestamp, yAfterMB, youngMB, \"\");\n\n if (oldAfterMB != oldBeforeMB) {\n //usage.addOldUsage(timestamp, oldBeforeMB, oldMB, \"YGC\");\n //usage.addOldUsage(timestamp, oldAfterMB, oldMB, \"\");\n }\n\n }\n }", "private void processSYNC(byte[] payload, int regency) {\n \n CertifiedDecision lastHighestCID = null;\n int currentCID = -1;\n HashSet<SignedObject> signedCollects = null;\n byte[] propose = null;\n int batchSize = -1;\n\n ByteArrayInputStream bis;\n ObjectInputStream ois;\n\n try { // deserialization of the message content\n\n bis = new ByteArrayInputStream(payload);\n ois = new ObjectInputStream(bis);\n\n lastHighestCID = (CertifiedDecision) ois.readObject();\n signedCollects = (HashSet<SignedObject>) ois.readObject();\n propose = (byte[]) ois.readObject();\n batchSize = ois.readInt();\n\n lcManager.setCollects(regency, signedCollects);\n \n currentCID = lastHighestCID.getCID() + 1;\n\n // Is the predicate \"sound\" true? Is the certificate for LastCID valid?\n if (lcManager.sound(lcManager.selectCollects(regency, currentCID)) && (!controller.getStaticConf().isBFT() || lcManager.hasValidProof(lastHighestCID))) {\n\n finalise(regency, lastHighestCID, signedCollects, propose, batchSize, false);\n }\n\n ois.close();\n bis.close();\n\n } catch (IOException | ClassNotFoundException ex) {\n logger.error(\"Could not deserialize SYNC message\", ex);\n }\n }", "public void syncStream() {\n JCudaDriver.cuStreamSynchronize(stream);}", "private void startSynchronization(int nextReg) {\n\n boolean condition;\n ObjectOutputStream out = null;\n ByteArrayOutputStream bos = null;\n \n if (this.controller.getStaticConf().isBFT()) {\n condition = lcManager.getStopsSize(nextReg) > this.controller.getCurrentViewF();\n } else {\n condition = lcManager.getStopsSize(nextReg) > 0;\n }\n \n // Ask to start the synchronizations phase if enough messages have been received already\n if (condition && lcManager.getNextReg() == lcManager.getLastReg()) {\n \n logger.debug(\"Initialize synch phase\");\n requestsTimer.Enabled(false);\n requestsTimer.stopTimer();\n\n lcManager.setNextReg(lcManager.getLastReg() + 1); // define next timestamp\n\n int regency = lcManager.getNextReg();\n\n // store information about message I am going to send\n lcManager.addStop(regency, this.controller.getStaticConf().getProcessId());\n\n //execManager.stop(); // stop execution of consensus\n\n //Get requests that timed out and the requests received in STOP messages\n //and add those STOPed requests to the client manager\n addSTOPedRequestsToClientManager();\n List<TOMMessage> messages = getRequestsToRelay();\n\n try { // serialize conent to send in the STOP message\n bos = new ByteArrayOutputStream();\n out = new ObjectOutputStream(bos);\n\n // Do I have messages to send in the STOP message?\n if (messages != null && messages.size() > 0) {\n\n //TODO: If this is null, there was no timeout nor STOP messages.\n //What shall be done then?\n out.writeBoolean(true);\n byte[] serialized = bb.makeBatch(messages, 0, 0, controller.getStaticConf().getUseSignatures() == 1);\n out.writeObject(serialized);\n } else {\n out.writeBoolean(false);\n logger.warn(\"Strange... did not include any request in my STOP message for regency \" + regency);\n }\n\n out.flush();\n bos.flush();\n\n byte[] payload = bos.toByteArray();\n out.close();\n bos.close();\n\n // send message STOP\n logger.info(\"Sending STOP message to install regency \" + regency + \" with \" + (messages != null ? messages.size() : 0) + \" request(s) to relay\");\n\n LCMessage stop = new LCMessage(this.controller.getStaticConf().getProcessId(), TOMUtil.STOP, regency, payload);\n requestsTimer.setSTOP(regency, stop); // make replica re-transmit the stop message until a new regency is installed\n communication.send(this.controller.getCurrentViewOtherAcceptors(), stop);\n\n } catch (IOException ex) {\n logger.error(\"Could not deserialize STOP message\", ex);\n }\n }\n \n if (this.controller.getStaticConf().isBFT()) {\n condition = lcManager.getStopsSize(nextReg) > (2 * this.controller.getCurrentViewF());\n } else {\n condition = lcManager.getStopsSize(nextReg) > this.controller.getCurrentViewF();\n }\n \n // Did the synchronization phase really started?\n //if (lcManager.getStopsSize(nextReg) > this.reconfManager.getQuorum2F() && lcManager.getNextReg() > lcManager.getLastReg()) {\n if (condition && lcManager.getNextReg() > lcManager.getLastReg()) {\n \n if (!execManager.stopped()) execManager.stop(); // stop consensus execution if more than f replicas sent a STOP message\n\n logger.debug(\"Installing regency \" + lcManager.getNextReg());\n lcManager.setLastReg(lcManager.getNextReg()); // define last timestamp\n\n int regency = lcManager.getLastReg();\n\n // avoid memory leaks\n lcManager.removeStops(nextReg);\n lcManager.clearCurrentRequestTimedOut();\n lcManager.clearRequestsFromSTOP();\n\n requestsTimer.Enabled(true);\n requestsTimer.setShortTimeout(-1);\n requestsTimer.startTimer();\n\n //int leader = regency % this.reconfManager.getCurrentViewN(); // new leader\n int leader = lcManager.getNewLeader();\n int in = tom.getInExec(); // cid to execute\n int last = tom.getLastExec(); // last cid decided\n\n execManager.setNewLeader(leader);\n\n // If I am not the leader, I have to send a STOPDATA message to the elected leader\n if (leader != this.controller.getStaticConf().getProcessId()) {\n\n try { // serialize content of the STOPDATA message\n\n bos = new ByteArrayOutputStream();\n out = new ObjectOutputStream(bos);\n \n Consensus cons = null;\n \n // content of the last decided CID\n if (last > -1) cons = execManager.getConsensus(last);\n\n //Do I have info on my last executed consensus?\n if (cons != null && cons.getDecisionEpoch() != null && cons.getDecisionEpoch().propValue != null) {\n \n out.writeBoolean(true);\n out.writeInt(last);\n //byte[] decision = exec.getLearner().getDecision();\n\n byte[] decision = cons.getDecisionEpoch().propValue;\n Set<ConsensusMessage> proof = cons.getDecisionEpoch().getProof();\n\n out.writeObject(decision);\n out.writeObject(proof);\n // TODO: WILL BE NECESSARY TO ADD A PROOF!!!\n\n } else {\n out.writeBoolean(false);\n \n ////// THIS IS TO CATCH A BUG!!!!!\n if (last > -1) {\n logger.debug(\"[DEBUG INFO FOR LAST CID #1]\");\n\n if (cons == null) {\n if (last > -1) logger.debug(\"No consensus instance for cid \" + last);\n\n }\n else if (cons.getDecisionEpoch() == null) {\n logger.debug(\"No decision epoch for cid \" + last);\n } else {\n logger.debug(\"epoch for cid: \" + last + \": \" + cons.getDecisionEpoch().toString());\n\n if (cons.getDecisionEpoch().propValue == null) {\n logger.debug(\"No propose for cid \" + last);\n } else {\n logger.debug(\"Propose hash for cid \" + last + \": \" + Base64.encodeBase64String(tom.computeHash(cons.getDecisionEpoch().propValue)));\n }\n }\n }\n\n }\n\n if (in > -1) { // content of cid in execution\n\n cons = execManager.getConsensus(in);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n\n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"(Synchronizer.startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n TimestampValuePair quorumWrites;\n if (cons.getQuorumWrites() != null) {\n\n quorumWrites = cons.getQuorumWrites();\n\n } else {\n\n quorumWrites = new TimestampValuePair(0, new byte[0]);\n }\n\n HashSet<TimestampValuePair> writeSet = cons.getWriteSet();\n\n //CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, ets, quorumWrites, writeSet);\n CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, regency, quorumWrites, writeSet);\n\n SignedObject signedCollect = tom.sign(collect);\n\n out.writeObject(signedCollect);\n\n } else {\n\n cons = execManager.getConsensus(last + 1);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n \n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"(Synchronizer.startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n //CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, ets, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, regency, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n \n SignedObject signedCollect = tom.sign(collect);\n\n out.writeObject(signedCollect);\n\n }\n\n out.flush();\n bos.flush();\n\n byte[] payload = bos.toByteArray();\n out.close();\n bos.close();\n\n int[] b = new int[1];\n b[0] = leader;\n\n logger.info(\"Sending STOPDATA of regency \" + regency);\n // send message SYNC to the new leader\n communication.send(b,\n new LCMessage(this.controller.getStaticConf().getProcessId(), TOMUtil.STOPDATA, regency, payload));\n\n\t\t//TODO: Turn on timeout again?\n } catch (IOException ex) {\n logger.error(\"Could not deserialize STOPDATA message\", ex);\n }\n\n // the replica might have received a SYNC that was out of context at the time it was received, but now can be processed\n Set<LCMessage> sync = getOutOfContextLC(TOMUtil.SYNC, regency);\n\n logger.debug(\"Checking if there are out of context SYNC for regency \" + regency);\n\n if (sync.size() > 0) {\n logger.info(\"Processing out of context SYNC for regency \" + regency);\n } else {\n logger.info(\"No out of context SYNC for regency \" + regency);\n }\n\n for (LCMessage m : sync) {\n if (m.getSender() == execManager.getCurrentLeader()) {\n processSYNC(m.getPayload(), regency);\n return; // makes no sense to continue, since there is only one SYNC message\n }\n }\n\n } else { // If leader, I will store information that I would send in a SYNC message\n\n logger.debug(\"I'm the leader for this new regency\");\n CertifiedDecision lastDec = null;\n CollectData collect = null;\n\n Consensus cons = null;\n \n //Content of the last decided CID\n if (last > -1) cons = execManager.getConsensus(last);\n \n //Do I have info on my last executed consensus?\n if (cons != null && cons.getDecisionEpoch() != null && cons.getDecisionEpoch().propValue != null) { \n //byte[] decision = exec.getLearner().getDecision();\n\n\n byte[] decision = cons.getDecisionEpoch().propValue;\n Set<ConsensusMessage> proof = cons.getDecisionEpoch().getProof();\n\n lastDec = new CertifiedDecision(this.controller.getStaticConf().getProcessId(), last, decision, proof);\n // TODO: WILL BE NECESSARY TO ADD A PROOF!!!??\n\n } else { \n lastDec = new CertifiedDecision(this.controller.getStaticConf().getProcessId(), last, null, null);\n\n ////// THIS IS TO CATCH A BUG!!!!!\n if (last > -1) {\n logger.debug(\"[DEBUG INFO FOR LAST CID #2]\");\n\n if (cons == null) {\n if (last > -1) logger.debug(\"No consensus instance for cid \" + last);\n\n }\n else if (cons.getDecisionEpoch() == null) {\n logger.debug(\"No decision epoch for cid \" + last);\n } else {\n logger.debug(\"epoch for cid: \" + last + \": \" + cons.getDecisionEpoch().toString());\n }\n if (cons.getDecisionEpoch().propValue == null) {\n logger.debug(\"No propose for cid \" + last);\n } else {\n logger.debug(\"Propose hash for cid \" + last + \": \" + Base64.encodeBase64String(tom.computeHash(cons.getDecisionEpoch().propValue)));\n }\n }\n \n }\n lcManager.addLastCID(regency, lastDec);\n\n if (in > -1) { // content of cid being executed\n cons = execManager.getConsensus(in);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n\n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"(Synchronizer.startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n TimestampValuePair quorumWrites;\n\n if (cons.getQuorumWrites() != null) {\n\n quorumWrites = cons.getQuorumWrites();\n } else {\n quorumWrites = new TimestampValuePair(0, new byte[0]);\n }\n\n HashSet<TimestampValuePair> writeSet = cons.getWriteSet();\n\n //collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, ets, quorumWrites, writeSet);\n collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, regency, quorumWrites, writeSet);\n\n } else {\n\n cons = execManager.getConsensus(last + 1);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n\n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n //collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, ets, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, regency, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n }\n\n SignedObject signedCollect = tom.sign(collect);\n\n lcManager.addCollect(regency, signedCollect);\n\n // the replica might have received STOPDATAs that were out of context at the time they were received, but now can be processed\n Set<LCMessage> stopdatas = getOutOfContextLC(TOMUtil.STOPDATA, regency);\n\n logger.debug(\"Checking if there are out of context STOPDATAs for regency \" + regency);\n if (stopdatas.size() > 0) {\n logger.debug(\"Processing \" + stopdatas.size() + \" out of context STOPDATAs for regency \" + regency);\n } else {\n logger.debug(\"No out of context STOPDATAs for regency \" + regency);\n }\n\n for (LCMessage m : stopdatas) {\n processSTOPDATA(m, regency);\n }\n\n }\n\n }\n }", "private void m20202a(boolean checkCache) throws IOException {\n C8469e nextSpan;\n C8489j nextDataSpec;\n C8469e nextSpan2;\n C8487i nextDataSource;\n long length;\n long length2;\n if (this.f18665u) {\n nextSpan = null;\n } else if (this.f18651g) {\n try {\n nextSpan = this.f18645a.mo25946c(this.f18660p, this.f18661q);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new InterruptedIOException();\n }\n } else {\n nextSpan = this.f18645a.mo25944b(this.f18660p, this.f18661q);\n }\n if (nextSpan == null) {\n nextDataSource = this.f18648d;\n Uri uri = this.f18656l;\n int i = this.f18658n;\n long j = this.f18661q;\n C8489j jVar = new C8489j(uri, i, null, j, j, this.f18662r, this.f18660p, this.f18659o);\n nextDataSpec = jVar;\n nextSpan2 = nextSpan;\n } else if (nextSpan.f18671d) {\n Uri fileUri = Uri.fromFile(nextSpan.f18672e);\n long filePosition = this.f18661q - nextSpan.f18669b;\n long length3 = nextSpan.f18670c - filePosition;\n long j2 = this.f18662r;\n if (j2 != -1) {\n length2 = Math.min(length3, j2);\n } else {\n length2 = length3;\n }\n C8489j nextDataSpec2 = new C8489j(fileUri, this.f18661q, filePosition, length2, this.f18660p, this.f18659o);\n nextDataSource = this.f18646b;\n nextDataSpec = nextDataSpec2;\n nextSpan2 = nextSpan;\n } else {\n if (nextSpan.mo25963f()) {\n length = this.f18662r;\n } else {\n length = nextSpan.f18670c;\n long j3 = this.f18662r;\n if (j3 != -1) {\n length = Math.min(length, j3);\n }\n }\n Uri uri2 = this.f18656l;\n int i2 = this.f18658n;\n long j4 = this.f18661q;\n nextDataSpec = new C8489j(uri2, i2, null, j4, j4, length, this.f18660p, this.f18659o);\n if (this.f18647c != null) {\n nextSpan2 = nextSpan;\n nextDataSource = this.f18647c;\n } else {\n C8487i nextDataSource2 = this.f18648d;\n this.f18645a.mo25939a(nextSpan);\n nextSpan2 = null;\n nextDataSource = nextDataSource2;\n }\n }\n this.f18667w = (this.f18665u || nextDataSource != this.f18648d) ? Long.MAX_VALUE : this.f18661q + 102400;\n if (checkCache) {\n C8514e.m20490b(m20206c());\n if (nextDataSource != this.f18648d) {\n try {\n m20204b();\n } catch (Throwable th) {\n Throwable e2 = th;\n if (nextSpan2.mo25962e()) {\n this.f18645a.mo25939a(nextSpan2);\n }\n throw e2;\n }\n } else {\n return;\n }\n }\n if (nextSpan2 != null && nextSpan2.mo25962e()) {\n this.f18663s = nextSpan2;\n }\n this.f18654j = nextDataSource;\n this.f18655k = nextDataSpec.f18720g == -1;\n long resolvedLength = nextDataSource.mo25917a(nextDataSpec);\n C8475k mutations = new C8475k();\n if (this.f18655k && resolvedLength != -1) {\n this.f18662r = resolvedLength;\n C8474j.m20259a(mutations, this.f18661q + this.f18662r);\n }\n if (m20208e()) {\n this.f18657m = this.f18654j.getUri();\n if (true ^ this.f18656l.equals(this.f18657m)) {\n C8474j.m20260a(mutations, this.f18657m);\n } else {\n C8474j.m20258a(mutations);\n }\n }\n if (m20209f()) {\n this.f18645a.mo25942a(this.f18660p, mutations);\n }\n }", "public void testSerialization() throws Exception {\n AtomicLong x = new AtomicLong();\n AtomicLong y = serialClone(x);\n assertNotSame(x, y);\n x.set(-22);\n AtomicLong z = serialClone(x);\n assertNotSame(y, z);\n assertEquals(-22, x.get());\n assertEquals(0, y.get());\n assertEquals(-22, z.get());\n }", "public static byte[] firstOutputStep(byte[] S){\n\t\t\n\t\tRC4 rc4 = new RC4(S,false);\n\t\tbyte[] state = rc4.KeySchedule(S);\n\t\tbyte[] prgaOutput = rc4.PRGA(state, 512);\n\t\tbyte[] bufferNew = new byte[256];\n\t\tbufferNew = Arrays.copyOfRange(prgaOutput, 256, 512); //Retrieving the packet after removing the 4 byte sequence value.\n\t\treturn bufferNew;\n\t}", "@Override\n\tpublic void stablize() {\n\n\t}", "public static void main(String[] args) throws Exception {\n var env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // Set to 1 for now\n //env.setParallelism(1);\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n Properties props = new PropReader().getProps();\n props.setProperty(\"bootstrap.servers\", KAFKA_ADDRESS);\n props.setProperty(\"group.id\", KAFKA_GROUP);\n //env.enableCheckpointing(50000);\n //env.getConfig().setLatencyTrackingInterval(1000);\n env.getConfig().setLatencyTrackingInterval(5L);\n\n\n // Create tbe Kafka Consumer here\n FlinkKafkaConsumer010<Order> consumer = new FlinkKafkaConsumer010<Order>(IN_TOPIC,\n new OrderDeserializationSchema()\n , props);\n // uid - Grafana , name - flink.\n DataStream<Order> orderStream = env.addSource(consumer).name(\"Subscribe Trades/Orders\").uid(\"Subscribe_Trades_Orders\");// .setParallelism(1)\n // printOrTest(orderStream);\n // create a Producer for positionsByAct\n FlinkKafkaProducer010<FlatOrder> producer =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC,\n new FlatOrderSerializationSchema());\n producer.setWriteTimestampToKafka(true);\n\n //// create a Producer for positionsBySymbol\n FlinkKafkaProducer010<FlatOrder> producer2 =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC_1,\n new FlatOrderSerializationSchema());\n producer2.setWriteTimestampToKafka(true);\n\n // Allocations are by Cusip, so keyBy Cusip.\n // flatten the structure by extracting allocations for account, sub account,cusip and quantity .\n // Convert to RichFlatMap and add a guage maetric.\n DataStream<FlatOrder> flatmapStream = orderStream\n .keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage())\n .name(\"flatten the orders\").uid(\"flatten the orders\").assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator())\n .keyBy(flatOrder -> flatOrder.getCusip())\n .window(TumblingEventTimeWindows.of(Time.minutes(1)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n // .setParallelism(4)\n //.process(new AddQty()).name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n flatmapStream.addSink(producer2).name(\" Publish to positionsBySymbol\").uid(\"Publish to positionsBySymbol\");// publish to positionsBySymbol.\n printOrTest(flatmapStream);\n\n // Task # 2 : PositionByAccount\n DataStream<FlatOrder> flatCompositeMapStream = orderStream.keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage()).assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator()).name(\"Assign Watermarks\").uid(\"Assign Watermarks\")\n .keyBy(flatOrder -> new CompositeKey( flatOrder.getCusip(),flatOrder.getAccount(),flatOrder.getSubAccount()))\n .window(TumblingEventTimeWindows.of(Time.minutes(3)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\").uid(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\");\n printOrTest(flatCompositeMapStream);\n flatCompositeMapStream.addSink(producer).name(\"Publish to positionsByAct\").uid(\"Publish to positionsByAct\");\n\n env.execute(\"Order Processor \");\n }", "public final void mo4601u(byte[] bArr, int i) {\n AppMethodBeat.m2504i(4436);\n synchronized (C40031m.this.kzi) {\n try {\n if (C40031m.this.kzf == 2 && C40031m.this.sPL != null) {\n long currentTimeMillis;\n if (C40031m.this.sPO == 1) {\n C40031m.this.sPM = System.currentTimeMillis();\n C40031m.this.sPN = C40031m.this.sPM;\n C40031m.this.sPO = 0;\n } else {\n currentTimeMillis = System.currentTimeMillis();\n C40031m.this.sPP = (int) ((currentTimeMillis - C40031m.this.sPN) - ((long) (C40031m.sPZ * 20)));\n C40031m.this.sPM = currentTimeMillis;\n }\n if (C40031m.this.kzg <= 10) {\n C40031m.this.kzg = 92;\n }\n C40031m.this.kzg = ((C40031m.this.sPL.cIq() + 24) + (C40031m.this.kzg * 3)) / 4;\n if (C40031m.this.kzh == 1) {\n C40031m.this.sPR = C40031m.this.sPL.cIn();\n if (C40031m.this.sPR >= C40031m.this.kzg) {\n C40031m.this.sPR = C40031m.this.sPR - C40031m.this.kzg;\n }\n C40031m.this.kzg = C40031m.this.sPR;\n C40031m.this.kzh = 0;\n } else {\n C40031m.this.kzg = 0;\n }\n if (1 == C40031m.this.kzk) {\n C40031m.this.kzk = 0;\n C40031m.this.kzl = System.currentTimeMillis();\n C46317a.Logi(\"MicroMsg.Voip.VoipDeviceHandler\", \"amyfwang,first record\");\n } else {\n currentTimeMillis = System.currentTimeMillis();\n long l = currentTimeMillis - C40031m.this.kzl;\n if (l > 1000) {\n C46317a.Logi(\"MicroMsg.Voip.VoipDeviceHandler\", \"amyfwang,error,deltaTime:\".concat(String.valueOf(l)));\n }\n C40031m.this.kzl = currentTimeMillis;\n }\n C40031m.this.sNl.sPp.recordCallback(bArr, i, C40031m.this.kzg);\n C40031m.sPZ++;\n }\n } finally {\n AppMethodBeat.m2505o(4436);\n }\n }\n }", "public static void main(String[] args) throws IOException {\n PopulationModelDefinition def = new PopulationModelDefinition(\n new EvaluationEnvironment(),\n ChordModel::generatePopulationRegistry,\n ChordModel::getRules,\n ChordModel::getMeasures,\n (e, r) -> new HashMap<>(),\n ChordModel::states);\n def.setParameter(\"N\",new SibillaDouble(1000));\n PopulationModel model = def.createModel();\n\n List<Trajectory> trajectories = new LinkedList();\n byte[] trajectoryBytes = BytearrayToFile.fromFile(\".\", \"chordTrajectory_Samplings100_Deadline600_N1000_Samples6\");\n\n Trajectory toAdd = TrajectorySerializer.deserialize(trajectoryBytes, model);\n Sample firstSample =(Sample) toAdd.getData().get(0);\n PopulationState firstState = (PopulationState) firstSample.getValue();\n System.out.printf(\"Population model registry size: %d\", model.stateByteArraySize() / 4);\n System.out.printf(\"\\nChord with externalizable\\nSamples: %d\\nState population vector size: %d\", toAdd.getData().size(), firstState.getPopulationVector().length);\n trajectories.add(toAdd);\n\n ComputationResult result = new ComputationResult(trajectories);\n\n byte[] customBytes = ComputationResultSerializer.serialize(result, model);\n byte[] customBytesCompressed = Compressor.compress(customBytes);\n byte[] apacheBytes = Serializer.getSerializer(SerializerType.APACHE).serialize(result);\n byte[] apacheBytesCompressed = Compressor.compress(apacheBytes);\n byte[] fstBytes = Serializer.getSerializer(SerializerType.FST).serialize(result);\n byte[] fstBytesCompressed = Compressor.compress(fstBytes);\n\n System.out.printf(\"\\nCustom bytes: %d\\nApache bytes: %d\\nFst bytes: %d\", customBytes.length, apacheBytes.length, fstBytes.length);\n System.out.printf(\"\\nCustom bytes compressed: %d\\nApache bytes compressed: %d\\nFst bytes compressed: %d\", customBytesCompressed.length, apacheBytesCompressed.length, fstBytesCompressed.length);\n }", "long getTimeBoltBBoltC();", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "protected void sequence_Parallele2(ISerializationContext context, Parallele2 semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "private void createObject(SystemMetadata systemMetadata) throws RetryableException, UnrecoverableException, SynchronizationFailed {\n\n logger.info(buildStandardLogMessage(null, \"Start CreateObject\"));\n\n Identifier d1Identifier = new Identifier();\n d1Identifier.setValue(systemMetadata.getIdentifier().getValue());\n\n // All though this should take place when the object is processed, it needs to be\n // performed here due to the way last DateSysMetadataModified is used to\n // determine the next batch of records to retrieve from a MemberNode\n // 9-2-2015: rnahf: I don't think we should be bumping the modification date\n // in v2 (especially), and since we now can deactivate sync processing,\n // the bump might be a very big bump forward in time.\n \n // systemMetadata.setDateSysMetadataModified(new Date());\n//\n try { \n ObjectFormat objectFormat = nodeCommunications.getCnCore().getFormat(\n systemMetadata.getFormatId());\n\n SystemMetadataValidator.schemaValidateSystemMetadata(systemMetadata);\n validateChecksum(systemMetadata);\n\n if ((objectFormat != null) && !objectFormat.getFormatType().equalsIgnoreCase(\"DATA\")) {\n // this input stream gets used as parameter to the create call.\n \n InputStream sciMetaStream = null;\n try {\n // get the scimeta object and then feed it to metacat\n int tryAgain = 0;\n boolean needSciMetadata = true;\n do {\n try {\n logger.debug(task.taskLabel() + \" getting ScienceMetadata \");\n Object mnRead = nodeCommunications.getMnRead();\n if (mnRead instanceof MNRead) {\n sciMetaStream = ((MNRead) mnRead).get(session, systemMetadata.getIdentifier());\n needSciMetadata = false;\n } else if (mnRead instanceof org.dataone.service.mn.tier1.v1.MNRead) {\n sciMetaStream = ((org.dataone.service.mn.tier1.v1.MNRead) mnRead).get(session,\n systemMetadata.getIdentifier());\n needSciMetadata = false;\n }\n } catch (NotAuthorized ex) {\n if (tryAgain < 2) {\n ++tryAgain;\n logger.error(buildStandardLogMessage(ex, \" Got NotAuthorized on MNRead.get(), retrying...\"));\n // interruptableSleep(5000L);\n } else {\n // only way to get out of loop if NotAuthorized keeps getting thrown\n throw ex;\n }\n } catch (ServiceFailure ex) {\n if (tryAgain < 6) {\n ++tryAgain;\n logger.error(buildStandardLogMessage(ex, \"Got ServiceFailure on MNRead.get(), retrying...\"));\n //(5000L);\n } else {\n // only way to get out of loop if ServiceFailure keeps getting thrown\n throw ex;\n }\n }\n } while (needSciMetadata);\n\n // while good intentioned, this may be too restrictive for \"RESOURCE\" formats\n // see: https://redmine.dataone.org/issues/6848\n // commenting out for now. BRL 20150211\n /*\n validateResourceMap(objectFormat, sciMetaStream);\n */\n logger.debug(task.taskLabel() + \" Calling CNCreate...\");\n// cis = new CountingInputStream(sciMetaStream);\n d1Identifier = nodeCommunications.getCnCore().create(session, d1Identifier, sciMetaStream,\n systemMetadata);\n logger.debug(task.taskLabel() + \" ... CNCreate finished\");\n } finally {\n IOUtils.closeQuietly(sciMetaStream);\n// IOUtils.closeQuietly(cis);\n }\n } else {\n logger.debug(task.taskLabel() + \" Registering SystemMetadata...\");\n nodeCommunications.getCnCore().registerSystemMetadata(session, d1Identifier,\n systemMetadata);\n logger.debug(task.taskLabel() + \" ... Registered SystemMetadata\");\n }\n logger.info(buildStandardLogMessage(null, \"Completed CreateObject\"));\n } catch (ServiceFailure e) {\n extractRetryableException(e);\n throw new UnrecoverableException(task.getPid() + \" cn.createObject failed\",e);\n \n } catch (BaseException e) {\n throw new UnrecoverableException(task.getPid() + \" cn.createObject failed: \" + e.getDescription(),e);\n }\n }", "@Test\n public void undoCkpointTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n final int trimPosition = tableSize / 2;\n final int snapshotPosition = trimPosition + 2;\n\n CountDownLatch latch = new CountDownLatch(1);\n\n t(1, () -> {\n\n CorfuRuntime rt = getNewRuntime();\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n\n // first, populate the map\n for (int i = 0; i < tableSize; i++) {\n tableA.insert(String.valueOf(i), (long) i);\n }\n\n // now, take a checkpoint and perform a prefix-trim\n MultiCheckpointWriter<PersistentCorfuTable<String, Long>> mcw1 = new MultiCheckpointWriter<>();\n mcw1.addMap(tableA);\n mcw1.appendCheckpoints(rt, author);\n\n // Trim the log\n Token token = new Token(rt.getLayoutView().getLayout().getEpoch(), trimPosition);\n rt.getAddressSpaceView().prefixTrim(token);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n\n latch.countDown();\n } finally {\n rt.shutdown();\n }\n });\n\n AtomicBoolean trimExceptionFlag = new AtomicBoolean(false);\n\n // start a new runtime\n t(2, () -> {\n latch.await();\n CorfuRuntime rt = getNewRuntime();\n\n PersistentCorfuTable<String, Long> localm2A = openTable(rt, streamNameA);\n\n // start a snapshot TX at position snapshotPosition\n Token timestamp = new Token(0L, snapshotPosition - 1);\n rt.getObjectsView().TXBuild()\n .type(TransactionType.SNAPSHOT)\n .snapshot(timestamp)\n .build()\n .begin();\n\n // finally, instantiate the map for the snapshot and assert is has the right state\n try {\n localm2A.get(String.valueOf(0));\n } catch (TransactionAbortedException te) {\n assertThat(te.getAbortCause()).isEqualTo(AbortCause.TRIM);\n // this is an expected behavior!\n trimExceptionFlag.set(true);\n }\n\n try {\n if (!trimExceptionFlag.get()) {\n assertThat(localm2A.size())\n .isEqualTo(snapshotPosition);\n\n // check map positions 0..(snapshot-1)\n for (int i = 0; i < snapshotPosition; i++) {\n assertThat(localm2A.get(String.valueOf(i)))\n .isEqualTo(i);\n }\n\n // check map positions snapshot..(mapSize-1)\n for (int i = snapshotPosition; i < tableSize; i++) {\n assertThat(localm2A.get(String.valueOf(i))).isNull();\n }\n }\n } finally {\n rt.shutdown();\n }\n });\n }", "private void m33138b() {\n synchronized (this.f26017d) {\n TaskExecutor.m3867a().mo11809a(11);\n }\n }", "public static void doit(String fileName) {\n\t\tSystem.out.println(\"****矩阵形式-正域(减)******\"+fileName+\"上POSD的运行时间\"+\"***********\");\r\n\t\tlong time[]=new long[8];\r\n\t\tint t=0;//time下标\r\n\t\t\r\n\t\tList<Integer> preRED=null;\r\n\t List<Integer> nowRED = null;\r\n\r\n\t // 创建DataPreprocess对象data1 \r\n\t DataPreprocess data1=new DataPreprocess(fileName);\r\n\t \r\n\t int k=0,sn=data1.get_origDSNum();\r\n\t int m1=sn/10,m=m1>0?m1:1;\r\n\t int count=sn-(int)(0.2*sn);//保持与增加对象的约简结果一致\r\n\t data1.dataRatioSelect(0.2);\r\n\t \r\n\t preRED=new ArrayList<Integer>();\r\n\t nowRED=new ArrayList<Integer>();\r\n\t \r\n\t ArrayList<ArrayList<Integer>> addData=data1.get_origDS();//交换位置,把原数据前面20%放置到后面,为了保持与对象增加一致\r\n\t ArrayList<ArrayList<Integer>> origData=data1.get_addDS();\r\n\t origData.addAll(addData);\t \t \r\n\t \r\n\t data1=null;\r\n\t\t \r\n\t Iterator<ArrayList<Integer>> value = origData.iterator();\r\n\t \r\n\t ArrayList<ArrayList<Integer>> result_POS=new ArrayList<ArrayList<Integer>>();\r\n\t ArrayList<Integer> POS_Reduct=new ArrayList<Integer>();\r\n\t ArrayList<Integer> original_POS=new ArrayList<Integer>();\r\n\t ArrayList<Integer> original_reduct=new ArrayList<Integer>();\r\n\t int[][] original_sys;\r\n\t ArrayList<Integer> P=new ArrayList<Integer>();\r\n\t IDS_POSD im1=new IDS_POSD(origData);\r\n\t \r\n\t POS_Reduct=im1.getPOS_Reduct(im1.getUn());\t \r\n\t original_POS=im1.getPOS(im1.getUn(),POS_Reduct);\r\n\t \r\n\t original_reduct.addAll(POS_Reduct);\r\n\t \t \r\n\t //original_sys=im1.getUn();\r\n\t int n1=im1.getUn().length;//原决策系统Un包含n个对象\r\n\t int s1=im1.getUn()[0].length;//m个属性,包含决策属性\t\r\n\t original_sys=new int[n1][s1];\r\n\t for(int i=0;i<n1;i++)\r\n\t \t for(int j=0;j<s1;j++)\r\n\t \t\t original_sys[i][j]=im1.getUn()[i][j];\r\n\r\n\t IDS_POSD im2=new IDS_POSD();\r\n\t \r\n\t ArrayList<Integer> temp=new ArrayList<Integer>();\r\n\t long startTime = System.currentTimeMillis(); //获取开始时间\r\n\t\t while (value.hasNext()) {\r\n\t\t\t \t\r\n\t\t\t temp.addAll(value.next());//System.out.println(temp);\r\n\t\t\t\tim2.setUn(origData);\r\n\t\t\t\tim2.setUx(temp);\t\r\n\t\t\t\tresult_POS=im2.SHU_IARS(im2.getUn(),original_reduct,original_POS,im2.getUx());\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t original_reduct=result_POS.get(0);\r\n\t\t\t original_POS=result_POS.get(1);\r\n\t\t\t \r\n\t\t\t\tk++;\r\n\t\t\t\tcount--;\r\n\t\t\t\tif(k%m==0){\r\n\t\t\t\t\t\r\n\t\t\t\t\tlong endTime=System.currentTimeMillis(); //获取结束时间 \r\n\t\t\t\t\ttime[t++]=endTime-startTime;//输出每添加10%数据求约简的时间\r\n\t\t\t\t\tif(t==8)\r\n\t\t\t\t\t\tt--;\r\n\t\t\t\t}\r\n\t\t\t\tvalue.remove();\r\n\t\t\t\ttemp=new ArrayList<Integer>();//.clear();\r\n\t\t\t\tif (count==0)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t \r\n\t\t for(int i=0;i<8;i++)\t\t\t\t\r\n\t\t\t System.out.print((double)time[i]/1000+\" \"); \r\n\r\n\t\t System.out.println(\"\\n\"+fileName+\"上POSD的约简为:\"+result_POS.get(0)+\"\\n\");\t\t\r\n\t}", "@Test\n public void testCompactRangeIndexOnPR() {\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(0);\n VM vm1 = host.getVM(1);\n VM vm2 = host.getVM(2);\n VM vm3 = host.getVM(3);\n setCacheInVMs(vm0, vm1, vm2, vm3);\n vm0.invoke(helper.getCacheSerializableRunnableForPRAccessorCreate(regionName, redundancy,\n Portfolio.class));\n\n vm1.invoke(\n helper.getCacheSerializableRunnableForPRCreate(regionName, redundancy, Portfolio.class));\n\n vm2.invoke(\n helper.getCacheSerializableRunnableForPRCreate(regionName, redundancy, Portfolio.class));\n\n vm3.invoke(\n helper.getCacheSerializableRunnableForPRCreate(regionName, redundancy, Portfolio.class));\n\n vm0.invoke(helper.getCacheSerializableRunnableForPRIndexCreate(regionName, indexName,\n indexedExpression, fromClause, alias));\n\n\n AsyncInvocation<?>[] asyncInvs = new AsyncInvocation[12];\n\n asyncInvs[0] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[1] = vm1.invokeAsync(\n helper.getCacheSerializableRunnableForPRRandomOps(regionName, stepSize, (2 * stepSize)));\n\n asyncInvs[2] = vm2.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (2 * stepSize), (3 * stepSize)));\n\n asyncInvs[3] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (3 * (stepSize)), totalDataSize));\n\n asyncInvs[4] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[5] = vm1.invokeAsync(\n helper.getCacheSerializableRunnableForPRRandomOps(regionName, stepSize, (2 * stepSize)));\n\n asyncInvs[6] = vm2.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (2 * stepSize), (3 * stepSize)));\n\n asyncInvs[7] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (3 * (stepSize)), totalDataSize));\n\n asyncInvs[8] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[9] = vm1.invokeAsync(\n helper.getCacheSerializableRunnableForPRRandomOps(regionName, stepSize, (2 * stepSize)));\n\n asyncInvs[10] = vm2.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (2 * stepSize), (3 * stepSize)));\n\n asyncInvs[11] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (3 * (stepSize)), totalDataSize));\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n ThreadUtils.join(inv, 60 * 000);\n }\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n if (inv.exceptionOccurred()) {\n Assert.fail(\"Random region operation failed on VM_\" + inv.getId(), inv.getException());\n }\n }\n vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n vm1.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n vm2.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n vm3.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n }", "public static void main(String[] args) throws Exception {\n ParameterTool params = ParameterTool.fromPropertiesFile(args[0]);\n\n // create streaming environment\n final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // enable event time processing\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n env.getConfig().setAutoWatermarkInterval(1000L);\n\n // enable fault-tolerance, 60s checkpointing\n env.enableCheckpointing(60000);\n\n // enable restarts\n env.setRestartStrategy(RestartStrategies.fixedDelayRestart(50, 500L));\n env.setStateBackend(new RocksDBStateBackend(\"file:///tmp/rocks_state_store\"));\n\n Properties kParams = params.getProperties();\n kParams.setProperty(\"group.id\", UUID.randomUUID().toString());\n //kParams.setProperty(\"group.id\", \"FLINK_KAFKA_GROUP\");\n DataStream<ObjectNode> inputStream = env.addSource(new FlinkKafkaConsumer010<>(params.getRequired(\"topic\"), new JSONDeserializationSchema(), kParams)).name(\"Kafka 0.10 Source\");\n\n DataStream<PlaneModel> planes = inputStream\n .assignTimestampsAndWatermarks(new PlaneTimestampExtractor())\n .keyBy(jsonNode -> jsonNode.get(\"icao\").textValue())\n .map(new PlaneMapper())\n .name(\"Timestamp -> KeyBy ICAO -> Map\");\n\n DataStream<Tuple2<Integer,PlaneModel>> keyedPlanes = planes\n .keyBy(\"icao\")\n .window(TumblingEventTimeWindows.of(Time.seconds(5)))\n .apply(new PlaneWindow())\n .name(\"Tumbling Window\");\n\n // Print plane stream to stdout\n keyedPlanes.print();\n\n DataStream<Tuple2<Integer,PlaneModel>> military_planes = keyedPlanes.filter(new MilitaryPlaneFilter())\n .name(\"Military Plane Filter\");\n military_planes.print();\n\n // At this point, build a stream that stores all the active (seen in the last\n // 60 seconds) ICAOs in our current airspace, and store in a single well known\n // queryable key. Emit every 5 seconds. This stream is only here to populate \n // the managed state, but if you use the print sink you'll get the array of \n // ICAOs as a string for debugging.\n DataStream<String> airspace = keyedPlanes.windowAll(SlidingEventTimeWindows.of(Time.seconds(60), Time.seconds(5)))\n .apply(new AirspaceWindow())\n .keyBy(0) // this will always be the 'AIRPLANE' key\n .map(new AirspaceMapper()); // mapper to store state\n\n airspace.print();\n\n String app_name = String.format(\"Streaming Planes <- Kafka Topic: %s\", params.getRequired(\"topic\"));\n env.execute(app_name);\n\n }", "com.google.protobuf.ByteString\n getSerialBytes();", "@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.552 -0500\", hash_original_method = \"35A5E39A8A1820326BDEA32FA9EDD100\", hash_generated_method = \"CE016FA9F8D335C8879BF83223FA7CD6\")\n \npublic Message sendMessageSynchronously(int what, Object obj) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.obj = obj;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }", "public void mo115190b() {\n }", "@Test\n public void testBareRun() throws IOException {\n String[] args = new String[]{\"example/runs/test_n2_bare.properties\"};\n MainFromProperties.main(args);\n\n // Fetch log mappings\n Map<Pair<Integer, Integer>, TestLogReader.PortUtilizationTuple> portQueueStateTupleMap = TestLogReader.getPortUtilizationMapping(\"temp/test_n2_bare\");\n Map<Long, TestLogReader.FlowCompletionTuple> flowCompletionTupleMap = TestLogReader.getFlowCompletionMapping(\"temp/test_n2_bare\");\n\n // Flow completion\n TestLogReader.FlowCompletionTuple tuple = flowCompletionTupleMap.get(0L);\n assertEquals(50000, tuple.getEndTime());\n assertFalse(tuple.isCompleted());\n assertEquals(50000, tuple.getDuration());\n assertEquals(55200, tuple.getSentBytes());\n assertEquals(1000000000L, tuple.getTotalSizeBytes());\n\n // Sent one pa\n\n // Port utilization\n\n // 0 -> 1\n assertEquals(100.0, portQueueStateTupleMap.get(new ImmutablePair<>(0, 1)).getUtilizationPercentage(), 1e-6);\n assertEquals(50000, portQueueStateTupleMap.get(new ImmutablePair<>(0, 1)).getUtilizationNs());\n\n // 1 -> 0\n //assertEquals((5*48) / 9479.0 * 100.0, portQueueStateTupleMap.get(new Pair<>(1, 0)).getUtilizationPercentage(), 1e-6);\n //assertEquals((5*48), portQueueStateTupleMap.get(new Pair<>(1, 0)).getUtilizationNs());\n\n }", "public static void main(String[] args) {\n\n\n BasicProducer basicProducer = new BasicProducer(\"3-part-topic\");\n long t0 = System.currentTimeMillis();\n basicProducer.postSynchMessage(\"Synched 8 Message\");\n long t1 = System.currentTimeMillis();\n System.out.println(\"time taken basicProducer.postSynchMessage=\" + (t1-t0)); // 192 // 193\n\n long t2 = System.currentTimeMillis();\n basicProducer.postAsynchMessage(\"async 8 Message\");\n long t3 = System.currentTimeMillis();\n System.out.println(\"time taken basicProducer.postSynchMessage=\" + (t3-t2)); //14\n\n\n }", "public static void main(String[] args) {\n\n final StreamsBuilder builder = new StreamsBuilder();\n\n // get and set properties\n RtdStreamProperties rtdStreamProperties = new RtdStreamProperties();\n Properties props = rtdStreamProperties.getProperties();\n\n props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());\n props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, SpecificAvroSerde.class);\n\n // BusPosition serializer/deserializer\n final Serde<BusPositionFeed> serdeBusPosition = new SpecificAvroSerde<>();\n serdeBusPosition.configure((Map) props, false);\n\n // create key/value store for bus positions\n final StoreBuilder<KeyValueStore<String, BusPositionFeed>> busPositionStore = Stores.keyValueStoreBuilder(\n Stores.persistentKeyValueStore(\"busPositionStore\"),\n Serdes.String(),\n Serdes.serdeFrom(serdeBusPosition.serializer(), serdeBusPosition.deserializer()));\n\n builder.addStateStore(busPositionStore);\n\n // stream positions from the rtd-bus-position topic\n final KStream<String, BusPositionFeed> rtdBusPositionStream = builder.stream(\"rtd-bus-position\");\n\n // calculate the speed using the Haversine transform\n final KStream<String, BusPositionSpeed> rtdBusPositionStreamEnriched =\n rtdBusPositionStream.transform(new HaversineTransformerSupplier(\"busPositionStore\"), \"busPositionStore\");\n\n // remove any enriched records with impossible speeds (i.e. > 140 mph), add the Uber H3 hexagon, and write\n // those records to the rtd-bus-position-enriched topic.\n rtdBusPositionStreamEnriched\n .filter((key, busPositionSpeed) -> busPositionSpeed.getMilesPerHour() < 140)\n .mapValues(busPositionSpeed -> {\n\n H3Core h3 = null;\n String hexAddr = \"\";\n try {\n // a resolution of 12 divides the land into hexagons that are about 307 square meters\n // See https://github.com/uber/h3/blob/master/docs/core-library/restable.md and plug the hexagon\n // area into https://www.wolframalpha.com/ to translate\n\n h3 = H3Core.newInstance();\n hexAddr = h3.geoToH3Address(busPositionSpeed.getLocation().getLat(),\n busPositionSpeed.getLocation().getLon(),\n 12);\n\n } catch (IOException e) {\n LOG.error(\"Error creating H3 address for location: \" + busPositionSpeed.getLocation());\n LOG.error(e.getMessage());\n }\n\n busPositionSpeed.setH3(hexAddr);\n return busPositionSpeed;\n })\n .to(\"rtd-bus-position-enriched\");\n\n // run it\n final Topology topology = builder.build();\n LOG.info(topology.describe().toString()); // write out the topology so it can be visualized in https://zz85.github.io/kafka-streams-viz/\n final KafkaStreams streams = new KafkaStreams(topology, props);\n streams.cleanUp();\n streams.start();\n\n // Add shutdown hook to respond to SIGTERM and gracefully close Kafka Streams\n Runtime.getRuntime().addShutdownHook(new Thread(streams::close));\n\n }", "@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.546 -0500\", hash_original_method = \"69DA3E1B323882B9D4B744C6E35751A3\", hash_generated_method = \"60004DC4003AFFE42822995754840E35\")\n \npublic Message sendMessageSynchronously(int what, int arg1) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }", "@Test\n public void prefixTrimNotReachingSequencer() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n CorfuRuntime rt = getNewRuntime();\n\n TestRule dropSequencerTrim = new TestRule()\n .requestMatches(msg -> msg.getPayload().getPayloadCase()\n .equals(CorfuMessage.RequestPayloadMsg.PayloadCase.SEQUENCER_TRIM_REQUEST))\n .drop();\n addClientRule(rt, dropSequencerTrim);\n\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // thread 1: populates the maps with mapSize items\n scheduleConcurrently(1, ignored_task_num -> {\n populateMaps(tableSize, tableA, tableB);\n });\n\n // thread 2: periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times,\n // and immediate prefix-trim of the log up to the checkpoint position\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpointAndTrim(rt, tableA, tableB);\n });\n\n // thread 3: repeated ITERATION_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // performs some sanity checks on the map state\n\n // In this test checkpoints and trims are happening in a loop for several iterations,\n // so a trim exception can occur if after loading from the latest checkpoint,\n // updates to the stream have been already trimmed (1st trimmedException), the stream\n // is reset, and on the second iteration the same scenario can happen (2nd trimmedException)\n // which is the total number of retries.\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, false, true);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // Verify that last trim cycle completed (async task) before validating map rebuild\n Token currentTrimMark = Token.UNINITIALIZED;\n while(currentTrimMark.getSequence() != lastValidCheckpoint.getSequence() + 1L) {\n currentTrimMark = getNewRuntime().getAddressSpaceView().getTrimMark();\n }\n\n // finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time we check that the new map instances contain all values\n validateMapRebuild(tableSize, true, false);\n } finally {\n rt.shutdown();\n }\n }", "@Override\n protected boolean checkSeqResetSeqNum() {\n return false;\n }", "@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.544 -0500\", hash_original_method = \"42BD69B2114459AD691B3AEBDAE73546\", hash_generated_method = \"C285A4D23EAB85D82915D70E1F66F84C\")\n \npublic Message sendMessageSynchronously(int what) {\n Message msg = Message.obtain();\n msg.what = what;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }", "private void processV2AuthoritativeUpdate(SystemMetadata mnSystemMetadata, SystemMetadataValidator validator)\n throws RetryableException, UnrecoverableException, SynchronizationFailed {\n\n logger.debug(task.taskLabel() + \" entering processV2AuthoritativeUpdate...\");\n boolean validated = false;\n try {\n if (validator.hasValidUpdates(mnSystemMetadata)) {\n Identifier pid = mnSystemMetadata.getIdentifier();\n validated = true;\n\n if (CollectionUtils.isNotEmpty(validator.getReferenceSystemMetadata().getReplicaList())) {\n // copy the replica information from the CN copy to the new copy\n // (the CN is authoritative for this property and the MNs aren't expected\n // to maintain them.)\n mnSystemMetadata.setReplicaList(validator.getReferenceSystemMetadata().getReplicaList());\n logger.debug(task.taskLabel() + \" Copied over existing Replica section from CN..\");\n } else {\n // if somehow the replica section is empty, recreate it based on\n // this authoritative replica.\n // (replication depends on at least the authoritativeMN to\n // be listed in the replica section with a status of COMPLETED)\n mnSystemMetadata = populateInitialReplicaList(mnSystemMetadata);\n logger.debug(task.taskLabel() + \" replica section empty, so initialized new ReplicaList\");\n }\n\n // copy over the SerialVersion from the CN version or initialize\n BigInteger cnSerialVersion = validator.getReferenceSystemMetadata().getSerialVersion();\n if (cnSerialVersion == null) {\n cnSerialVersion = BigInteger.ONE;\n logger.debug(task.taskLabel() + \" serialVersion empty, so initialized to 1.\");\n }\n mnSystemMetadata.setSerialVersion(cnSerialVersion);\n\n logFormatTypeChanges(mnSystemMetadata.getFormatId(), validator.getReferenceSystemMetadata().getFormatId());\n\n // persist the new systemMetadata\n nodeCommunications.getCnCore().updateSystemMetadata(session, pid, mnSystemMetadata);\n\n logger.debug(task.taskLabel() + \" Updated CN with new SystemMetadata\");\n // propagate the changes\n notifyReplicaNodes(pid, false);\n \n } else {\n logger.info(buildStandardLogMessage(null, \" No changes to update.\"));\n }\n } catch (ServiceFailure e) {\n if (validated) {\n // from cn.updateSystemMetadata\n V2TransferObjectTask.extractRetryableException(e);\n throw new UnrecoverableException(\"Failed to update CN with new valid SystemMetadata!\", e);\n } else {\n // could be content problem in new sysmeta, or an IO problem.\n throw SyncFailedTask.createSynchronizationFailed(task.getPid(), \"Problems validating the new SystemMetadata!\", e);\n }\n\n } catch (InvalidRequest e) {\n if (validated) {\n // from cn.updateSystemMetadata, shouldn't ever get here if validated, so not an MN fault\n throw new UnrecoverableException(\"Failed to update CN with new valid SystemMetadata!\", e);\n } else {\n // thrown because of invalid changes\n throw SyncFailedTask.createSynchronizationFailed(task.getPid(), \"The new SystemMetadata contains invalid changes.\", e);\n }\n\n } catch (InvalidSystemMetadata e) {\n // from cn.updateSystemMetadata\n throw SyncFailedTask.createSynchronizationFailed(task.getPid(), \"The new SystemMetadata was rejected as invalid by the CN.\", e);\n } catch (NotImplemented | NotAuthorized | InvalidToken e) {\n // from cn.updateSystemMetadata\n throw new UnrecoverableException(\"Failed to update CN with new valid SystemMetadata!\", e);\n }\n }", "long getTimeBoltCBoltD();", "public void runSingleThreaded() throws Exception {\n Object entity = null;\n isRunning = true;\n bootstrapCPE();\n ProcessTrace pTrTemp = getProcessTrace();\n boolean success = true;\n long entityCount = 0;\n // long start = System.currentTimeMillis();\n long aggTime = 0;\n long ppTime = 0;\n long ccTime = 0;\n long crTime = 0;\n\n for (int j = 0; j < statusCbL.size(); j++) {\n BaseStatusCallbackListener statCL = (BaseStatusCallbackListener) statusCbL.get(j);\n if (statCL != null) {\n statCL.initializationComplete();\n }\n }\n\n while (isRunning) {\n try {\n // Check if processed all entities as defined in the Cpe Descriptor.\n if (endOfProcessingReached(entityCount)) {\n break;\n }\n waitForCpmToResumeIfPaused(); // blocks if CPM is paused\n // check again the state of the cpm after pause\n if (!isRunning) {\n break;\n }\n readerState = 1000;\n if (!collectionReader.hasNext()) {\n break;\n }\n long st0 = System.currentTimeMillis();\n entity = getCasWithSOFA(entity, pTrTemp);\n crTime += (System.currentTimeMillis() - st0);\n\n if (entity == null) {\n success = false;\n continue;\n }\n\n if (entity instanceof CAS[] && skipDroppedDocument((Object[]) entity)) {\n notifyListeners(CAS_PROCESSED_MSG, (Object[]) entity, pTrTemp,\n new SkipCasException(\"Skipping Document Due To Dropped Cas in a Sequence\"));\n releaseCASes((CAS[]) entity);\n continue;\n } else {\n // Clear the cache of bad documents\n if (skippedDocs.size() > 0) {\n skippedDocs.clear();\n }\n }\n long st1 = System.currentTimeMillis();\n\n // If CAS has been dropped due to an exception dont call CasConsumer\n success = nonThreadedProcessingUnit.analyze((Object[]) entity, pTrTemp);\n ppTime += (System.currentTimeMillis() - st1);\n if (success) {\n long st2 = System.currentTimeMillis();\n nonThreadedCasConsumerProcessingUnit.analyze((Object[]) entity, pTrTemp);\n\n ccTime += (System.currentTimeMillis() - st2);\n }\n\n } catch (Throwable t) {\n // may change the state of the isRunning on fatal exception\n handleException(t, (Object[]) entity, pTrTemp);\n success = false;\n } finally {\n entityCount++;\n // After sucessfull analysis notify listeners. If there was an exception, it has\n // already been reported\n if (success) {\n readerState = 2007;\n if (entity == null) {\n notifyListeners(CAS_PROCESSED_MSG, null, pTrTemp);\n } else {\n notifyListeners(CAS_PROCESSED_MSG, (Object[]) entity, pTrTemp);\n }\n }\n if (entity != null && entity instanceof CAS[]) {\n releaseCASes((CAS[]) entity);\n entity = null;\n }\n\n // Update processing trace counts and timers\n synchronized (procTr) {\n long st = System.currentTimeMillis();\n procTr.aggregate(pTrTemp);\n pTrTemp.clear();\n aggTime += (System.currentTimeMillis() - st);\n }\n }\n } // while\n tearDownCPE();\n }", "@Test\n public void testMultiChannelNoBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(2),\n createBuffer(2),\n createBuffer(0),\n createBuffer(1),\n createBuffer(0),\n createEndOfPartition(0),\n createBuffer(3),\n createBuffer(1),\n createEndOfPartition(3),\n createBuffer(1),\n createEndOfPartition(1),\n createBuffer(2),\n createEndOfPartition(2)\n };\n inputGate = createCheckpointedInputGate(4, sequence);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n\n assertEquals(0L, inputGate.getAlignmentDurationNanos());\n }", "private void c() {\n /*\n r14 = this;\n r12 = android.os.SystemClock.elapsedRealtime();\n r8 = r14.d();\n r0 = r14.t;\n if (r0 == 0) goto L_0x007a;\n L_0x000c:\n r0 = 1;\n r7 = r0;\n L_0x000e:\n r0 = r14.r;\n r0 = r0.a();\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n if (r7 == 0) goto L_0x007d;\n L_0x0018:\n r0 = 1;\n r10 = r0;\n L_0x001a:\n if (r10 != 0) goto L_0x0095;\n L_0x001c:\n r0 = r14.d;\n r0 = r0.b;\n if (r0 != 0) goto L_0x0028;\n L_0x0022:\n r0 = -1;\n r0 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1));\n if (r0 != 0) goto L_0x0032;\n L_0x0028:\n r0 = r14.p;\n r0 = r12 - r0;\n r2 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 <= 0) goto L_0x0095;\n L_0x0032:\n r14.p = r12;\n r0 = r14.d;\n r1 = r14.f;\n r1 = r1.size();\n r0.a = r1;\n r0 = r14.c;\n r1 = r14.f;\n r2 = r14.o;\n r4 = r14.m;\n r6 = r14.d;\n r0.getChunkOperation(r1, r2, r4, r6);\n r0 = r14.d;\n r0 = r0.a;\n r0 = r14.a(r0);\n r1 = r14.d;\n r1 = r1.b;\n if (r1 != 0) goto L_0x0080;\n L_0x0059:\n r4 = -1;\n L_0x005b:\n r0 = r14.b;\n r2 = r14.m;\n r1 = r14;\n r6 = r10;\n r0 = r0.update(r1, r2, r4, r6);\n if (r7 == 0) goto L_0x0087;\n L_0x0067:\n r0 = r14.v;\n r0 = r12 - r0;\n r2 = r14.u;\n r2 = (long) r2;\n r2 = r14.c(r2);\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 < 0) goto L_0x0079;\n L_0x0076:\n r14.e();\n L_0x0079:\n return;\n L_0x007a:\n r0 = 0;\n r7 = r0;\n goto L_0x000e;\n L_0x007d:\n r0 = 0;\n r10 = r0;\n goto L_0x001a;\n L_0x0080:\n if (r0 == 0) goto L_0x0095;\n L_0x0082:\n r4 = r14.d();\n goto L_0x005b;\n L_0x0087:\n r1 = r14.r;\n r1 = r1.a();\n if (r1 != 0) goto L_0x0079;\n L_0x008f:\n if (r0 == 0) goto L_0x0079;\n L_0x0091:\n r14.f();\n goto L_0x0079;\n L_0x0095:\n r4 = r8;\n goto L_0x005b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer.chunk.ChunkSampleSource.c():void\");\n }", "public I getChangeInfo(int startSeqNum);", "@Test\n public void runSimpleConcurrencyFileSuccess() throws Exception {\n List<String> args = getBasicArgsStr();\n args.add(\"-r\");\n args.add(\"^(?<VTIME>)(?<TYPE>)$\");\n args.add(\"-s\");\n args.add(\"^--$\");\n args.add(\"-q\");\n args.add(\"M:0->1\");\n args.add(\"-i\");\n args.add(\"-d\");\n args.add(\"../traces/EndToEndDynopticTests/simple-po-concurrency/trace.txt\");\n runDynFromFileArgs(args);\n }", "private void concurrencyWrites5() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites5\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans------------------------------------------put[v2]---commit\");\n\t\t\tlog.info(\"t2-------------------------beginTrans---put[v3]---commit\");\n\t\t\tlog.info(\"main---get[v3]\");\n\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx41 t1 = new P0Trx41();\n\t\t\tfinal P0Trx42 t2 = new P0Trx42();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl5.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl5.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl5.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites5\");\n\n\t\t\tif (result.length == 1 && result[0] == 3) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "PToP.S2BRelay getS2BRelay();", "@Test\n public void serialDecomposition_test1()\n {\n // The function:\n // i2 i4 i7 Q | o0 o2 o3\n // 1 1 0 G0 | 1 - -\n // 1 1 - G6 | - - 1\n // 0 0 0 G7 | - 1 -\n // 1 0 1 G0 | - 1 1\n // 1 1 1 G2 | - 1 1\n // 1 1 1 G5 | - 1 1\n // 0 1 0 G0 | - 1 1\n // 1 1 0 G2 | - 1 -\n // 1 - - G1 | - - 1\n // 1 0 0 G5 | 1 1 -\n // 0 1 1 G5 | - - 1\n // 0 - - G1 | - 1 -\n // 0 0 1 G0 | - - 1\n // 0 0 1 G2 | - - 1\n // 1 1 1 G7 | - 1 -\n // 0 0 0 G0 | - - 1\n // 1 1 0 G7 | - 1 1\n // 1 0 1 G2 | - 1 1\n // 0 1 0 G5 | - - 1\n // 1 1 0 G5 | - 1 1\n // 1 0 0 G2 | - 1 1\n // 1 0 0 G0 | - 1 1\n // 1 0 0 G7 | - 1 1\n // 1 0 1 G7 | - 1 -\n // 0 0 1 G5 | - - 1\n // 1 0 1 G5 | - 1 1\n // 0 0 1 G7 | 1 1 1\n // 1 1 - G0 | - 1 1\n // 0 0 0 G2 | 1 1 1\n // 1 - - G3 | - 1 -\n // 0 - - G3 | - - 1\n // 0 - - G5 | 0 - -\n // 0 - 0 G7 | 0 - -\n // 0 - - G0 | 0 - -\n // - - 1 G0 | 0 - -\n // - - 1 G2 | 0 - -\n // 1 0 - G0 | 0 - -\n // 1 0 - G2 | 0 - -\n // 1 0 - G7 | 0 - -\n // - 1 - G7 | 0 - -\n // - 1 - G5 | 0 - -\n // - 1 - G2 | 0 - -\n // 1 - 1 G5 | 0 - -\n // - - - G1 | 0 - -\n // - - - G3 | 0 - -\n // - - - G4 | 0 - -\n // - - - G0 | - - -\n // - - - G2 | - - -\n // - - - G6 | - - -\n // - - - G7 | - - -\n // - - - G5 | - - -\n // - - - G4 | - - -\n // - - - G6 | 0 - -\n // 0 0 0 G5 | 0 0 0\n // 0 - 1 G2 | - 0 -\n // 0 - 1 G5 | - 0 -\n // 0 1 - G2 | 0 0 0\n // 0 1 - G4 | 0 0 0\n // 0 1 - G2 | 0 0 -\n // 0 1 - G5 | 0 0 -\n // 0 1 - G4 | 0 0 -\n // 0 - 0 G7 | 0 - 0\n // 0 1 - G7 | 0 0 0\n // 0 0 - G0 | 0 0 -\n // 0 0 - G4 | 0 0 -\n // 0 1 1 G0 | 0 0 0\n // 0 - - G4 | 0 0 0\n // 0 - - G3 | - 0 -\n // 0 - - G4 | - 0 -\n // 0 - - G1 | 0 - 0\n // 0 - - G4 | 0 - 0\n // - 0 0 G6 | - - 0\n // - 0 0 G5 | - - 0\n // - 0 0 G4 | - - 0\n // 1 0 1 G6 | - - 0\n // - 0 - G6 | 0 0 0\n // 1 - 1 G7 | - - 0\n // 1 - - G1 | 0 0 -\n // 1 - - G6 | 0 0 -\n // 1 - - G4 | 0 0 -\n // - 1 0 G2 | - - 0\n // - 1 0 G4 | - - 0\n // - - - G4 | 0 0 0\n // 1 - - G3 | - - 0\n // 1 - - G4 | - - 0\n // - - - G3 | - - -\n // - - - G1 | - - -\n\n // Y = {o0o2o3}, U = {i7}, V = {i2i4}\n // Iv = i2i4\n Blanket βIv = Blanket.create(\"1,2,5,6,8,9,15,17,20,28,30,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,78,79,80,81,82,83,84,85,86,87; 3,12,13,14,16,25,27,29,31,32,33,34,35,36,44,45,46,47,48,49,50,51,52,53,54,55,56,62,64,65,67,68,69,70,71,72,73,74,76,83,86,87; 4,9,10,18,21,22,23,24,26,30,35,36,37,38,39,43,44,45,46,47,48,49,50,51,52,53,72,73,74,75,76,77,78,79,80,83,84,85,86,87; 7,11,12,19,31,32,33,34,35,36,40,41,42,44,45,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,62,63,66,67,68,69,70,71,81,82,83,86,87;\");\n // Iu = i7\n Blanket βIu = Blanket.create(\"1,2,3,7,8,9,10,12,16,17,19,20,21,22,23,28,29,30,31,32,33,34,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,76,78,79,80,81,82,83,84,85,86,87; 2,4,5,6,9,11,12,13,14,15,18,24,25,26,27,28,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,63,64,65,66,67,68,69,70,71,75,76,77,78,79,80,83,84,85,86,87;\");\n Blanket βQ = Blanket.create(\"G0:1,4,7,13,16,22,28,34,35,37,47,64,66; G1:9,12,44,70,78,87; G2:5,8,14,18,21,29,36,38,42,48,55,57,59,81; G3:30,31,45,68,84,86; G4:46,52,58,61,65,67,69,71,74,80,82,83,85; G5:6,10,11,19,20,25,26,32,41,43,51,54,56,60,73; G6:2,49,53,72,75,76,79; G7:3,15,17,23,24,27,33,39,40,50,62,63,77;\");\n Blanket βY = Blanket.create(\"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,47,48,49,50,51,52,86,87; 1,2,9,11,13,14,16,19,25,31,47,48,49,50,51,52,55,56,68,69,86,87; 1,3,8,10,12,15,24,30,47,48,49,50,51,52,72,73,74,75,77,81,82,84,85,86,87; 1,47,48,49,50,51,52,55,56,68,69,72,73,74,75,77,81,82,84,85,86,87; 2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,86,87; 2,9,11,13,14,16,19,25,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,59,60,61,64,65,68,69,78,79,80,86,87; 3,8,12,15,24,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,62,70,71,72,73,74,75,77,81,82,84,85,86,87; 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87;\");\n DecompositionBlankets decomposition = Decompositions.serialDecomposition(βIv, βIu, βQ, βY, 0, false);\n Assertions.assertThat(decomposition).isNotNull();\n\n Blanket βQv = decomposition.QvJoinedWithQu ? decomposition.Qu.BxB(decomposition.QvPartial) : decomposition.Qv;\n Blanket βQu = decomposition.QuJoinedWithQv ? decomposition.Qv.BxB(decomposition.QuPartial) : decomposition.Qu;\n\n Assertions.assertThat(decomposition.Iv.BxB(βQv).BleB(decomposition.G)).isTrue(); // βIv x βQv <= βG - true\n Assertions.assertThat(decomposition.G.BxB(decomposition.Iu != null ? decomposition.Qu.BxB(decomposition.Iu) : βQu).BleB(decomposition.H)).isTrue(); // βIu x βG x βQu <= βY - true\n Assertions.assertThat(decomposition.Qv.BxB(decomposition.Qu).BeqB(decomposition.Q)).isTrue(); // βQv x βQu = βQ - true\n Assertions.assertThat(decomposition.Qv.BxB(decomposition.Qu).BeqB(βQ)).isTrue(); // βQv x βQu = βQ - true\n }", "public void testCombinedCmsConcurrentApplicationConcurrentTimeLogging() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset19.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertTrue(\"Log line not recognized as \" + JdkUtil.LogEventType.CMS_CONCURRENT.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.CMS_CONCURRENT));\n }", "@Test\n public void testDetailedCollectionDatestampMixed1() throws Exception {\n final DataReader reader = getDataReader(\"SampleSun1_7_0G1_DateStamp_Detailed-mixedLine1.txt\");\n GCModel model = reader.read();\n Assert.assertEquals(\"nummber of events\", 2, model.size());\n Assert.assertEquals(\"number of pauses\", 1, model.getPause().getN());\n Assert.assertEquals(\"gc pause sum\", 0.286451, model.getPause().getSum(), 1.0E-9);\n Assert.assertEquals(\"gc memory\", ((17786 * 1024) - (17147 * 1024)), model.getFreedMemoryByGC().getMax());\n }", "@DISPID(1611005972) //= 0x60060014. The runtime will prefer the VTID if present\n @VTID(48)\n void designTablesSynchronization(\n short oDesignTablesSynchronization);", "public void initialExecutionResourcesExhausted() {\n \n \t\t// if (this.environment.getExecutingThread() != Thread.currentThread()) {\n \t\t// throw new ConcurrentModificationException(\n \t\t// \"initialExecutionResourcesExhausted must be called from the task that executes the user code\");\n \t\t// }\n \n \t\t// Construct a resource utilization snapshot\n \t\tfinal long timestamp = System.currentTimeMillis();\n \t\t// Get CPU-Usertime in percent\n \t\tThreadMXBean threadBean = ManagementFactory.getThreadMXBean();\n \t\tlong userCPU = (threadBean.getCurrentThreadUserTime() / NANO_TO_MILLISECONDS) * 100\n \t\t\t/ (timestamp - this.startTime);\n \n \t\t// collect outputChannelUtilization\n \t\tfinal Map<ChannelID, Long> channelUtilization = new HashMap<ChannelID, Long>();\n \t\tlong totalOutputAmount = 0;\n \t\tfor (int i = 0; i < this.environment.getNumberOfOutputGates(); ++i) {\n \t\t\tfinal OutputGate<? extends Record> outputGate = this.environment.getOutputGate(i);\n \t\t\tfor (int j = 0; j < outputGate.getNumberOfOutputChannels(); ++j) {\n \t\t\t\tfinal AbstractOutputChannel<? extends Record> outputChannel = outputGate.getOutputChannel(j);\n \t\t\t\tchannelUtilization.put(outputChannel.getID(),\n \t\t\t\t\tLong.valueOf(outputChannel.getAmountOfDataTransmitted()));\n \t\t\t\ttotalOutputAmount += outputChannel.getAmountOfDataTransmitted();\n \t\t\t}\n \t\t}\n \t\tlong totalInputAmount = 0;\n \t\tfor (int i = 0; i < this.environment.getNumberOfInputGates(); ++i) {\n \t\t\tfinal InputGate<? extends Record> inputGate = this.environment.getInputGate(i);\n \t\t\tfor (int j = 0; j < inputGate.getNumberOfInputChannels(); ++j) {\n \t\t\t\tfinal AbstractInputChannel<? extends Record> inputChannel = inputGate.getInputChannel(j);\n \t\t\t\tchannelUtilization.put(inputChannel.getID(),\n \t\t\t\t\tLong.valueOf(inputChannel.getAmountOfDataTransmitted()));\n \t\t\t\ttotalInputAmount += inputChannel.getAmountOfDataTransmitted();\n \n \t\t\t}\n \t\t}\n \t\tBoolean force = null;\n \n \t\tif (this.environment.getInvokable().getClass().isAnnotationPresent(Stateful.class)\n \t\t\t&& !this.environment.getInvokable().getClass().isAnnotationPresent(Stateless.class)) {\n \t\t\t// Don't checkpoint statefull tasks\n \t\t\tforce = false;\n \t\t} else {\n \t\t\t// look for a forced decision from the user\n \t\t\tForceCheckpoint forced = this.environment.getInvokable().getClass().getAnnotation(ForceCheckpoint.class);\n \t\t\tif (forced != null) {\n \t\t\t\tforce = forced.checkpoint();\n \t\t\t}\n \t\t}\n \t\tfinal ResourceUtilizationSnapshot rus = new ResourceUtilizationSnapshot(timestamp, channelUtilization, userCPU,\n \t\t\tforce, totalInputAmount, totalOutputAmount);\n \n \t\t// Notify the listener objects\n \t\tfinal Iterator<ExecutionListener> it = this.registeredListeners.iterator();\n \t\twhile (it.hasNext()) {\n \t\t\tit.next().initialExecutionResourcesExhausted(this.environment.getJobID(), this.vertexID, rus);\n \t\t}\n \n \t\t// Finally, propagate event to the job manager\n \t\tthis.taskManager.initialExecutionResourcesExhausted(this.environment.getJobID(), this.vertexID, rus);\n \t}", "Boolean autoSync();", "public void c() {\n /*\n r14 = this;\n io.b.o<? super U> r0 = r14.actual\n r1 = 1\n r2 = 1\n L_0x0004:\n boolean r3 = r14.d()\n if (r3 == 0) goto L_0x000b\n return\n L_0x000b:\n io.b.e.c.d<U> r3 = r14.queue\n if (r3 == 0) goto L_0x0023\n L_0x000f:\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x0016\n return\n L_0x0016:\n java.lang.Object r4 = r3.poll()\n if (r4 != 0) goto L_0x001f\n if (r4 != 0) goto L_0x000f\n goto L_0x0023\n L_0x001f:\n r0.a(r4)\n goto L_0x000f\n L_0x0023:\n boolean r3 = r14.done\n io.b.e.c.d<U> r4 = r14.queue\n java.util.concurrent.atomic.AtomicReference<io.b.e.e.d.i$a<?, ?>[]> r5 = r14.observers\n java.lang.Object r5 = r5.get()\n io.b.e.e.d.i$a[] r5 = (io.b.e.e.d.i.a[]) r5\n int r6 = r5.length\n int r7 = r14.maxConcurrency\n r8 = 2147483647(0x7fffffff, float:NaN)\n r9 = 0\n if (r7 == r8) goto L_0x0044\n monitor-enter(r14)\n java.util.Queue<io.b.m<? extends U>> r7 = r14.sources // Catch:{ all -> 0x0041 }\n int r7 = r7.size() // Catch:{ all -> 0x0041 }\n monitor-exit(r14) // Catch:{ all -> 0x0041 }\n goto L_0x0045\n L_0x0041:\n r0 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x0041 }\n throw r0\n L_0x0044:\n r7 = 0\n L_0x0045:\n if (r3 == 0) goto L_0x0067\n if (r4 == 0) goto L_0x004f\n boolean r3 = r4.isEmpty()\n if (r3 == 0) goto L_0x0067\n L_0x004f:\n if (r6 != 0) goto L_0x0067\n if (r7 != 0) goto L_0x0067\n io.b.e.h.c r1 = r14.errors\n java.lang.Throwable r1 = r1.a()\n java.lang.Throwable r2 = io.b.e.h.f.f33557a\n if (r1 == r2) goto L_0x0066\n if (r1 != 0) goto L_0x0063\n r0.a()\n goto L_0x0066\n L_0x0063:\n r0.a((java.lang.Throwable) r1)\n L_0x0066:\n return\n L_0x0067:\n if (r6 == 0) goto L_0x0106\n long r3 = r14.lastId\n int r7 = r14.lastIndex\n if (r6 <= r7) goto L_0x0077\n r10 = r5[r7]\n long r10 = r10.id\n int r12 = (r10 > r3 ? 1 : (r10 == r3 ? 0 : -1))\n if (r12 == 0) goto L_0x0098\n L_0x0077:\n if (r6 > r7) goto L_0x007a\n r7 = 0\n L_0x007a:\n r10 = r7\n r7 = 0\n L_0x007c:\n if (r7 >= r6) goto L_0x008f\n r11 = r5[r10]\n long r11 = r11.id\n int r13 = (r11 > r3 ? 1 : (r11 == r3 ? 0 : -1))\n if (r13 != 0) goto L_0x0087\n goto L_0x008f\n L_0x0087:\n int r10 = r10 + 1\n if (r10 != r6) goto L_0x008c\n r10 = 0\n L_0x008c:\n int r7 = r7 + 1\n goto L_0x007c\n L_0x008f:\n r14.lastIndex = r10\n r3 = r5[r10]\n long r3 = r3.id\n r14.lastId = r3\n r7 = r10\n L_0x0098:\n r3 = 0\n r4 = 0\n L_0x009a:\n if (r3 >= r6) goto L_0x00fd\n boolean r10 = r14.d()\n if (r10 == 0) goto L_0x00a3\n return\n L_0x00a3:\n r10 = r5[r7]\n L_0x00a5:\n boolean r11 = r14.d()\n if (r11 == 0) goto L_0x00ac\n return\n L_0x00ac:\n io.b.e.c.e<U> r11 = r10.queue\n if (r11 != 0) goto L_0x00b1\n goto L_0x00b9\n L_0x00b1:\n java.lang.Object r12 = r11.poll() // Catch:{ Throwable -> 0x00e2 }\n if (r12 != 0) goto L_0x00d8\n if (r12 != 0) goto L_0x00a5\n L_0x00b9:\n boolean r11 = r10.done\n io.b.e.c.e<U> r12 = r10.queue\n if (r11 == 0) goto L_0x00d2\n if (r12 == 0) goto L_0x00c7\n boolean r11 = r12.isEmpty()\n if (r11 == 0) goto L_0x00d2\n L_0x00c7:\n r14.b(r10)\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x00d1\n return\n L_0x00d1:\n r4 = 1\n L_0x00d2:\n int r7 = r7 + 1\n if (r7 != r6) goto L_0x00fb\n r7 = 0\n goto L_0x00fb\n L_0x00d8:\n r0.a(r12)\n boolean r12 = r14.d()\n if (r12 == 0) goto L_0x00b1\n return\n L_0x00e2:\n r4 = move-exception\n io.b.c.b.b(r4)\n r10.b()\n io.b.e.h.c r11 = r14.errors\n r11.a(r4)\n boolean r4 = r14.d()\n if (r4 == 0) goto L_0x00f5\n return\n L_0x00f5:\n r14.b(r10)\n int r3 = r3 + 1\n r4 = 1\n L_0x00fb:\n int r3 = r3 + r1\n goto L_0x009a\n L_0x00fd:\n r14.lastIndex = r7\n r3 = r5[r7]\n long r5 = r3.id\n r14.lastId = r5\n goto L_0x0107\n L_0x0106:\n r4 = 0\n L_0x0107:\n if (r4 == 0) goto L_0x0129\n int r3 = r14.maxConcurrency\n if (r3 == r8) goto L_0x0004\n monitor-enter(r14)\n java.util.Queue<io.b.m<? extends U>> r3 = r14.sources // Catch:{ all -> 0x0126 }\n java.lang.Object r3 = r3.poll() // Catch:{ all -> 0x0126 }\n io.b.m r3 = (io.b.m) r3 // Catch:{ all -> 0x0126 }\n if (r3 != 0) goto L_0x0120\n int r3 = r14.wip // Catch:{ all -> 0x0126 }\n int r3 = r3 - r1\n r14.wip = r3 // Catch:{ all -> 0x0126 }\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n goto L_0x0004\n L_0x0120:\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n r14.a(r3)\n goto L_0x0004\n L_0x0126:\n r0 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x0126 }\n throw r0\n L_0x0129:\n int r2 = -r2\n int r2 = r14.addAndGet(r2)\n if (r2 != 0) goto L_0x0004\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.b.e.e.d.i.b.c():void\");\n }", "C11316t5 mo29022j0();", "@Test\n public void testSampledTimeDistributedBetweenExecutionFragments() throws IOException {\n NameContext stepA = createStep(\"A\");\n NameContext stepB = createStep(\"B\");\n\n tracker.enter(stepA);\n tracker.exit();\n tracker.enter(stepB);\n tracker.exit();\n // Expected journal: IDLE A1 IDLE B1 IDLE\n\n tracker.takeSample(50);\n assertThat(getCounterValue(stepA), equalTo(distribution(10)));\n assertThat(getCounterValue(stepB), equalTo(distribution(10)));\n }", "@Converted(kind = Converted.Kind.MANUAL_SEMANTIC,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp\", line = 344,\n old_source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp\", old_line = 343,\n FQN=\"EmitRecordID\", NM=\"_ZL12EmitRecordIDjPKcRN4llvm15BitstreamWriterERNS1_15SmallVectorImplIyEE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp -nm=_ZL12EmitRecordIDjPKcRN4llvm15BitstreamWriterERNS1_15SmallVectorImplIyEE\")\n//</editor-fold>\npublic static void EmitRecordID(/*uint*/int ID, /*const*/char$ptr/*char P*/ Name, \n BitstreamWriter /*&*/ Stream, \n SmallVectorImplULong /*&*/ Record) {\n Record.clear();\n Record.push_back($uint2ullong(ID));\n Name = Native.$tryClone(Name);\n while ((Name.$star() != 0)) {\n Record.push_back($char2ullong(Name.$postInc().$star()));\n }\n \n Stream.EmitRecord(BlockInfoCodes.BLOCKINFO_CODE_SETRECORDNAME.getValue(), Record);\n}", "private void m18357t() {\n AudioProcessor[] k;\n ArrayList<AudioProcessor> newAudioProcessors = new ArrayList<>();\n for (AudioProcessor audioProcessor : m18348k()) {\n if (audioProcessor.mo25036a()) {\n newAudioProcessors.add(audioProcessor);\n } else {\n audioProcessor.flush();\n }\n }\n int count = newAudioProcessors.size();\n this.f16596P = (AudioProcessor[]) newAudioProcessors.toArray(new AudioProcessor[count]);\n this.f16597Q = new ByteBuffer[count];\n m18347j();\n }", "@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}", "@Test\n public void testDataMix()\n throws InterruptedException {\n\n createGroup(2);\n\n ReplicatedEnvironment menv = repEnvInfo[0].getEnv();\n TransactionConfig txnConfig = RepTestUtils.WNSYNC_NONE_TC;\n Transaction txn = menv.beginTransaction(null, txnConfig);\n Database db = menv.openDatabase(txn, \"mixed\", dbconfig);\n txn.commit();\n txn = null;\n RepTestUtils.syncGroup(repEnvInfo);\n\n repEnvInfo[1].closeEnv();\n assertEquals(menv.getState(), State.MASTER);\n\n final int batchBuffSize =\n Integer.parseInt(RepParams.FEEDER_BATCH_BUFF_KB.getDefault()) *\n 1024;\n\n txn = menv.beginTransaction(null, txnConfig);\n\n /*\n * Generate a log pattern with an intervening large object that serves\n * to break up a batch.\n */\n for (int size : new int[] { 1, 2, /* batch 1 */\n batchBuffSize + 1, /* break the batch */\n 3, 4 /* batch 2 */\n }) {\n IntegerBinding.intToEntry(size, key);\n data.setData(new byte[size]);\n db.put(txn, key, data);\n }\n txn.commit();\n db.close();\n\n\n ReplicatedEnvironmentStats stats =\n menv.getRepStats(StatsConfig.CLEAR);\n\n repEnvInfo[1].openEnv();\n final VLSN vlsn = RepTestUtils.syncGroup(repEnvInfo);\n\n stats = menv.getRepStats(null);\n\n /*\n * Seven total messages: 1 unconditional startup heartbeat +\n * 5 puts + 1 commit\n */\n assertEquals(7, stats.getNProtocolMessagesWritten());\n\n /* 4 puts + 1 commit batched. */\n assertEquals(5, stats.getNProtocolMessagesBatched());\n\n /* 2 batches as above. */\n assertEquals(2, stats.getNProtocolMessageBatches());\n\n RepTestUtils.checkNodeEquality(vlsn, false, repEnvInfo);\n }", "void receiveSequenceNumber() {\r\n\t\t\r\n\t}", "@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.550 -0500\", hash_original_method = \"EEAA69B320108852E46A6304535CC9F5\", hash_generated_method = \"D642B9F06D082255CC2F6570E4A84B40\")\n \npublic Message sendMessageSynchronously(int what, int arg1, int arg2, Object obj) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n msg.obj = obj;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }", "long getTimeBoltABoltB();", "@Test\n\tpublic void test_synchronization() throws InterruptedException, ExecutionException {\n\t\t\n\t\tIkanowV1SyncService_LibraryJars s1 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s2 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s3 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\t\n\t\tint old = IkanowV1SyncService_LibraryJars._num_leader_changes;\n\t\t\n\t\ts1.start(); s2.start(); s3.start();\n\t\tfor (int i = 0; i < 4; ++i) {\n\t\t\ttry { Thread.sleep(1000); } catch (Exception e) {}\n\t\t}\n\t\ts1.stop(); s2.stop(); s3.stop();\n\t\t\n\t\tassertEquals(old + 1, IkanowV1SyncService_LibraryJars._num_leader_changes);\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal ICrudService<JsonNode> v1_config_db = _service_context.getCoreManagementDbService().getUnderlyingPlatformDriver(ICrudService.class, Optional.of(\"social.share\")).get();\t\t\t\t\n\t\t\n\t\tassertTrue(\"Query optimized\", v1_config_db.deregisterOptimizedQuery(Arrays.asList(\"title\")));\n\t\t\n\t}", "long getOriginseqnum();", "public interface RecordPersister\r\n{\r\n\t/**\r\n\t * Holds all implementation-specific data in a change record\r\n\t */\r\n\tpublic static final class ChangeData\r\n\t{\r\n\t\t/**\r\n\t\t * The major subject of the change\r\n\t\t */\r\n\t\tpublic Object majorSubject;\r\n\r\n\t\t/**\r\n\t\t * The minor subject of the change\r\n\t\t */\r\n\t\tpublic Object minorSubject;\r\n\r\n\t\t/**\r\n\t\t * The first metadata of the change\r\n\t\t */\r\n\t\tpublic Object data1;\r\n\r\n\t\t/**\r\n\t\t * The second metadata of the change\r\n\t\t */\r\n\t\tpublic Object data2;\r\n\r\n\t\t/**\r\n\t\t * The previous value in the change\r\n\t\t */\r\n\t\tpublic Object preValue;\r\n\r\n\t\t/**\r\n\t\t * Creates an empty ChangeData\r\n\t\t */\r\n\t\tpublic ChangeData()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Creates a filled-out ChangeData\r\n\t\t * \r\n\t\t * @param majS The major subject for the change\r\n\t\t * @param minS The minor subject for the change\r\n\t\t * @param md1 The first metadata for the change\r\n\t\t * @param md2 The second metadata for the change\r\n\t\t * @param pv The previous value for the change\r\n\t\t */\r\n\t\tpublic ChangeData(Object majS, Object minS, Object md1, Object md2, Object pv)\r\n\t\t{\r\n\t\t\tthis();\r\n\t\t\tmajorSubject = majS;\r\n\t\t\tminorSubject = minS;\r\n\t\t\tdata1 = md1;\r\n\t\t\tdata2 = md2;\r\n\t\t\tpreValue = pv;\r\n\t\t}\r\n\t}\r\n\r\n\t// The following methods are common with Synchronize2Impl\r\n\r\n\t/**\r\n\t * Gets a record user by ID\r\n\t * \r\n\t * @param id The ID of the user\r\n\t * @return The user with the given ID\r\n\t * @throws PrismsRecordException If no such user exists or an error occurs retriving the user\r\n\t */\r\n\tRecordUser getUser(long id) throws PrismsRecordException;\r\n\r\n\t/**\r\n\t * Gets a subject type by name\r\n\t * \r\n\t * @param typeName The name of the subject type to get (see {@link SubjectType#name()})\r\n\t * @return The subject type with the given name\r\n\t * @throws PrismsRecordException If no such subject type exists or another error occurs\r\n\t */\r\n\tSubjectType getSubjectType(String typeName) throws PrismsRecordException;\r\n\r\n\t/**\r\n\t * Gets the database ID for a value\r\n\t * \r\n\t * @param item The item to get the persistence ID for\r\n\t * @return The ID to identify the object in a change record\r\n\t */\r\n\tlong getID(Object item);\r\n\r\n\t/**\r\n\t * Retrieves the values associated with a set of IDs. Each parameter may be the already-parsed\r\n\t * value (which may be simply returned in the ChangeData return), the identifier for the value,\r\n\t * the serialized value (only in the case of the preValue), or null (except in the case of the\r\n\t * major subject).\r\n\t * \r\n\t * @param subjectType The subject type of the change record\r\n\t * @param changeType The type of the change\r\n\t * @param majorSubject The major subject or the ID of the major subject to retrieve\r\n\t * @param minorSubject The minor subject or the ID of the minor subject to retrieve. May be\r\n\t * null.\r\n\t * @param data1 The first metadata or the ID of the first metadata to retrieve. May be null.\r\n\t * @param data2 The second metadata or the ID of the second metadata to retrieve. May be null.\r\n\t * @param preValue The previous value (serialized, a string) or the ID of the previous value in\r\n\t * the change to retrieve. May be null.\r\n\t * @return The ChangeData containing the values of each non-null ID.\r\n\t * @throws PrismsRecordException If an error occurs retrieving any of the data.\r\n\t */\r\n\tChangeData getData(SubjectType subjectType, ChangeType changeType, Object majorSubject,\r\n\t\tObject minorSubject, Object data1, Object data2, Object preValue)\r\n\t\tthrows PrismsRecordException;\r\n\r\n\t// End common methods\r\n\r\n\t/**\r\n\t * @return All domains that this persister understands\r\n\t * @throws PrismsRecordException If an error occurs getting the data\r\n\t */\r\n\tSubjectType [] getAllSubjectTypes() throws PrismsRecordException;\r\n\r\n\t/**\r\n\t * Gets all domains that qualify as change history for the given value's type\r\n\t * \r\n\t * @param value The value to get the history of\r\n\t * @return All domains that record history of the type of the value\r\n\t * @throws PrismsRecordException If an error occurs getting the data\r\n\t */\r\n\tSubjectType [] getHistoryDomains(Object value) throws PrismsRecordException;\r\n\r\n\t/**\r\n\t * Serializes a change's object to a string. This method will only be called for change objects\r\n\t * (previous values) if the change's ChangeType reports false for\r\n\t * {@link ChangeType#isObjectIdentifiable()}. This method will not be called for instances of\r\n\t * Boolean, Integer, Long, Float, Double, or String. Serialization of these types is handled\r\n\t * internally.\r\n\t * \r\n\t * @param change The change to serialize the previous value of\r\n\t * @return The serialized object\r\n\t * @throws PrismsRecordException If an error occurs serializing the object\r\n\t */\r\n\tString serializePreValue(ChangeRecord change) throws PrismsRecordException;\r\n\r\n\t/**\r\n\t * Called when a modification is purged that is the last link to an item in the records. The\r\n\t * persister now has an opportunity to purge the item itself if desired.\r\n\t * \r\n\t * @param item The item with no more records\r\n\t * @param stmt A database statement to make deletion easier\r\n\t * @throws PrismsRecordException If an error occurs purging the data\r\n\t */\r\n\tvoid checkItemForDelete(Object item, java.sql.Statement stmt) throws PrismsRecordException;\r\n}", "private void m145780j() {\n String str;\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if ((this.f119477j.f119578d & 536870912) != 0) {\n str = \"WAL\";\n } else {\n str = \"PERSIST\";\n }\n m145773d(str);\n }\n }", "void updateTransformQueueVersions() {\n\t}", "static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }", "@Test\n @Tag(\"bm1000\")\n public void testSHARE1B() {\n CuteNetlibCase.doTest(\"SHARE1B.SIF\", \"-76589.31857918584\", \"74562.53714565346\", NumberContext.of(4, 4));\n }", "long getTimeSpoutBoltA();", "public void synchronize(){ \r\n }", "private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void sync(){\n }", "@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.548 -0500\", hash_original_method = \"AFDADB0B0E37C71FB8D4BE31CA39F990\", hash_generated_method = \"B6827FF2C6A650BBE4692173D7372E8C\")\n \npublic Message sendMessageSynchronously(int what, int arg1, int arg2) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }", "protected boolean test2() { // testing all policies thru random sequence of page \r\n // (multiple) accesses and check for page faults and BHR\r\n \r\n System.out.print(\"\\n Starting Test 2 (testing all policies; should show difference from policy to policy)... \\n\");\r\n System.out.print(\"\\n Also, SHOULD show different values of BHR's for policies in each round... \\n\");\r\n System.out.print(\"\\n Lower # of page faults --> better replacement poliy... \\n\");\r\n System.out.println(\"\\n higher BHR values --> better replacement poliy... \\n\");\r\n \r\n\r\n // we choose this number to ensure #pages > #bufpool\r\n // will use a seq of page nums to pin and unpin\r\n boolean status = PASS;\r\n \r\n int numPages = Minibase.BufferManager.getNumUnpinned(); //buf frames\r\n int numDiskPages = numPages*BUF_SIZE_MULTIPLIER;\r\n \r\n //*System.out.print(\"numPages: buf and disk: \" + numPages + \" and \" + numDiskPages+\"\\n\");\r\n Page pg = new Page();\r\n PageId pid;\r\n PageId firstPid = new PageId();\r\n System.out.println(\" - Allocate all pages\\n\");\r\n try {\r\n firstPid = Minibase.BufferManager.newPage(pg, numDiskPages); //starting at 9\r\n } catch (Exception e) {\r\n System.err.print(\"*** Could not allocate \" + numDiskPages);\r\n System.err.print(\" new pages in the database.\\n\");\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n // unpin that first page... to simplify our loop\r\n try {\r\n Minibase.BufferManager.unpinPage(firstPid, UNPIN_CLEAN);\r\n } catch (Exception e) {\r\n System.err.print(\"*** Could not unpin the first new page.\\n\");\r\n e.printStackTrace();\r\n status = FAIL;\r\n }\r\n\r\n\r\n // now nothing is pinned; numPages in buffers and numDiskPages on disk\r\n \r\n System.out.print(\" - load pages in random order (as well as pin) to generate hits and page faults: \\n\");\r\n pid = new PageId();\r\n \r\n //just do round robin and see whether it makes a diff between LRU and clock\r\n System.out.println(\"entering round robin stage ...\\n\");\r\n int rpid;\r\n int rPage;\r\n Random randomPage = new Random();\r\n Random iter = new Random();\r\n Random pin = new Random();\r\n iter.setSeed(1347); //prime num\r\n pin.setSeed(1938);\r\n int it = MAX_ITERATIONS*BUF_SIZE_MULTIPLIER;\r\n for (int j = 1; j <= it; j++){\r\n \r\n for ( int i=0; i < numDiskPages; i++){\r\n \r\n pid.pid = firstPid.pid + i;\r\n \r\n for (int k = 1; k <= pin.nextInt(MAX_PIN_COUNT)+1; k++){\r\n try {\r\n Minibase.BufferManager.pinPage(pid, pg, PIN_DISKIO);\r\n \r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not pin new page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n } \r\n \r\n // Copy the page number + 99999 onto each page. It seems\r\n // unlikely that this bit pattern would show up there by\r\n // coincidence.\r\n int data = pid.pid + 99999;\r\n Convert.setIntValue(data, 0, pg.getData()); \r\n \r\n try {\r\n Minibase.BufferManager.unpinPage(pid, UNPIN_DIRTY);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not unpin dirty page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n } \r\n \r\n }\r\n \r\n }\r\n if (status == PASS){ \r\n //invoke print \r\n System.out.println(\" Test 2: Round Robin for \"+it+\" iterations\"); \r\n Minibase.BufferManager.printBhrAndRefCount();\r\n System.out.print(\"\\n++++++++++++++++++++++++++==============\\n\");\r\n } \r\n\r\n // randomly load pages, pin them and unpin them a large number of times\r\n // load pages in some order to generate page faults\r\n Random seq = new Random();\r\n seq.setSeed(999331); //another prime num;\r\n pin.setSeed(iter.nextInt(13447)+1);\r\n randomPage.setSeed(13); //another prime num; \r\n \r\n for (int j = 1; j <= MAX_ITERATIONS; j++){\r\n \r\n \r\n for ( int i=1; i <= seq.nextInt(MAX_SEQUENCE)+1; i++){\r\n \r\n rpid = randomPage.nextInt(numDiskPages)+1;\r\n pid.pid = firstPid.pid + rpid;\r\n \r\n for (int k = 1; k <= pin.nextInt(MAX_PIN_COUNT)+1; k++){\r\n try {\r\n Minibase.BufferManager.pinPage(pid, pg, PIN_DISKIO);\r\n \r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not pin new page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n } \r\n \r\n // Copy the page number + 99999 onto each page. It seems\r\n // unlikely that this bit pattern would show up there by\r\n // coincidence.\r\n int data = pid.pid + 99999;\r\n Convert.setIntValue(data, 0, pg.getData()); \r\n \r\n try {\r\n Minibase.BufferManager.unpinPage(pid, UNPIN_DIRTY);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not unpin dirty page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n } \r\n \r\n }\r\n if (status == PASS){ \r\n //invoke print \r\n System.out.println(\" Test 2: Iteration: \"+j); \r\n Minibase.BufferManager.printBhrAndRefCount();\r\n System.out.print(\"\\n++++++++++++++++++++++++++==============\\n\");\r\n } \r\n }\r\n \r\n if (status == PASS){\r\n System.out.println(\" Test 2 completed successfully.\\n\"); \r\n System.out.println(\"\\n compare page faults for each policy\\n\");\r\n }\r\n return status;\r\n }", "@Override\n public void func_104112_b() {\n \n }", "@Test\n @Tag(\"bm1000\")\n public void testSHARE2B() {\n CuteNetlibCase.doTest(\"SHARE2B.SIF\", \"-4.1573224074E+02\", \"-265.0981144446295\", NumberContext.of(7, 4));\n }", "@DISPID(1611005964) //= 0x6006000c. The runtime will prefer the VTID if present\n @VTID(39)\n short relationsUpdateInPartContextSynchronousRelations();", "public final void mo99822b() {\n if (this.f104207Q) {\n this.f104209S = System.currentTimeMillis();\n this.f104207Q = false;\n }\n }", "private void fiveNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pI(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\")));\n n(tx, true, \"n2\", Stream.of(pI(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\")));\n n(tx, true, \"n3\", Stream.of(pO(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pI(\"n3:4\")));\n n(tx, true, \"n4\", Stream.of(pO(\"n4:1\"), pI(\"n4:2\"), pB(\"n4:3\"), pB(\"n4:4\")));\n n(tx, true, \"n5\", Stream.of(pI(\"n5:1\"), pB(\"n5:2\"), pB(\"n5:3\"), pO(\"n5:4\")));\n l(tx, \"n2\", \"n2:3\", \"n3\", \"n3:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:1\", \"n1\", \"n1:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:3\", \"n5\", \"n5:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n4\", \"n4:1\", \"n1\", \"n1:3\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n5\", \"n5:4\", \"n4\", \"n4:2\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "public final /* synthetic */ java.lang.Object mo13031b(java.lang.String r14, kotlin.coroutines.Continuation<? super kotlin.Unit> r15) {\n /*\n r13 = this;\n boolean r0 = r15 instanceof p008c.p009a.p024e.p026b.C0963b.C0967d\n if (r0 == 0) goto L_0x0013\n r0 = r15\n c.a.e.b.b$d r0 = (p008c.p009a.p024e.p026b.C0963b.C0967d) r0\n int r1 = r0.f1060b\n r2 = -2147483648(0xffffffff80000000, float:-0.0)\n r3 = r1 & r2\n if (r3 == 0) goto L_0x0013\n int r1 = r1 - r2\n r0.f1060b = r1\n goto L_0x0018\n L_0x0013:\n c.a.e.b.b$d r0 = new c.a.e.b.b$d\n r0.<init>(r13, r15)\n L_0x0018:\n java.lang.Object r15 = r0.f1059a\n java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r2 = r0.f1060b\n r3 = 2\n r4 = 1\n if (r2 == 0) goto L_0x0059\n if (r2 == r4) goto L_0x0049\n if (r2 != r3) goto L_0x0041\n java.lang.Object r14 = r0.f1066h\n org.mobileid.time_key.util.TimeKeyParams r14 = (org.mobileid.time_key.util.TimeKeyParams) r14\n java.lang.Object r14 = r0.f1065g\n org.mobileid.requester.web_service.Response r14 = (org.mobileid.requester.web_service.Response) r14\n java.lang.Object r14 = r0.f1064f\n java.lang.String r14 = (java.lang.String) r14\n java.lang.Object r14 = r0.f1063e\n java.lang.String r14 = (java.lang.String) r14\n java.lang.Object r14 = r0.f1062d\n c.a.e.b.b r14 = (p008c.p009a.p024e.p026b.C0963b) r14\n kotlin.ResultKt.throwOnFailure(r15)\n goto L_0x00c0\n L_0x0041:\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r15 = \"call to 'resume' before 'invoke' with coroutine\"\n r14.<init>(r15)\n throw r14\n L_0x0049:\n java.lang.Object r14 = r0.f1064f\n java.lang.String r14 = (java.lang.String) r14\n java.lang.Object r2 = r0.f1063e\n java.lang.String r2 = (java.lang.String) r2\n java.lang.Object r5 = r0.f1062d\n c.a.e.b.b r5 = (p008c.p009a.p024e.p026b.C0963b) r5\n kotlin.ResultKt.throwOnFailure(r15)\n goto L_0x0085\n L_0x0059:\n kotlin.ResultKt.throwOnFailure(r15)\n c.a.e.c.a r15 = r13.f1032c\n java.lang.String r15 = r15.mo13035a()\n if (r15 == 0) goto L_0x00c3\n org.mobileid.time_key.web_service.TimeKeyWebService r2 = r13.f1031b\n org.mobileid.time_key.web_service.ActionOnKeyBody r11 = new org.mobileid.time_key.web_service.ActionOnKeyBody\n r8 = 0\n r9 = 4\n r10 = 0\n r5 = r11\n r6 = r14\n r7 = r15\n r5.<init>(r6, r7, r8, r9, r10)\n r0.f1062d = r13\n r0.f1063e = r14\n r0.f1064f = r15\n r0.f1060b = r4\n java.lang.Object r2 = r2.deactivateKey(r11, r0)\n if (r2 != r1) goto L_0x0080\n return r1\n L_0x0080:\n r5 = r13\n r12 = r2\n r2 = r14\n r14 = r15\n r15 = r12\n L_0x0085:\n org.mobileid.requester.web_service.Response r15 = (org.mobileid.requester.web_service.Response) r15\n java.lang.Object r6 = r15.getResult()\n java.lang.Boolean r6 = (java.lang.Boolean) r6\n java.lang.Boolean r7 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r4)\n boolean r6 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r6, (java.lang.Object) r7)\n r4 = r4 ^ r6\n if (r4 == 0) goto L_0x009b\n kotlin.Unit r14 = kotlin.Unit.INSTANCE\n return r14\n L_0x009b:\n org.mobileid.time_key.util.TimeKeyParams$a r4 = org.mobileid.time_key.util.TimeKeyParams.Companion\n android.content.Context r6 = r5.f1030a\n org.mobileid.time_key.util.TimeKeyParams r4 = r4.mo60138a(r6)\n kotlinx.coroutines.MainCoroutineDispatcher r6 = kotlinx.coroutines.Dispatchers.getMain()\n c.a.e.b.b$e r7 = new c.a.e.b.b$e\n r8 = 0\n r7.<init>(r5, r4, r8)\n r0.f1062d = r5\n r0.f1063e = r2\n r0.f1064f = r14\n r0.f1065g = r15\n r0.f1066h = r4\n r0.f1060b = r3\n java.lang.Object r14 = kotlinx.coroutines.BuildersKt.withContext(r6, r7, r0)\n if (r14 != r1) goto L_0x00c0\n return r1\n L_0x00c0:\n kotlin.Unit r14 = kotlin.Unit.INSTANCE\n return r14\n L_0x00c3:\n kotlin.Unit r14 = kotlin.Unit.INSTANCE\n return r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p008c.p009a.p024e.p026b.C0963b.mo13031b(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object\");\n }", "private static void getSCset(){\n\t\ttry{\n\t\t\tSystem.out.print(\"SC set being processed\\n\");\n\t\t\tPreparedStatement pstm1 = CAMPS_CONNECTION.prepareStatement(\"select cluster_id, cluster_threshold from cp_clusters2 where type=?\");\n\t\t\tPreparedStatement pstm2 = CAMPS_CONNECTION.prepareStatement(\"select sequenceid from clusters_mcl2 where cluster_id=? and cluster_threshold=? \");\n\t\t\tpstm1.setString(1, \"sc_cluster\");\n\t\t\tResultSet rs1 = pstm1.executeQuery();\n\t\t\twhile(rs1.next()){\n\t\t\t\tint clusid = rs1.getInt(1);\n\t\t\t\tfloat thresh = rs1.getFloat(2);\n\t\t\t\tpstm2.setInt(1, clusid);\n\t\t\t\tpstm2.setFloat(2, thresh);\n\t\t\t\tint seqid;\n\t\t\t\tResultSet rs2 = pstm2.executeQuery();\n\t\t\t\twhile(rs2.next()){\n\t\t\t\t\tseqid = rs2.getInt(1);\n\t\t\t\t\tint tmNo = Initial_sequences.get(seqid);\n\t\t\t\t\tSC_sequences.put(seqid, tmNo);\n\t\t\t\t}\n\t\t\t\trs2.close();\n\t\t\t\tpstm2.clearBatch();\n\n\t\t\t}\n\t\t\trs1.close();\n\t\t\tpstm1.close();\n\t\t\tpstm2.close();\n\n\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args)\n\t\t\tthrows CloneNotSupportedException, SQLException, ClassNotFoundException, DAOException, IOException, CustomException {\n\t\tif(GeneralDAO.getRooms().size()<2){\n\t\t\tTransactionStatus.setStatusMessage(\"There must be atleast 2 rooms !\");\n\t\t\tthrow new CustomException(\"\");\n\t\t}\n\t\tTimeTableEndSem TT = new TimeTableEndSem();\n\t\tSet<Integer> set = new HashSet<>();// stores batch numbers of\n\t\t\t\t\t\t\t\t\t\t\t// timeinterval2 of odd slots\n\t\t// Running main algorithm for all the slots.It creates timetable of all\n\t\t// the slots separately.\n\t\tfor (int h = 0; h < TT.getSlot().length; h++)//\n\t\t{\n\t\t\tSystem.out.println(\"**************************SLOT NO: \" + (h + 1) + \"****************************\");\n\t\t\t// System.out.println(\"Room No Course ID Course Name\");\n\n\t\t\t// if((h+1)%2==0)\n\t\t\t// {\n\t\t\t// set.removeAll(set);//clear set for reuse\n\t\t\t// }\n\t\t\t//\n\n\t\t\tTimeInterval time1 = new TimeInterval(1);\n\t\t\tTimeInterval time2 = new TimeInterval(2);\n\t\t\tint flag = 0;// a flag to use to forcibly exit loops or restarting\n\t\t\t\t\t\t\t// loops.\n\t\t\tTimeInterval[] array = { time1, time2 };\n\t\t\tint p = 0;\n\t\t\tSlot slot = TT.getSlot()[h];\n\n\t\t\tif (h == 0) {\n\n\t\t\t\tHashSet<Integer> set2 = new HashSet<>();\n\t\t\t\tfor (Course course : GeneralDAO.getCourses(2)) {\n\t\t\t\t\tset2.add(Integer.parseInt(course.getBatch()));\n\t\t\t\t}\n\t\t\t\tfor (Course course : slot.getCourses()) {\n\t\t\t\t\tif (set2.contains(Integer.parseInt(course.getBatch()))) {\n\t\t\t\t\t\tcourse.setSlot1priority(1);\n\t\t\t\t\t}\n\t\t\t\t//\tSystem.out.println(course + \" and priority: \" + course.getSlot1priority());\n\t\t\t\t}\n\n\t\t\t\t// System.out.println(\"set2\"+set2);\n\t\t\t\t// for(Course course:slot.getSlot2courses())\n\t\t\t\t// System.out.println(course);\n\t\t\t} else if (h != 0) {\n\t\t\t\tfor (Course course : slot.getCourses()) {\n\t\t\t\t\tif (set.contains(Integer.parseInt(course.getBatch()))) {\n\t\t\t\t\t\tcourse.setFlag_clash(1);\n\t\t\t\t\t\t// System.out.println(\"setting flag_clash=1:::\"+course);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tset.removeAll(set);\n\t\t\tint k = 1;\n\t\t\t\n\t\t\tbuffer=new ArrayList<>();\n\t\t\twhile (slot.slotProcessed())// if all the courses are processed,\n\t\t\t\t\t\t\t\t\t\t// then loop breaks.\n\t\t\t{\n\t\t\t\t\n\t\t\t\tCourse tempCourse = slot.chosingCourse();// refer slot class for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// details\n\t\t\t\tbuffer.add(new Course(tempCourse));//copy of new course so that initial state is always fresh even if \n\t\t\t\t//source ArrayList in slot class is updated(when course is processed=true).\n\t\t\t\tCollections.sort(buffer, new CourseComparatorByCapacity());//reassigning priorities in descending order.\n\t\t\t\tSystem.out.println(\"Buffer:\");\n\t\t\t\tfor(Course course:buffer)\n\t\t\t\t\tSystem.out.println(course);\n\t\t\t\t//System.out.println(\"Address of:\"+tempCourse.getCourse_name()+\"\"+tempCourse);\n\t\t\t\tTimeInterval[] array2=null;\n\t\t\t\t\n\t\t\t\tbuffer_copy=new ArrayList<>();\n//\t\t\t\tfor(Course course:buffer)\n//\t\t\t\t{\n//\t\t\t\t\tCourse course_copy=new Course(course);\n//\t\t\t\t\tbuffer_copy.add(course_copy);\n//\t\t\t\t}\n\t\t\t\tUtility1 utility=null;\n\t\t\t\tboolean flag_failed_verified=false;\n\t\t\t\t\n\t\t\t\tif(true)//Except slot 1,all the slots are getting processed through buffer concept.\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tfor(Course course:buffer)\n\t\t\t\t\t{//\tSystem.out.println(\"buffer size:\"+buffer.size());\n\t\t\t\t\t\t//Course course=buffer.get(i);\n\t\t\t\t\t\t//System.out.println(\"Going bhaiuiiiiiiiiiiiiiiiiiiiii\");\n\t\t\t\t\t\t//System.out.println(course.hashCode());\n\t\t\t\t\tutility=TT.dynamicAllot(array2, course, slot, TT, 1,0,\"buffer\");\n\t\t\t\t\t//System.out.println(course.hashCode());\n\t\t\t\t\t//System.out.println(course.getProcessed());\n\t\t\t\t\t//System.out.println(\"Going bhaiuiiiiiiiiiiiiiiiiiiiii55555555\");\n\t\t\t\t//\tk=utility.k;//useless in this case.\n\t\t\t\t\tarray2=utility.array;//restoring array and slot after processing in above function.\n\t\t\t\t\tslot=utility.slot;\n\t\t\t\t\t//System.out.println(\"********************\");\n\t\t\t\t\tbuffer_copy.add(utility.course);// Storing all the courses of this buffer. This buffer_copy contains\n\t\t\t\t\t//Courses when all the courses from buffer have been processed and this needs to be updated to chosingCourse()\n\t\t\t\t\t//so that it choses next prior course.\n//\t\t\t\t\tarray2[0].print();\n//\t\t\t\t\tarray2[1].print();\n\t\t\t\t\tSystem.out.println(utility.course.getUnallocated_strength());\n\t\t\t\t\t\tif(utility.flag_failed==1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Flag Failed is verified\");\n\t\t\t\t\t\t\tflag_failed_verified=true;\n\t\t\t\t\t\t//\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t//\tSystem.out.println(course);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//For first slot, no buffer concept and if a course could not be processed or it lead to alter the existing ti 2\n\t\t\t\t//structure, undo it and reallocate it in normal case. below is normal case as for slot1. Check TimeTable class\n\t\t\t\t//for CourseIntact. \n\t\t\t\t//NORMAL ALLOTMENT OPTION\n\t\t\t\tif(!TT.courseIntact(array, array2) || flag_failed_verified==true) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(tempCourse+\"finally going to ti2\");\n//\t\t\t\t\tif(!TT.courseIntact(array, array2))\n//\t\t\t\t\t\tk=1;//always gives k=0 if slot is not 1. Basically, I have ruled out alternating k from slot >1\n\t\t\t\t\t//System.out.println(\"In normal case,\"+buffer.get(0).getUnallocated_strength());\n\t\t\t\tUtility1 utility2=TT.dynamicAllot(array, tempCourse, slot, TT, 1,1,\"normal\");// normal case.\n\t\t\t//\tk=utility2.k;\n\t\t\t\tarray=utility2.array;\n\t\t\t\tslot=utility2.slot;\n\t\t\t\t//pass on course\n\t\t\t\t//System.out.println(\"----------\"+utility2.course+\" \"+utility2.course.getProcessed());\n\t\t\t\t\t\n\t\t\t\t//updating course in the source ArrayList of Slot class which chosingCourse() uses.\n\t\t\t\tfor(int n=0;n<slot.getCourses().size();n++)\n\t\t\t\t\t{\n\t\t\t\t\t\tCourse course2=slot.getCourses().get(n);\n\t\t\t\t\t\t\tif(course2.getCourse_id().equals(utility2.course.getCourse_id()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tslot.getCourses().set(n, utility2.course);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{//if courseIntact is true, it means our buffer is successfully processed. Now, replace the existing \n\t\t\t\t\t//timeinterval with new one with updated data.\n\t\t\t\t\tarray=array2;\n\t\t\t\t\t\n\t\t\t\t\t//Further, update all the courses from buffer with modified state in buffer_copy to source arraylist\n\t\t\t\t\t//of slot class.\n\t\t\t\t\tfor(int n=0;n<slot.getCourses().size();n++)\n\t\t\t\t\t{\n\t\t\t\t\t\tCourse course2=slot.getCourses().get(n);\n\t\t\t\t\t\tfor(Course course3:buffer_copy)\n\t\t\t\t\t\t\tif(course2.getCourse_id().equals(course3.getCourse_id()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tslot.getCourses().set(n, course3);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tslot.updateProcessCount(); //One iteration of while loop processes one course \n\t\t\t\t//fully irrespective of the fact that it has been failed, allocated in one go or in different buffer.\n\t\t\t\t\n\t\t\t}\n\t\t\tarray[0].print();\n\t\t\tarray[1].print();\n\t\t\tTT.getStore().put(h + 1, new StoreTT(h + 1, array[0], array[1]));\n\t\t\t//System.out.println(\"It's really painful************\");\n//\t\t\tSet<Course> set1 = new HashSet<>();\n//\t\t\tfor (ArrayList<OccupationData> od : array[0].getMap().values()) {\n//\t\t\t\tfor (int hh = 0; hh < od.size(); hh++) {\n//\t\t\t\t\tset1.add(od.get(hh).getCourse());\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t//System.out.println(\"set1\" + set1 + \"for k=\" + k);\n\t\t\t// System.out.println(set);\n\t\t\tif (!array[0].getMap().isEmpty())// if time2 has some courses\n\t\t\t\t\t\t\t\t\t\t\t\t// allocated\n\t\t\t{//System.out.println(\"Printingggg\"+array[0].getMap().size());\n\t\t\t\tfor (ArrayList<OccupationData> od : array[0].getMap().values())// stores\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// all\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// batches\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// time2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// set\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(\"Printing\"+od.size());\n\t\t\t\t \tfor (int hh = 0; hh < od.size(); hh++) {\n\t\t\t\t\t\tset.add(Integer.parseInt(od.get(hh).getCourse().getBatch()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(set);\n\t\t}\n\t\t// It prints data in excel sheet and exports a .xlsx file\n\t\t// PrintExcel excel=new PrintExcel();\n\t\tPrintExcelEndSem excel = new PrintExcelEndSem();\n\n\t\tSystem.out.println(\"Following courses Failed\");\n\t\tfailedCourses = TT.getFailed();\n\t\tfor(Course course:failedCourses)\n\t\t{\n\t\t\tSystem.out.println(course.getCourse_name());\n\t\t}\n\t\texcel.createExcelSheet(TT);\n\t\t// Map<Course,Integer> map=GenerateTT.printUnallocatedStudents(TT);\n\t}", "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 testSplitParallelOldCompactingEventLogging() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset28.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertFalse(JdkUtil.LogEventType.UNKNOWN.toString() + \" collector identified.\",\n jvmRun.getEventTypes().contains(LogEventType.UNKNOWN));\n Assert.assertTrue(\"Log line not recognized as \" + JdkUtil.LogEventType.PARALLEL_OLD_COMPACTING.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.PARALLEL_OLD_COMPACTING));\n Assert.assertTrue(Analysis.ERROR_GC_TIME_LIMIT_EXCEEEDED + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_GC_TIME_LIMIT_EXCEEEDED));\n Assert.assertTrue(Analysis.ERROR_GC_TIME_LIMIT_EXCEEEDED + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_GC_TIME_LIMIT_EXCEEEDED));\n }" ]
[ "0.5396893", "0.5165006", "0.5142127", "0.5136404", "0.50484365", "0.50479573", "0.50046444", "0.49894774", "0.49869132", "0.49601293", "0.49334422", "0.49187377", "0.4896941", "0.4894737", "0.48512515", "0.4846756", "0.48400897", "0.48200917", "0.48023993", "0.47950768", "0.4792788", "0.47785094", "0.4772935", "0.47708338", "0.4761523", "0.47477415", "0.47326866", "0.47088543", "0.469114", "0.46883658", "0.46870446", "0.46866566", "0.4670873", "0.46700394", "0.46604913", "0.46587366", "0.46437308", "0.46432298", "0.4639677", "0.46339378", "0.4631409", "0.4626761", "0.46191883", "0.46159923", "0.46136886", "0.46106523", "0.46093956", "0.46046022", "0.46031135", "0.4594883", "0.45939398", "0.45885402", "0.458846", "0.45734942", "0.45675132", "0.45635602", "0.45613158", "0.45583293", "0.45579237", "0.45573196", "0.45561233", "0.45559043", "0.45545986", "0.4553365", "0.45516193", "0.4551514", "0.45453328", "0.45443475", "0.45427877", "0.45410535", "0.45361722", "0.45338687", "0.45314014", "0.45287406", "0.45266798", "0.4524725", "0.45246962", "0.45242527", "0.4519828", "0.4515655", "0.4514854", "0.4510115", "0.45100164", "0.45092714", "0.45092443", "0.45078275", "0.45051938", "0.4504674", "0.45024753", "0.45017892", "0.4501656", "0.44969404", "0.4490651", "0.44893497", "0.4485698", "0.44830668", "0.4481955", "0.44818842", "0.44801936", "0.44781423", "0.44771785" ]
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() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); txtsearches = new javax.swing.JTextField(); Search = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jTable2 = new javax.swing.JTable(); Update = new javax.swing.JButton(); Delete = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); Sess = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); list = new javax.swing.JComboBox<>(); jLabel12 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N jLabel1.setText("Manage Session Locations"); jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(217, 11, -1, -1)); txtsearches.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtsearchesActionPerformed(evt); } }); txtsearches.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { txtsearchesKeyPressed(evt); } public void keyReleased(java.awt.event.KeyEvent evt) { txtsearchesKeyReleased(evt); } }); jPanel1.add(txtsearches, new org.netbeans.lib.awtextra.AbsoluteConstraints(205, 51, 298, 33)); Search.setBackground(new java.awt.Color(0, 102, 204)); Search.setForeground(new java.awt.Color(255, 255, 255)); Search.setText("Search"); jPanel1.add(Search, new org.netbeans.lib.awtextra.AbsoluteConstraints(521, 51, 88, 33)); jTable2.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "SRID", "Session", "Room" } )); jTable2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTable2MouseClicked(evt); } }); jScrollPane2.setViewportView(jTable2); jPanel1.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 102, 698, 210)); Update.setBackground(new java.awt.Color(0, 102, 204)); Update.setForeground(new java.awt.Color(255, 255, 255)); Update.setText("Update"); Update.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { UpdateActionPerformed(evt); } }); jPanel1.add(Update, new org.netbeans.lib.awtextra.AbsoluteConstraints(585, 444, 88, 33)); Delete.setBackground(new java.awt.Color(0, 102, 204)); Delete.setForeground(new java.awt.Color(255, 255, 255)); Delete.setText("Delete"); Delete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DeleteActionPerformed(evt); } }); jPanel1.add(Delete, new org.netbeans.lib.awtextra.AbsoluteConstraints(312, 323, 88, 33)); jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel3.setText("Session :"); jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 399, -1, -1)); Sess.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SessActionPerformed(evt); } }); jPanel1.add(Sess, new org.netbeans.lib.awtextra.AbsoluteConstraints(84, 395, 330, 29)); jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel4.setText("Room :"); jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(446, 399, -1, -1)); list.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) { } public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) { listPopupMenuWillBecomeInvisible(evt); } public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { } }); list.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { listMouseClicked(evt); } }); list.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { listActionPerformed(evt); } }); jPanel1.add(list, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 392, 163, 34)); jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/timetablems/1799658.jpg"))); // NOI18N jPanel1.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 720, 550)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\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 MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\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 frmVenda() {\n initComponents();\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 EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\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 }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\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 CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\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 FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7319037", "0.7290621", "0.7290621", "0.7290621", "0.7285163", "0.72480375", "0.72130316", "0.7207723", "0.7195822", "0.7189463", "0.7183591", "0.71580946", "0.7147075", "0.70924276", "0.70795405", "0.7056352", "0.6986753", "0.6976759", "0.6954958", "0.69533294", "0.6944831", "0.69417095", "0.6934517", "0.6930924", "0.6926761", "0.69241685", "0.6923851", "0.69112706", "0.6910913", "0.689217", "0.689193", "0.6890017", "0.68896353", "0.6888143", "0.68825865", "0.6881063", "0.6880471", "0.6877822", "0.68752986", "0.6873734", "0.68713146", "0.6859294", "0.6856707", "0.685489", "0.6854541", "0.68543345", "0.68526614", "0.68516856", "0.68516856", "0.6842822", "0.6836592", "0.6836195", "0.68277925", "0.6827518", "0.68260497", "0.682339", "0.68222433", "0.6816619", "0.6815844", "0.68096834", "0.6808133", "0.68078655", "0.6807532", "0.68070555", "0.6802426", "0.6794083", "0.679347", "0.6791848", "0.6790225", "0.6788846", "0.67884487", "0.6787538", "0.67819446", "0.6766094", "0.676505", "0.6764832", "0.67562455", "0.6754961", "0.67515653", "0.6750421", "0.6742601", "0.673875", "0.67371166", "0.6735209", "0.6732373", "0.6727282", "0.6726048", "0.6719771", "0.67154175", "0.6714355", "0.671359", "0.67079127", "0.670646", "0.670331", "0.6700197", "0.669957", "0.6698499", "0.6697054", "0.6693929", "0.6690299", "0.66896695" ]
0.0
-1
/ Set the Nimbus look and feel / If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. For details see
public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(SessionLocationManage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(SessionLocationManage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(SessionLocationManage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(SessionLocationManage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new SessionLocationManage().setVisible(true); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setLookAndFeel() {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n\n // TODO: Configure theming colors. UIManager.put(property, new Color(...));\n // {@see http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html}\n\n\t\t\tfinal NimbusLookAndFeel laf = new NimbusLookAndFeel();\n UIManager.setLookAndFeel(laf);\n UIDefaults defaults = laf.getDefaults();\n defaults.put(\"List[Selected].textForeground\",\n laf.getDerivedColor(\"nimbusLightBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Selected].textBackground\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Disabled+Selected].textBackground\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Disabled].textForeground\",\n laf.getDerivedColor(\"nimbusDisabledText\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List:\\\"List.cellRenderer\\\"[Disabled].background\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n\n } catch (Exception e) {}\n }", "@SuppressWarnings(\"unused\")\n private static void activateNimbus() //just for testing reasons\n {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (Exception e) {\n log.warn(\"error in nimbus activation?\", e);\n }\n }", "static void customizeNimbus()\r\n\t\tthrows Exception\r\n\t{\n\t\tUIManager.put(\"control\", BACKGROUND);\r\n\r\n\t\t// TODO: imilne 04/SEP/2009 - No longer working since JRE 1.6.0_u13\r\n\t\tif (SystemUtils.isWindows())\r\n\t\t{\r\n\t\t\tUIManager.put(\"defaultFont\", FONT);\r\n\t\t\tUIManager.put(\"Label[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"Table[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"TableHeader[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"TabbedPane[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"ComboBox[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"Button[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"ToggleButton[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"TextField[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"CheckBox[Enabled].font\", FONT);\r\n\t\t}\r\n\r\n\t\tfor (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels())\r\n\t\t\tif (laf.getName().equals(\"Nimbus\"))\r\n\t\t\t\tUIManager.setLookAndFeel(laf.getClassName());\r\n\r\n\r\n\t\tUIManager.put(\"SplitPane[Enabled].size\", 8);\r\n\r\n\t\tUIManager.put(\"nimbusOrange\", new Color(51, 98, 140));\r\n//\t\tUIManager.put(\"nimbusOrange\", new Color(57, 105, 138));\r\n//\t\tUIManager.put(\"nimbusOrange\", new Color(115, 164, 209));\r\n\r\n\r\n\t\t// Reset non-Aqua look and feels to use CMD+C/X/V rather than CTRL for copy/paste stuff\r\n\t\tif (SystemUtils.isMacOS())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Setting OS X keyboard shortcuts\");\r\n\r\n\t\t\tInputMap textField = (InputMap) UIManager.get(\"TextField.focusInputMap\");\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.META_DOWN_MASK), DefaultEditorKit.copyAction);\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.META_DOWN_MASK), DefaultEditorKit.pasteAction);\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.META_DOWN_MASK), DefaultEditorKit.cutAction);\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK), DefaultEditorKit.selectAllAction);\r\n\r\n\t\t\tInputMap textArea = (InputMap) UIManager.get(\"TextArea.focusInputMap\");\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.META_DOWN_MASK), DefaultEditorKit.copyAction);\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.META_DOWN_MASK), DefaultEditorKit.pasteAction);\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.META_DOWN_MASK), DefaultEditorKit.cutAction);\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK), DefaultEditorKit.selectAllAction);\r\n\t\t}\r\n\t}", "public final static void setDesign() {\n\t\t\ttry{\n\t\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.out.println(\"Prob with setDesign()\");\n\t\t\t}\n\t\t\t\n\t\t}", "public static void LookAndFeel() {\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); // uniformed\n\t\t} catch (Exception exc) {\n\t\t}\n\t}", "public examreports() {\n dblogincred();\n initComponents();\n try {\n for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n} catch (Exception e) {\n // If Nimbus is not available, you can set the GUI to another look and feel.\n}\n }", "private static void setLook() {\r\n try {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n } catch (IllegalAccessException ex) {\r\n ex.printStackTrace();\r\n } catch (UnsupportedLookAndFeelException ex) {\r\n ex.printStackTrace();\r\n } catch (ClassNotFoundException ex) {\r\n ex.printStackTrace();\r\n } catch (InstantiationException ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "private boolean isNimbus()\n/* */ {\n/* 152 */ return UIManager.getLookAndFeel().getName().contains(\"Nimbus\");\n/* */ }", "private void LookAndFeel() {\n try {\n // Set System L&F\n BasicLookAndFeel darcula = new DarculaLaf();\n UIManager.setLookAndFeel(darcula);\n } catch (UnsupportedLookAndFeelException e) {\n // handle exception\n }\n }", "private String getLookAndFeelClassName(String nimbus) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "protected static void initLnF() {\r\n try {\r\n if (!\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\".equals(UIManager.getSystemLookAndFeelClassName())\r\n && !\"com.sun.java.swing.plaf.gtk.GTKLookAndFeel\".equals(UIManager.getSystemLookAndFeelClassName())\r\n && !UIManager.getSystemLookAndFeelClassName().equals(UIManager.getLookAndFeel().getClass().getName())) {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private static void setLookAndFeel() { \r\n try {\r\n UIManager.setLookAndFeel(\"javax.swing.plaf.metal.MetalLookAndFeel\"); \r\n } catch (final UnsupportedLookAndFeelException e) {\r\n System.out.println(\"UnsupportedLookAndFeelException\");\r\n } catch (final ClassNotFoundException e) {\r\n System.out.println(\"ClassNotFoundException\");\r\n } catch (final InstantiationException e) {\r\n System.out.println(\"InstantiationException\");\r\n } catch (final IllegalAccessException e) {\r\n System.out.println(\"IllegalAccessException\");\r\n } \r\n }", "private void configuraInterface() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\t\ttry\t{\n\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tSystem.out.println(\"Falhou o carregamento do L&F: \");\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "public static void windowLookAndFeel(){\r\n\t try{\r\n\t UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t }catch (Exception e) {\r\n\t System.out.println(\"Look and Feel error: \" + e);\r\n\t }\r\n\t}", "private static void setLookAndFeel() {\n\tSystem.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\n\n\ttry {\n\t UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\n\t //copy progress bar of System LAF\n\t HashMap<Object, Object> progressDefaults = new HashMap<Object, Object>();\n\t for (Map.Entry<Object, Object> entry : UIManager.getDefaults()\n\t\t .entrySet()) {\n\t\tif (entry.getKey().getClass() == String.class\n\t\t\t&& ((String) entry.getKey()).startsWith(\"ProgressBar\")) {\n\t\t progressDefaults.put(entry.getKey(), entry.getValue());\n\t\t}\n\t }\n\n\t prepareLayout();\n\n\t UIManager\n\t\t .setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\n\t // copy back progress bar of metal Look and Feel\n\t for (Map.Entry<Object, Object> entry : progressDefaults.entrySet()) {\n\t\tUIManager.getDefaults().put(entry.getKey(), entry.getValue());\n\t }\n\t} catch (ClassNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (InstantiationException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (IllegalAccessException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (UnsupportedLookAndFeelException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t}\n\n }", "private void nativeLookAndFeel() {\n\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException e) {\n e.printStackTrace();\n }\n }", "private void setNativeLAndF() {\r\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (Exception e) {\r\n\t\t\t//do nothing. It will default to normal\r\n\t\t}\r\n\t}", "public void applyLookAndFeel() {\n\r\n\t\tLookAndFeelInfo[] infos = UIManager.getInstalledLookAndFeels();\r\n\r\n\t\tif (look < 0) {\r\n\t\t\tfor (int i = 0; i < infos.length; i++) {\r\n\t\t\t\tif (infos[i].getName().toUpperCase().contains(\"NIMBUS\")) {\r\n\t\t\t\t\tlook = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (look < 0) {\r\n\t\t\tfor (int i = 0; i < infos.length; i++) {\r\n\t\t\t\tif (infos[i].getName().toUpperCase().contains(\"WINDOW\")) {\r\n\t\t\t\t\tlook = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlook = (Math.abs(look) % infos.length);\r\n\r\n\t\tString lookName = infos[look].getName();\r\n\r\n\t\ttry {\r\n \t\tUIManager.setLookAndFeel(infos[look].getClassName());\r\n \t\tsetTitle(JMTKResizer.ABOUT + \" - \" + lookName);\r\n \tSwingUtilities.updateComponentTreeUI(this);\r\n \t\t//pack();\r\n\r\n \t} catch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n\t}", "private void menuNimbusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuNimbusActionPerformed\n try {\n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\");\n SwingUtilities.updateComponentTreeUI(this);\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private static void initLookAndFeel()\n {\n try \n {\n UIManager.setLookAndFeel(\"de.javasoft.plaf.synthetica.SyntheticaAluOxideLookAndFeel\");\n }\n \n catch(ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e)\n {\n JOptionPane.showMessageDialog(null, \"Failed to load resource package\");\n }\n }", "private void setupLookAndFeel() {\n SwingUtilities.invokeLater(() -> {\n model.getUserPreferences().getThemeSubject().subscribe((skin) -> {\n try {\n UIManager.setLookAndFeel(new SubstanceLookAndFeel(\n (SubstanceSkin) skin.getTheme().newInstance()\n ) {\n });\n if (frame != null) {\n frame.repaint();\n }\n } catch (UnsupportedLookAndFeelException | InstantiationException | IllegalAccessException e) {\n ExceptionHandler.get().handle(e);\n }\n });\n });\n }", "public static void setLookAndFeel(){\n\t\t\n\t\tUIManager.put(\"nimbusBase\", new Color(0,68,102));\n\t\tUIManager.put(\"nimbusBlueGrey\", new Color(60,145,144));\n\t\tUIManager.put(\"control\", new Color(43,82,102));\n\t\tUIManager.put(\"text\", new Color(255,255,255));\n\t\tUIManager.put(\"Table.alternateRowColor\", new Color(0,68,102));\n\t\tUIManager.put(\"TextField.font\", new Font(\"Font\", Font.BOLD, 12));\n\t\tUIManager.put(\"TextField.textForeground\", new Color(0,0,0));\n\t\tUIManager.put(\"PasswordField.foreground\", new Color(0,0,0));\n\t\tUIManager.put(\"TextArea.foreground\", new Color(0,0,0));\n\t\tUIManager.put(\"FormattedTextField.foreground\", new Color(0,0,0));\n\t\t\n\t\tUIManager.put(\"ComboBox:\\\"ComboBox.listRenderer\\\".background\", new Color(0,68,102));\n\t\tUIManager.put(\"ComboBox:\\\"ComboBox.listRenderer\\\"[Selected].background\", new Color(0,0,0));\n\t\t\n\t\t//TODO nie chca dzialac tooltipy na mapie\n\t\tBorder border = BorderFactory.createLineBorder(new Color(0,0,0)); //#4c4f53\n\t\tUIManager.put(\"ToolTip.border\", border);\n\n\t\t//UIManager.put(\"ToolTip.foregroundInactive\", new Color(0,0,0));\n\t\t//UIManager.put(\"ToolTip.backgroundInactive\", new Color(0,0,0));\n\t\t//UIManager.put(\"ToolTip.background\", new Color(0,0,0)); //#fff7c8\n\t\t//UIManager.put(\"ToolTip.foreground\", new Color(0,0,0));\n\t\t Painter<Component> p = new Painter<Component>() {\n\t\t public void paint(Graphics2D g, Component c, int width, int height) {\n\t\t g.setColor(new Color(20,36,122));\n\t\t //and so forth\n\t\t }\n\t\t };\n\t\t \n\t\tUIManager.put(\"ToolTip[Enabled].backgroundPainter\", p);\n\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foregroundInactive\", new Color(255, 255, 255));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"backgroundInactive\", new Color(255, 255, 255));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.background\", new Color(255, 255, 255)); //#fff7c8\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foreground\", new Color(255, 255, 255));\n//\t\t\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foregroundInactive\",new ColorUIResource(new Color(255, 255, 255)));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"backgroundInactive\", new ColorUIResource((new Color(255, 255, 255))));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.background\", new ColorUIResource(new Color(255, 255, 255))); //#fff7c8\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foreground\", new ColorUIResource(new Color(255, 255, 255)));\n\t\t\n\t \n\t\ttry {\n\t\t for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n\t\t if (\"Nimbus\".equals(info.getName())) {\n\t\t UIManager.setLookAndFeel(info.getClassName());\n\t\t break;\n\t\t }\n\t\t }\n\t\t} catch (Exception e) {\n\t\t // If Nimbus is not available, you can set the GUI to another look and feel.\n\t\t}\n\n\t\tUIManager.getLookAndFeelDefaults().put(\"Table:\\\"Table.cellRenderer\\\".background\", new ColorUIResource(new Color(74,144,178)));\n\t\tUIManager.getLookAndFeelDefaults().put(\"Table.background\", new ColorUIResource(new Color(74,144,178)));\n\t\t\n\n\t}", "public static String setLookAndFeel(String look) {\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); //$NON-NLS-1$\n // Display slider value is set to false (already in all LAF by the panel title), used by GTK LAF\n UIManager.put(\"Slider.paintValue\", Boolean.FALSE); //$NON-NLS-1$\n\n String laf = getAvailableLookAndFeel(look);\n try {\n UIManager.setLookAndFeel(laf);\n } catch (Exception e) {\n laf = UIManager.getSystemLookAndFeelClassName();\n LOGGER.error(\"Unable to set the Look&Feel\", e); //$NON-NLS-1$\n }\n // Fix font issue for displaying some Asiatic characters. Some L&F have special fonts.\n setUIFont(new javax.swing.plaf.FontUIResource(\"SansSerif\", Font.PLAIN, 12)); //$NON-NLS-1$\n return laf;\n }", "public JFind2() {\n try {\n String metal = \"javax.swing.plaf.metal.MetalLookAndFeel\";\n String synth = \"javax.swing.plaf.synth.SynthLookAndFeel\"; // --> since JDK-1.5\n\n String gtk = \"com.sun.java.swing.plaf.gtk.GTKLookAndFeel\"; // -> since JDK-1.4\n\n String motif = \"com.sun.java.swing.plaf.motif.MotifLookAndFeel\";\n String windows = \"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\";\n\n String os = System.getProperty(\"os.name\");\n if (os.startsWith(\"Linux\")) {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(metal);\n } catch (Exception e) {\n }\n } else {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n }\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n preInit();\n initComponents();\n postInit();\n\n }", "public void lookandfeel(){\n \n try{\n UIManager.setLookAndFeel(seta_look);\n SwingUtilities.updateComponentTreeUI(this);\n }\n catch(Exception erro){\n JOptionPane.showMessageDialog(null, erro);\n \n }\n}", "public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException,\n\t\t\tUnsupportedLookAndFeelException {\n\t\tdetermineOS();\n\t\tif (currentOs == MAC_OS) {\n\t\t\tSystem.setProperty(\"com.apple.mrj.application.apple.menu.about.name\", \"UP-Admin\");\n\t\t\tSystem.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\n\t\t\tSystem.setProperty(\"com.apple.mrj.application.live-resize\", \"true\");\n\n\t\t\ttry {\n\t\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (UnsupportedLookAndFeelException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if ((currentOs == WIN_OS) || (currentOs == null)) {\n\n\t\t\tUIManager.put(\"nimbusBase\", new Color(0x525252));\n\t\t\tUIManager.put(\"control\", new Color(0x949494));\n\t\t\tUIManager.put(\"nimbusSelectionBackground\", new Color(0x171717));\n\t\t\tUIManager.put(\"Menu.background\", new Color(0x2B2B2B));\n\t\t\tUIManager.put(\"background\", new Color(0x171717));\n\t\t\tUIManager.put(\"DesktopIcon.background\", new Color(0x171717));\n\t\t\tUIManager.put(\"nimbusLightBackground\", new Color(0xE3E3E3));\n\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\t\t\t\n\t\t}\n\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tFrame frame = new Frame();\n\t\t\t\t\tframe.setVisible(true);\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void setupSwing() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n \r\n try {\r\n for (LookAndFeelInfo info: UIManager.getInstalledLookAndFeels()) {\r\n if (info.getName().equals(\"Windows\")) {\r\n UIManager.setLookAndFeel(info.getClassName());\r\n }\r\n }\r\n } catch (ClassNotFoundException \r\n | InstantiationException\r\n | IllegalAccessException \r\n | UnsupportedLookAndFeelException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n \r\n window = new ManagerWindow(MetagridManager.this);\r\n window.pack();\r\n window.setVisible(true);\r\n }\r\n });\r\n }", "public static void main(String[] args) {\r\n SageLife sagelife = new SageLife();\r\n\r\n try {\r\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\r\n if (\"Nimbus\".equals(info.getName())) {\r\n UIManager.setLookAndFeel(info.getClassName());\r\n break;\r\n }\r\n }\r\n } catch (Exception e) {\r\n // If Nimbus is not available, you can set the GUI to another look and feel.\r\n }\r\n\r\n sagelife.createLayout();\r\n }", "private LookAndFeelManager() {}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n \n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n \n \n /* Create and display the form */ \n \n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new home().setVisible(true);\n }\n });\n }", "public Q4() {\n initComponents();\n looks=UIManager.getInstalledLookAndFeels();\n }", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n UI tesis = new UI();\n tesis.setVisible(true);\n try {\n tesis.inicializar(); \n } catch (NullPointerException e) {\n System.out.println(\"Ejecución terminada forzosamente\");\n System.exit(1);\n }\n }\n });\n }", "@Override\n public void init() {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the applet */\n try {\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n public void run() {\n initComponents();\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\r\n public void init() {\r\n /* Set the Nimbus look and feel */\r\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\r\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\r\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \r\n */\r\n try {\r\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\r\n if (\"Nimbus\".equals(info.getName())) {\r\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\r\n break;\r\n }\r\n }\r\n } catch (ClassNotFoundException ex) {\r\n java.util.logging.Logger.getLogger(IMC.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (InstantiationException ex) {\r\n java.util.logging.Logger.getLogger(IMC.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (IllegalAccessException ex) {\r\n java.util.logging.Logger.getLogger(IMC.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\r\n java.util.logging.Logger.getLogger(IMC.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n }\r\n //</editor-fold>\r\n\r\n /* Create and display the applet */\r\n try {\r\n java.awt.EventQueue.invokeAndWait(new Runnable() {\r\n public void run() {\r\n initComponents();\r\n }\r\n });\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "private void configureUI() {\r\n // UIManager.put(\"ToolTip.hideAccelerator\", Boolean.FALSE);\r\n\r\n Options.setDefaultIconSize(new Dimension(18, 18));\r\n\r\n Options.setUseNarrowButtons(settings.isUseNarrowButtons());\r\n\r\n // Global options\r\n Options.setTabIconsEnabled(settings.isTabIconsEnabled());\r\n UIManager.put(Options.POPUP_DROP_SHADOW_ENABLED_KEY,\r\n settings.isPopupDropShadowEnabled());\r\n\r\n // Swing Settings\r\n LookAndFeel selectedLaf = settings.getSelectedLookAndFeel();\r\n if (selectedLaf instanceof PlasticLookAndFeel) {\r\n PlasticLookAndFeel.setPlasticTheme(settings.getSelectedTheme());\r\n PlasticLookAndFeel.setTabStyle(settings.getPlasticTabStyle());\r\n PlasticLookAndFeel.setHighContrastFocusColorsEnabled(\r\n settings.isPlasticHighContrastFocusEnabled());\r\n } else if (selectedLaf.getClass() == MetalLookAndFeel.class) {\r\n MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());\r\n }\r\n\r\n // Work around caching in MetalRadioButtonUI\r\n JRadioButton radio = new JRadioButton();\r\n radio.getUI().uninstallUI(radio);\r\n JCheckBox checkBox = new JCheckBox();\r\n checkBox.getUI().uninstallUI(checkBox);\r\n\r\n try {\r\n UIManager.setLookAndFeel(selectedLaf);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't change L&F: \" + e);\r\n }\r\n\r\n }", "public static void main(String[] args) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(siniestro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(siniestro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(siniestro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(siniestro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n JFrame frame = new JFrame();\n frame.setContentPane(new siniestro());\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.pack();\n frame.setVisible(true);\n }\n });\n }", "@Override\n public void init() {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n getContentPane().setBackground(Color.BLUE);\n this.setSize(450, 350);\n\n /* Create and display the applet */\n /*try {\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n public void run() {\n initComponents();\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n */\n run();\n }", "public static void start() {\n\t\ttry {\n\t\t\tfor (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n\t\t\t\tif (\"Nimbus\".equals(info.getName())) {\n\t\t\t\t\tjavax.swing.UIManager.setLookAndFeel(info.getClassName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException ex) {\n\t\t\tjava.util.logging.Logger.getLogger(GUInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n\t\t} catch (InstantiationException ex) {\n\t\t\tjava.util.logging.Logger.getLogger(GUInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n\t\t} catch (IllegalAccessException ex) {\n\t\t\tjava.util.logging.Logger.getLogger(GUInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n\t\t} catch (javax.swing.UnsupportedLookAndFeelException ex) {\n\t\t\tjava.util.logging.Logger.getLogger(GUInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n\t\t}\n //</editor-fold>\n\n\t\t/* Create and display the form */\n\t\tjava.awt.EventQueue.invokeLater(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew GUInterface().setVisible(true);\n\t\t\t}\n\t\t});\n\t}", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(HFGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(HFGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(HFGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(HFGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new HFGUI().setVisible(true);\n }\n });\n }", "public void setTheme(String name) {\n\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (name.equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n }", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new InicioSesion().setVisible(true);\n }\n });\n }", "public static void main(String[] args) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(JFrame_Accueil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(JFrame_Accueil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(JFrame_Accueil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(JFrame_Accueil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n \n /* Create and display the form */\n java.awt.EventQueue.invokeLater(() -> {\n try {\n new JFrame_Accueil(0).setVisible(true);\n } catch (Exception ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n });\n }", "public static void main(String[] args) {\r\n /* Set the Nimbus look and feel */\r\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\r\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\r\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html\r\n */\r\n try {\r\n javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());\r\n } catch (ClassNotFoundException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (InstantiationException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (IllegalAccessException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n }\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n\r\n /* Create and display the form */\r\n EventQueue.invokeLater(new Runnable() {\r\n public void run() {\r\n JFrame frame = new JFrame();\r\n frame.setContentPane(new FrameCuentasContablesAdmin());\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.pack();\r\n frame.setVisible(true);\r\n }\r\n });\r\n }", "private void changeUIdefaults() {\n\t\tUIManager.put(\"TaskPaneContainer.useGradient\", Boolean.FALSE);\n\t\tUIManager.put(\"TaskPaneContainer.background\",\n\t\t\t\tColors.LightGray.color(0.5f));\n\n\t\t// setting taskpane defaults\n\t\tUIManager.put(\"TaskPane.font\", new FontUIResource(new Font(\"Verdana\",\n\t\t\t\tFont.BOLD, 16)));\n\t\tUIManager.put(\"TaskPane.titleBackgroundGradientStart\",\n\t\t\t\tColors.White.color());\n\t\tUIManager.put(\"TaskPane.titleBackgroundGradientEnd\",\n\t\t\t\tColors.LightBlue.color());\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n \n\n}\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n \n\n} catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n \n\n} catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n \n\n} catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new NewJFrame1().setVisible(true);\n }\n });\n }", "@Override\r\n\tpublic void run() {\n\t\ttry {\r\n\t\t\tLookAndFeelInfo look[] = UIManager.getInstalledLookAndFeels();\r\n\t\t\tfor (LookAndFeelInfo lookAndFeelInfo : look) {\r\n\r\n\t\t\t\tSystem.out.println(lookAndFeelInfo.getClassName());\r\n\t\t\t}\r\n\t\t\tUIManager.setLookAndFeel(this.config.getLookAndFeel());\r\n\t\t} catch (ClassNotFoundException | InstantiationException\r\n\t\t\t\t| IllegalAccessException | UnsupportedLookAndFeelException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tsetVisible(true);\r\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {\n Logger.getLogger(InterpreterGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(() -> {\n new InterpreterGui().setVisible(true);\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Calculator().setVisible(true);\n }\n } \n );\n}", "public void setLAF(String lookAndFeelStr) {\n String exceptionNotice = \"\";\n try {\n // Set the font for Metal LAF to non-bold, in case Metal is used\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n if (lookAndFeelStr == null || lookAndFeelStr.equalsIgnoreCase(\"Metal\")) {\n UIManager.setLookAndFeel(new MetalLookAndFeel());\n } else\n if (lookAndFeelStr.equalsIgnoreCase(\"Nimbus\")) {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (info.getName().equals(\"Nimbus\")) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } else {\n UIManager.setLookAndFeel(lookAndFeelStr);\n }\n } catch (UnsupportedLookAndFeelException e) {\n exceptionNotice = \"UnsupportedLookAndFeelException\";\n } catch (ClassNotFoundException e) {\n exceptionNotice = \"ClassNotFoundException\";\n } catch (InstantiationException e) {\n exceptionNotice = \"InstantiationException\";\n } catch (IllegalAccessException e) {\n exceptionNotice = \"IllegalAccessException\";\n } finally {\n if (! exceptionNotice.isEmpty()) {\n try {\n // The desired LAF was not created, so try to use the Metal LAF as a default.\n UIManager.setLookAndFeel(new MetalLookAndFeel());\n } catch (UnsupportedLookAndFeelException e) {\n logger.error(\"Could not initialize the Swing Look and Feel settings, MCT is closing.\");\n System.exit(1);\n }\n }\n }\n // Look and Feel has been successfully created, now set colors\n initializeColors(UIManager.getLookAndFeel());\n Properties props = new Properties();\n String filename = System.getProperty(viewColor,\"resources/properties/viewColor.properties\");\n FileReader reader = null;\n try {\n \treader = new FileReader(filename);\n \tprops.load(reader);\n BASE_PROPERTIES = new ColorScheme(props);\n BASE_PROPERTIES.applyColorScheme(); // Apply top-level color bindings\n } catch (Exception e) {\n logger.warn(\"Using default color and font properties because could not open viewColor properties file :\"+filename);\n BASE_PROPERTIES = new ColorScheme();\n } finally {\n \ttry {\n if (reader != null) reader.close();\n } catch(IOException ioe1){ }\n }\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Form().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(LibroDiario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(LibroDiario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(LibroDiario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(LibroDiario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new LibroDiario().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(KamarFrom.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(KamarFrom.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(KamarFrom.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(KamarFrom.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new KamarFrom().setVisible(true);\n }\n });\n }", "protected void installDefaults() {\n this.controlPanel.setBackground(null);\n\n Font font = this.controlPanel.getFont();\n if (font == null || font instanceof UIResource) {\n Font toSet = RadianceThemingCortex.GlobalScope.getFontPolicy().getFontSet().\n getControlFont();\n this.controlPanel.setFont(toSet);\n }\n }", "static public LookAndFeelManager createDefaultLookAndFeelManager()\n {\n LookAndFeelManager manager = new LookAndFeelManager();\n\n /* =-=AEW DO NOT register the external look-and-feels; these\n class names are UIX 2.2 look-and-feels, which won't (and can't)\n work in UIX 3, given the different class names. Only uncomment\n if and when such classes are ported to UIX 3.\n // support requests from iasWireless if laf can be found\n _registerExternalLookAndFeel(manager, iaswLaf, _IASW_SCORER);\n\n // register OA's Text LAF if laf can be found\n _registerExternalLookAndFeel(manager, _OA_TEXT_LAF, _OA_TEXT_SCORER);\n */\n\n // Base lafs\n BaseDesktopUtils.registerLookAndFeel(manager);\n\n SimpleDesktopUtils.registerLookAndFeel(manager);\n SimplePdaUtils.registerLookAndFeel(manager);\n\n return manager;\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Puntos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Puntos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Puntos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Puntos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Puntos().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(HW3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(HW3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(HW3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(HW3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new HW3().setVisible(true);\n }\n });\n }", "public Vista_Login() {\n \t\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Vista_Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Vista_Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Vista_Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Vista_Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(FrmLoguin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(FrmLoguin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(FrmLoguin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(FrmLoguin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new FrmLoguin().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Musica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Musica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Musica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Musica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Musica().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Register().setVisible(true);\n }\n });\n }", "public static void main(String[] args) throws Exception{\n\t\tUIManager.setLookAndFeel(new NimbusLookAndFeel());\n\t\t\n\t\t\n\t\tMyWindow myWindow = new MyWindow();\n\t\tmyWindow.setVisible(true);\n\n\t}", "public static void main(String[] args) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(CadContasReceitasDespesasView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(CadContasReceitasDespesasView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(CadContasReceitasDespesasView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(CadContasReceitasDespesasView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n JFrame frame = new JFrame();\n frame.setContentPane(new CadContasReceitasDespesasView());\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.pack();\n frame.setVisible(true);\n frame.setTitle(args[0]);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Setup().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(sinavlar2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(sinavlar2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(sinavlar2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(sinavlar2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /*\n * Create and display the form\n */\n java.awt.EventQueue.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n new sinavlar2().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Registracija.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Registracija.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Registracija.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Registracija.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Registracija().setVisible(true);\n }\n });\n }", "private void applyInitialLook() {\r\n\t\tthis.control.setFont(this.initialFont);\r\n\t\tthis.control.setBackground(this.initialBackgroundColor);\r\n\t\tthis.control.setForeground(this.initialForegroundColor);\r\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new main().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(UsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(UsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(UsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(UsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() {\n JFrame frame = new JFrame(\"Inscrição\");\n frame.add(new InscricaoView());\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.pack();\n frame.setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(cusRegister.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(cusRegister.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(cusRegister.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(cusRegister.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n new cusRegister().setVisible(true);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(cusRegister.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(RamkaGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(RamkaGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(RamkaGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(RamkaGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new RamkaGui().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new adminhome().setVisible(true);\n }\n });\n }", "public static void main(String[] args) \n\t{\n\t\tCommonMethods.openConnection();\n\t\ttry {\n \t for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n \t if (\"Nimbus\".equals(info.getName())) {\n \t UIManager.setLookAndFeel(info.getClassName());\n \t break;\n \t }\n \t }\n \t} catch (Exception e) {\n \t // If Nimbus is not available, you can set the GUI to another look and feel.\n \t}\n\t\t\n\t\tnew AddNewCustomer();\n\n\t}", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Stock_Management.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Stock_Management.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Stock_Management.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Stock_Management.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Stock_Management().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(kullaniciEkrani.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(kullaniciEkrani.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(kullaniciEkrani.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(kullaniciEkrani.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new kullaniciEkrani().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(UIHorariosLista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(UIHorariosLista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(UIHorariosLista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(UIHorariosLista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new UIHorariosLista().setVisible(true);\n }\n });\n }", "protected void installDefaults() {\n spinner.setLayout(createLayout());\n LookAndFeel.installBorder(spinner, \"Spinner.border\");\n LookAndFeel.installColorsAndFont(spinner, \"Spinner.background\", \"Spinner.foreground\", \"Spinner.font\"); }", "public static void startTrayIcon() {\r\n try {\r\n \tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\r\n } catch (Exception ex) {\r\n \tJOptionPane.showMessageDialog(null, \"Error setting Look & Feel \"+ex, \"Error setting Look & Feel\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n /* Turn off metal's use of bold fonts */\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n //Schedule a job for the event-dispatching thread:\r\n //adding TrayIcon.\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n });\r\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(UrunListele.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(UrunListele.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(UrunListele.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(UrunListele.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new UrunListele().setVisible(true);\n }\n });\n }", "public static void main(final String[] args) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(ClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(ClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(ClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ClienteView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n JFrame frame = new JFrame();\n frame.setContentPane(new ClienteView());\n frame.pack();\n frame.setVisible(true);\n frame.setTitle(args[0]);\n \n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Register.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n new Register().setVisible(true);\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n }", "public static void main(String[] args) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n// */\n// try {\n// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n// if (\"Nimbus\".equals(info.getName())) {\n// javax.swing.UIManager.setLookAndFeel(info.getClassName());\n// break;\n// }\n// }\n// } catch (ClassNotFoundException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// } catch (InstantiationException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// } catch (IllegalAccessException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// }\n //</editor-fold>\n\n /* Create and display the form */\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n JFrame frame = new JFrame();\n frame.setContentPane(new CatcTitles());\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.pack();\n frame.setVisible(true);\n }\n });\n }", "public CalculatorGUI() {\n initComponents();\n setTitle(\"Calculator\");\n //setLookAndFeel(\"Windows\");\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Kayıt_Sil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Kayıt_Sil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Kayıt_Sil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Kayıt_Sil.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold> \n\n /* Create and display the form */\n \n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Kayıt_Sil().setVisible(true);\n }\n });\n }", "private void menuMotifActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuMotifActionPerformed\n try {\n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n SwingUtilities.updateComponentTreeUI(this);\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(TelaDelProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(TelaDelProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(TelaDelProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(TelaDelProduto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n }", "private void setAppearance(String className) {\n DweezilUIManager.setLookAndFeel(className, new Component[]{MainFrame.getInstance(), StatusWindow.getInstance(),\n PrefsSettingsPanel.this.getParent().getParent()});\n\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(SpaceSim.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() {\n new SpaceSim().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(segundapartepestaña5.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(segundapartepestaña5.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(segundapartepestaña5.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(segundapartepestaña5.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new segundapartepestaña5().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(frmBuscarRemitentes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(frmBuscarRemitentes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(frmBuscarRemitentes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(frmBuscarRemitentes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n frmBuscarRemitentes dialog = new frmBuscarRemitentes(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(FRM_Venta.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(FRM_Venta.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(FRM_Venta.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(FRM_Venta.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new FRM_Venta().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(JFMenu_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(JFMenu_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(JFMenu_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(JFMenu_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new TelaCliente().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(ImagenesProducto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(ImagenesProducto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(ImagenesProducto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ImagenesProducto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new ImagenesProducto().setVisible(true);\n }\n });\n }", "protected void installDefaults() {\n\t\tColor bg = this.controlPanel.getBackground();\n\t\tif (bg == null || bg instanceof UIResource) {\n\t\t\tthis.controlPanel.setBackground(FlamingoUtilities.getColor(\n\t\t\t\t\tColor.lightGray, \"ControlPanel.background\",\n\t\t\t\t\t\"Panel.background\"));\n\t\t}\n\n\t\tBorder b = this.controlPanel.getBorder();\n\t\tif (b == null || b instanceof UIResource) {\n\t\t\tBorder toSet = UIManager.getBorder(\"ControlPanel.border\");\n\t\t\tif (toSet == null)\n\t\t\t\tnew BorderUIResource.EmptyBorderUIResource(1, 2, 1, 2);\n\t\t\tthis.controlPanel.setBorder(toSet);\n\t\t}\n\t\t\n\t\tFont font = this.controlPanel.getFont();\n if (font == null || font instanceof UIResource) {\n Font toSet = UIManager.getFont(\"Panel.font\");\n this.controlPanel.setFont(toSet);\n }\n\t}", "public MainFrame() throws Exception {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n //SynthLookAndFeel laf = new SynthLookAndFeel();\r\n //UIManager.setLookAndFeel(laf);\r\n initComponents();\r\n }", "public static void main(String args[]) {\r\n try {\r\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\r\n if (\"Nimbus\".equals(info.getName())) {\r\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\r\n break;\r\n }\r\n }\r\n } catch (ClassNotFoundException ex) {\r\n java.util.logging.Logger.getLogger(Roysched.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (InstantiationException ex) {\r\n java.util.logging.Logger.getLogger(Roysched.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (IllegalAccessException ex) {\r\n java.util.logging.Logger.getLogger(Roysched.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\r\n java.util.logging.Logger.getLogger(Roysched.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n }\r\n //</editor-fold>\r\n\r\n /* Create and display the form */\r\n java.awt.EventQueue.invokeLater(new Runnable() {\r\n public void run() {\r\n new Roysched().setVisible(true);\r\n }\r\n });\r\n }", "protected void uninstallDefaults() {\n\t\tLookAndFeel.uninstallBorder(this.controlPanel);\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(jfmActividades.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(() -> {\n new jfmActividades().setVisible(true);\n });\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (Exception ex) {\r\n\t\t}\r\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(ThermalInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(ThermalInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(ThermalInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ThermalInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new ThermalInfo().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(HomePage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(HomePage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(HomePage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(HomePage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new HomePage().setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(VentaForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(VentaForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(VentaForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(VentaForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new VentaForm().setVisible(true);\n }\n });\n }" ]
[ "0.7949466", "0.77678406", "0.77014554", "0.75048727", "0.72873574", "0.72277147", "0.72225314", "0.7220189", "0.7180793", "0.715599", "0.7119849", "0.71114343", "0.7099229", "0.7061084", "0.70494634", "0.6913015", "0.68168384", "0.6704861", "0.6695491", "0.65845054", "0.6573556", "0.6528766", "0.6525613", "0.6504428", "0.64160395", "0.6404021", "0.62604433", "0.6259327", "0.6220051", "0.61894524", "0.61679137", "0.6138321", "0.613477", "0.60774195", "0.60601723", "0.6056137", "0.60298187", "0.60262346", "0.59957993", "0.59469336", "0.5899613", "0.5884047", "0.5861567", "0.58553094", "0.5805362", "0.5792035", "0.5785492", "0.5770589", "0.5744062", "0.573892", "0.5725975", "0.5658419", "0.565503", "0.5652242", "0.5650314", "0.5621781", "0.56048226", "0.559999", "0.55846626", "0.5573202", "0.5571328", "0.5567944", "0.5567544", "0.5561785", "0.5546505", "0.554524", "0.5516809", "0.55152255", "0.55119425", "0.54975146", "0.5490067", "0.54893714", "0.5472577", "0.54711866", "0.5454439", "0.5451569", "0.54515624", "0.5446751", "0.54435956", "0.54375476", "0.54315025", "0.542946", "0.54248655", "0.5419848", "0.54154974", "0.5401916", "0.54017365", "0.5385322", "0.53763974", "0.5363888", "0.5362744", "0.53530765", "0.5352077", "0.53333944", "0.53288656", "0.5322265", "0.53211516", "0.532111", "0.53198427", "0.53194875", "0.5313361" ]
0.0
-1
A new alphabet containing CHARS. Character number k has index K (numbering from 0). No character may be duplicated.
Alphabet(String chars) { _charsString = chars; _chars = new char[chars.length()]; for (int i = 0; i < _chars.length; i += 1) { if (alreadyAdded(chars.charAt(i))) { throw new EnigmaException("Alphabet cannot have duplicates."); } else { _chars[i] = chars.charAt(i); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "private void generateCipher()\n {\n for (int i = 0; i < 26; i++)\n {\n if (((i + shiftKey) < 26) && ((i + shiftKey) >= 0))\n {\n cipherAlphabet[i] = Alphabet[i + shiftKey];\n }\n else\n {\n cipherAlphabet[i] = Alphabet[(i + shiftKey) - 26];\n }\n } \n }", "public static String[] generateRegularAlphabet()\n {\n String[] regularAlphabet = new String[26];\n for(int index = 0; index<regularAlphabet.length; index++)\n {\n regularAlphabet[index] = (char)(index+65) + \"\";\n }\n return regularAlphabet;\n }", "private String createAlphabeticalIndex(int replicateIndex) {\n StringBuilder builder = new StringBuilder();\n while (replicateIndex >= 26) {\n builder.append((char) (97 + (replicateIndex % 26)));\n replicateIndex /= 26;\n replicateIndex--;\n }\n builder.append((char) (97 + replicateIndex));\n return builder.reverse().toString();\n\n }", "static String caesarCipher(String s, int k) {\n char[] chars = s.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n chars[i] = shift(chars[i], k);\n }\n return new String(chars);\n }", "private String shiftAlphabet(int key) {\n return ALPHABET.substring(key) + ALPHABET.substring(0, key);\n }", "private TreeMap<Character, Character> generateMap() {\r\n this.charMap = new TreeMap<Character, Character>();\r\n // generates an array of characters representing the alphabet\r\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\r\n\r\n for (int i=0; i<26; i++) {\r\n this.charMap.put(alphabet[i], alphabet[(i+key) % 26]);\r\n }\r\n\r\n return this.charMap;\r\n }", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "public CharCharMap(final char[] k, final char[] v) {\n this(k, v, DEFAULT_LOAD_FACTOR);\n }", "private void changeCipher(char keyChar) {\n int index = (keyChar - 'a');\n char[] temp = Arrays.copyOfRange(ALPHABET, 0, index);\n for (int i = index; i < ALPHABET.length; i++) {\n cipher[i-index] = ALPHABET[i];\n }\n for (int j = 0; j < index; j++) {\n cipher[cipher.length - 1 - index] = temp[j];\n }\n }", "private String removeAlphabets(String s, int k) {\n int windowSize=k;\n Stack<Character>st=new Stack<>();\n Stack<Integer> count=new Stack<>();\n char[] chars = s.toCharArray();\n for (char ch:chars){\n if(st.isEmpty() || !st.isEmpty() && ch!=st.peek()){\n st.push(ch);\n count.push(1);\n }\n else if(!st.isEmpty() && !count.isEmpty() && ch==st.peek()){\n st.push(ch);\n count.push(count.peek()+1);\n if(count.peek()==k){\n while (k>0){\n count.pop();\n st.pop();\n k--;\n }\n k=windowSize;\n }\n }\n\n }\n StringBuffer sb=new StringBuffer();\n while (!st.isEmpty()){\n sb.append(st.pop());\n }\n return sb.reverse().toString();\n }", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "public static char generateLetter() {\n\t\t\n\t\treturn (char)((int)('A' + Math.random() * ('Z' - 'A' + 1)));\n\t}", "private String method2(char[] arr, int k) {\n StringBuilder sb = new StringBuilder();\n for (char c : arr) {\n while (k > 0 && sb.length() > 0 && sb.charAt(sb.length() - 1) > c) {\n sb.deleteCharAt(sb.length() - 1);\n k--;\n }\n sb.append(c);\n }\n while (k > 0) {\n sb.deleteCharAt(sb.length() - 1);\n k--;\n }\n return sb.toString();\n }", "static char shift(char c, int key) {\n // Handle key values >=ALPHABET_LENGTH \n key %= ALPHABET_LENGTH;\n char start = Character.isUpperCase(c) ? 'A' : 'a';\n // Shift down to 0-25 for a-z\n char shifted = (char) (c - start);\n // Handle wrap-around for negative values:\n shifted = (char) ((shifted + key + ALPHABET_LENGTH) % ALPHABET_LENGTH);\n return (char) (shifted + start);\n }", "public Set<Character> alphabet(){\n\t\tSet<Character> a = new HashSet<Character>();\n\t\ta.addAll(gauche.alphabet());\n\t\ta.addAll(droit.alphabet());\n\t\treturn a;\n\t}", "protected char encode(char current) {\n int index = 0;\n charactersRead++;\n int startPos = charactersRead % keyword.length();\n changeCipher(keyword.charAt(startPos));\n\n for(int i = 0; i < ALPHABET.length; i++) {\n if (ALPHABET[i] == current) {\n index = i;\n }\n }\n return cipher[index];\n }", "public String key_fill(String K, char[][] table)\r\n {\r\n int c=0, x=0, ni=0, nj=0, z=0;\r\n K=K.toUpperCase(); //converting the whole key to uppercase\r\n int l=K.length();\r\n String key1=\"\";\r\n \r\n //checking whether any letter is present more than once or not.\r\n for(int i=0; i<l-1; i++) \r\n {\r\n for(int j=i+1; j<l; j++)\r\n {\r\n if(K.charAt(i)==K.charAt(j))\r\n {\r\n c++; //c -> count. \r\n break; //If any letter is present more than once c becomes 1 & the loops are terminated.\r\n }\r\n }\r\n }\r\n \r\n //If any letter is present more than once execute this loop.\r\n if(c==1) \r\n {\r\n int l1=key1.length();\r\n \r\n //removing the extra letters\r\n for(int i =0; i<l; i++)\r\n {\r\n l1=key1.length();\r\n for(int j=0; j<l1; j++)\r\n {\r\n if(K.charAt(i)==key1.charAt(j))\r\n x++;\r\n }\r\n if(x==0)\r\n key1=key1+K.charAt(i);\r\n x=0;\r\n }\r\n \r\n int len=key1.length();\r\n int u=0, v=0;\r\n \r\n //checking the no. of I & J\r\n for(int i=0; i<len; i++)\r\n {\r\n if(key1.charAt(i)=='I')\r\n u++;\r\n else if(key1.charAt(i)=='J')\r\n v++;\r\n }\r\n \r\n //if i & j both are present, transform it to a \"only i present key\"\r\n if(u>0 && v>0)\r\n {\r\n String str=\"\";\r\n \r\n //if j is encountered in the key, ignore it. Take only the i.\r\n for(int i=0; i<len; i++)\r\n {\r\n if(key1.charAt(i)!='J')\r\n str=str+key1.charAt(i); //creating the new key with no J in it\r\n else\r\n continue;\r\n }\r\n key1=str; //storing the new key to key1\r\n }\r\n len=key1.length();\r\n \r\n ni=len/5; //checking the no. of rows the key requires\r\n nj=len%5; //checking the no. of columns (other than the full rows) the key requires\r\n \r\n //if the key requires more than or equal to 1 row\r\n if(ni>0)\r\n {\r\n //filling the complete rows first\r\n for(int i=0;i<ni;i++)\r\n {\r\n for(int j=0; j<5; j++)\r\n {\r\n table[i][j]=key1.charAt(z);\r\n z++;\r\n }\r\n }\r\n \r\n //then filling the independent columns\r\n for(int i=0; i<nj; i++)\r\n {\r\n table[ni][nj]=key1.charAt(z);\r\n z++;\r\n }\r\n }\r\n \r\n //if the key requires less than 1 row then execute this\r\n else\r\n {\r\n for(int i=0; i<nj; i++)\r\n {\r\n table[0][i]=key1.charAt(i);\r\n }\r\n }\r\n return key1; //after the table is filled, the transformed key is sent to main\r\n }\r\n \r\n \r\n //if no letter in the key is reapeated.\r\n else \r\n {\r\n int u=0, v=0;\r\n \r\n //counting the no. of i and j\r\n for(int i=0; i<l; i++)\r\n {\r\n if(K.charAt(i)=='I')\r\n u++;\r\n else if(K.charAt(i)=='J')\r\n v++;\r\n }\r\n \r\n //if i & j both are present, transform it to a \"only i present key\"\r\n if(u>0 && v>0)\r\n {\r\n String str=\"\";\r\n \r\n //if j is encountered in the key, ignore it. Take only the i.\r\n for(int i=0; i<l; i++)\r\n {\r\n if(K.charAt(i)!='J')\r\n str=str+K.charAt(i); //creating the new key with no J in it\r\n else\r\n continue;\r\n }\r\n K=str; //storing the new key to K\r\n }\r\n l=K.length();\r\n \r\n ni=l/5; //checking the no. of rows the key requires\r\n nj=l%5; //checking the no. of columns (other than the full rows) the key requires\r\n \r\n \r\n //if the key requires more than or equal to 1 row\r\n if(ni>0)\r\n {\r\n //filling the complete rows first\r\n for(int i=0; i<ni; i++)\r\n {\r\n for(int j=0;j<5;j++)\r\n {\r\n table[i][j]=K.charAt(z);\r\n z++;\r\n }\r\n }\r\n \r\n //then filling the independent columns\r\n for(int i=0; i<nj; i++)\r\n {\r\n table[ni][i]=K.charAt(z);\r\n z++;\r\n }\r\n }\r\n \r\n \r\n //if the key requires less than 1 row then execute this\r\n else\r\n {\r\n for(int i=0; i<nj; i++)\r\n {\r\n table[0][i]=K.charAt(i);\r\n }\r\n }\r\n \r\n return K; //after the table is filled, the transformed key is sent to main \r\n }\r\n }", "private char generateRandomCharacter(){\n String alphabets = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n Random rand = new Random();\n int randomNumber = rand.nextInt(26);\n return alphabets.charAt(randomNumber);\n }", "Alphabet(String chars) {\n if (chars.contains(\"(\") || chars.contains(\")\") || chars.contains(\"*\")) {\n throw error(\"Parentheses and asterisks not permitted in alphabet.\");\n }\n Map<Character, Integer> map = new HashMap<>();\n char[] string2chars = chars.toCharArray();\n for (char c : string2chars) {\n if (map.containsKey(c)) {\n throw error(\"Repeated character found: %c\", c);\n } else {\n map.put(c, 1);\n }\n }\n\n _chars = chars;\n }", "private void buildKeyMap() {\n\t\tcharMapKey = new HashMap<Character , Integer>();\n\t\tcharMapKey.put('a', 0);\n\t\tcharMapKey.put('b', 0);\n\t\tcharMapKey.put('c', 1);\n\t\tcharMapKey.put('d', 1);\n\t\tcharMapKey.put('e', 2);\n\t\tcharMapKey.put('f', 2);\n\t\tcharMapKey.put('g', 3);\n\t\tcharMapKey.put('h', 3);\n\t\tcharMapKey.put('i', 4);\n\t\tcharMapKey.put('j', 4);\n\t\tcharMapKey.put('k', 5);\n\t\tcharMapKey.put('l', 5);\n\t\tcharMapKey.put('m', 6);\n\t\tcharMapKey.put('n', 6);\n\t\tcharMapKey.put('o', 7);\n\t\tcharMapKey.put('p', 7);\n\t\tcharMapKey.put('q', 8);\n\t\tcharMapKey.put('r', 8);\n\t\tcharMapKey.put('s', 9);\n\t\tcharMapKey.put('t', 9);\n\t\tcharMapKey.put('u', 10);\n\t\tcharMapKey.put('v', 10);\n\t\tcharMapKey.put('w', 11);\n\t\tcharMapKey.put('x', 11);\n\t\tcharMapKey.put('y', 12);\n\t\tcharMapKey.put('z', 12);\n\t}", "char toChar(int index) {\n return _letters.charAt(index);\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Enter The Cipher Text Here\");\r\n String cipherText= input.nextLine();\r\n //remove all spaces from input string\r\n String CTremovingSpaces = cipherText.replaceAll(\"\\\\s\", \"\");\r\n //convert the input string into UpperCase letters\r\n CTremovingSpaces = CTremovingSpaces.toUpperCase();\r\n //remove all special characters from the input String\r\n System.out.println(CTremovingSpaces.replaceAll(\"[^a-zA-Z0-9]\", \"\"));\r\n \r\n //create object of class indexOfCharacters\r\n indexOfCharacters indexOfDecryptedText = new indexOfCharacters();\r\n \r\n // loop for characters\r\n for(int i =0; i<26; i++){\r\n //variable to hold the results of PlainText\r\n String plainText=\"\";\r\n //key\r\n int key = i;\r\n //loop for final cipher text after removing spaces and special characters\r\n for(int j=0; j<CTremovingSpaces.length();j++){\r\n //display the character of CTRS then display its index in characters in class indxofchar.\r\n int index=indexOfDecryptedText.indexOf(CTremovingSpaces.charAt(j));\r\n \r\n if(index == -1){\r\n System.out.println(\"the character does not occur\");\r\n }\r\n if((index-key)>=0)\r\n {\r\n //display the character that output from index-key then store it in plainText\r\n plainText+=indexOfDecryptedText.charAt(index-key);\r\n }\r\n else\r\n {\r\n plainText+=indexOfDecryptedText.charAt((index-key)+26);\r\n }\r\n } \r\n \r\n System.out.println(\"The Plain Text using Key \" + key + \": \" + plainText);\r\n \r\n //convert the string of PlainText into character array\r\n char[] characters2= plainText.toCharArray();\r\n //store the length of the array\r\n int lengthOfArray = characters2.length;\r\n int aCount = 0;\r\n int eCount = 0;\r\n int tCount = 0;\r\n int oCount = 0;\r\n for(int x = 0; x < lengthOfArray; x++)\r\n\r\n {\r\n char characters = characters2[x];\r\n switch (characters) \r\n {\r\n case 'A': \r\n aCount++;\r\n break;\r\n case 'E': \r\n eCount++;\r\n break; \r\n case 'T': \r\n tCount++;\r\n break; \r\n case 'O': \r\n oCount++;\r\n break;}\r\n \r\n }\r\n System.out.println(\"Character of A = \" + aCount);\r\n System.out.println(\"Character of E = \" + eCount);\r\n System.out.println(\"Character of T = \" + tCount);\r\n System.out.println(\"Character of O = \" + oCount);\r\n int sum; \r\n sum = aCount + eCount + tCount + oCount;\r\n System.out.println(\"The sum of AETO = \" + sum);\r\n ///the program will display the count numbers of AETO then calculate the sum of these numbers\r\n ///the greatest number of the sum of AETO will be the plain text (based on cryptanalysis)\r\n \r\n \r\n }}", "private void buildCharMap() {\n\t\tcharMap = new HashMap<Character , Integer>();\n\t\tcharMap.put('a', 0);\n\t\tcharMap.put('b', 1);\n\t\tcharMap.put('c', 2);\n\t\tcharMap.put('d', 3);\n\t\tcharMap.put('e', 4);\n\t\tcharMap.put('f', 5);\n\t\tcharMap.put('g', 6);\n\t\tcharMap.put('h', 7);\n\t\tcharMap.put('i', 8);\n\t\tcharMap.put('j', 9);\n\t\tcharMap.put('k', 10);\n\t\tcharMap.put('l', 11);\n\t\tcharMap.put('m', 12);\n\t\tcharMap.put('n', 13);\n\t\tcharMap.put('o', 14);\n\t\tcharMap.put('p', 15);\n\t\tcharMap.put('q', 16);\n\t\tcharMap.put('r', 17);\n\t\tcharMap.put('s', 18);\n\t\tcharMap.put('t', 19);\n\t\tcharMap.put('u', 20);\n\t\tcharMap.put('v', 21);\n\t\tcharMap.put('w', 22);\n\t\tcharMap.put('x', 23);\n\t\tcharMap.put('y', 24);\n\t\tcharMap.put('z', 25);\t\n\t}", "public void insert(String s, int k) {\n assert(k > -1 && k < seq.size() + 1);\n ArrayList<Character> newSeq = new ArrayList<Character>();\n if (k == 0) {\n for (char c : s.toCharArray()) {\n if (isValid(c)) newSeq.add(c);\n }\n }\n else {\n for (int i = 0; i < k; i++) {\n newSeq.add(seq.get(i));\n }\n for (char c : s.toCharArray()) {\n if (isValid(c)) newSeq.add(c);\n }\n }\n for (int i = k; i < seq.size(); i++) {\n newSeq.add(seq.get(i));\n }\n seq = newSeq;\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }", "public static String getKthPermuation(String input, long k){\n \n //Boiler plate code to create a list of unique characters from string\n //and a map maintaining the character count for the string\n List<Character> chars = new ArrayList<Character>();\n Map<Character, CharCount> map = new HashMap<Character, CharCount>();\n for (int i = 0; i < input.length(); i++) {\n char charAt = input.charAt(i);\n if (map.containsKey(charAt)) {\n map.get(charAt).incrementCount();\n } else {\n CharCount cc = new CharCount(charAt, 1);\n chars.add(charAt);\n map.put(charAt, cc);\n }\n }\n Collections.sort(chars);\n return getPermutation(k-1, input.length(), map, chars);\n }", "public final void mLETTER() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:5: ( ( 'A' .. 'Z' | 'a' .. 'z' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:7: ( 'A' .. 'Z' | 'a' .. 'z' )\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private char encryptLetter(char keyLetter, char plaintextLetter) {\n\n //if not alpha, return unchanged\n if(!Character.isAlphabetic(plaintextLetter)){\n return plaintextLetter;\n }\n\n //convert to upper case for case-insensitivity while looking\n //up in the table\n keyLetter = Character.toUpperCase(keyLetter);\n char plaintextLetterToUpper = Character.toUpperCase(plaintextLetter);\n\n //to leave case unchanged\n if(Character.isUpperCase(plaintextLetter)) {\n return tabulaRecta[keyLetter-65][plaintextLetter-65];\n }\n\n return Character.toLowerCase(tabulaRecta[keyLetter-65][plaintextLetterToUpper-65]);\n }", "public String getSequenceForSpace(int k) {\n\t\tif (k <= 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tfinal int scale = (int) Math.pow(10, k);\n\t\tchar[] visited = new char[scale];\n\t\tint num = scale - 1;\n\t\tvisited[num] = 1;\n\t\tint left = num;\n\t\tStringBuilder seq = new StringBuilder(Integer.toString(num));\n\t\twhile (left > 0) {\n\t\t\tint digit = 0;\n\t\t\tint tmp = (num * 10) % scale;\n\t\t\twhile (digit < 10) {\n\t\t\t\tif (visited[tmp + digit] == 0) {\n\t\t\t\t\tnum = tmp + digit;\n\t\t\t\t\tseq.append(digit);\n\t\t\t\t\tvisited[num] = 1;\n\t\t\t\t\t--left;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t++digit;\n\t\t\t}\n\t\t\tif (digit == 10) {\n\t\t\t\tthrow new IllegalStateException();\n\t\t\t}\n\t\t}\n\t\treturn seq.toString();\n\t}", "public int characterReplacement4(String s, int k) {\n int max = 0;\n int[] map = new int[26];\n int maxf = 0;\n for(int i=0,j=0;j<s.length();j++){\n map[s.charAt(j)-'A']++;\n maxf = Math.max(maxf,map[s.charAt(j)-'A']);\n if(j-i+1>maxf+k)\n map[s.charAt(i++)-'A']--;\n max = Math.max(max,j-i+1);\n }\n return max;\n }", "public static String Encrypt(String plainText,int key,String alphabet) throws IOException\n {\n plainText=plainText.toUpperCase();\n String cipherText=\"\";\n\n for(int i=0;i< plainText.length();i++)\n {\n int index=indexOfChar(plainText.charAt(i),alphabet);\n\n if(index==-1)\n {\n cipherText+=plainText.charAt(i);\n\n continue;\n }\n if((index+key)%alphabet.length()==0)\n {\n cipherText+=charAtIndex(index+key,alphabet);\n }\n else\n {\n cipherText+=charAtIndex((index+key)%alphabet.length(),alphabet);\n }\n }\n return cipherText;\n }", "public String cipherText(String str, String key)\n{\n String cipher_text=\"\";\n \n for (int i = 0; i < str.length(); i++)\n {\n // converting in range 0-25\n if(str.charAt(i) == ' ' || str.charAt(i) == '\\n')\n cipher_text+= str.charAt(i);\n else{ \n int x = (str.charAt(i) + key.charAt(i)) %26;\n // convert into alphabets(ASCII)\n x += 'A';\n \n cipher_text+=(char)(x);}\n }\n return cipher_text;\n}", "public static void m5() {\r\nfor(int i =1;i<=5;i++) {\r\n\tchar ch ='A';\r\n\tfor(int j =1;j<=i;j++) {\r\n\t\tSystem.out.print(ch);\r\n\t\tch++;\r\n\t}\r\n\tSystem.out.println();\r\n}\t\r\n}", "public static String RemoveDuplicatedLetters(String s, int k) {\n if (s.length() < k) {\n return s;\n }\n String result = \"\";\n int counter = 1;\n Stack<String> stack = new Stack<>();\n for (int i = 0; i < s.length(); i++) {\n stack.push(s.substring(i, i + 1));\n }\n result += stack.pop();\n\n while (!stack.isEmpty()) {\n if (stack.peek().equals(result.charAt(0) + \"\")) {\n counter += 1;\n } else {\n counter = 1;\n }\n result = stack.pop() + result;\n if (counter == k) {\n result = result.length() == k ? \"\" : result.substring(k);\n for (int i = 0; i < s.length(); i++) {\n stack.push(s.substring(i, i + 1));\n }\n counter = 0;\n }\n }\n return result;\n }", "public char randomChar() {\n\t\tRandom r = new Random();\n\t\tint threshold = r.nextInt(total);\n\t\tint current = 0;\n\t\t\n\t\tfor (char c : letters.keySet()) {\n\t\t\tcurrent += letters.get(c);\n\t\t\tif (current > threshold) {\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ' ';\n\t}", "public static void main(String args[]) \n {\n Scanner in=new Scanner(System.in);\n String text=in.nextLine();\n StringBuilder str=new StringBuilder(text);\n int str_len=str.length();\n int key=in.nextInt();\n for(int i=0;i<str_len;i++)\n {\n if(str.charAt(i)!=' ')\n {\n int ch=str.charAt(i)-key;\n if(str.charAt(i)>'A' && str.charAt(i)<'Z')\n {\n if(ch<'A')\n {\n ch=ch+26;\n }\n }\n else if(str.charAt(i)>'a' && str.charAt(i)<'z')\n {\n if(ch<'a')\n {\n ch=ch+26;\n }\n }\n str.setCharAt(i,(char)ch);\n }\n }\n System.out.print(str);\n }", "public static String shiftAlphabet(int shift) {\r\n int start = 0;\r\n if (shift < 0) {\r\n start = (int) 'Z' + shift + 1;\r\n } else {\r\n start = 'A' + shift;\r\n }\r\n String result = \"\";\r\n char currChar = (char) start;\r\n for (; currChar <= 'Z'; ++currChar) {\r\n result = result + currChar;\r\n }\r\n if (result.length() < 26) {\r\n for (currChar = 'A'; result.length() < 26; ++currChar) {\r\n result = result + currChar;\r\n }\r\n }\r\n return result;\r\n }", "protected char encrypt1(char c) throws NotInAlphabetException{\n if (passwordPos > password.length()-1) { //reset position to zero after every char is used\n passwordPos = 0; //reset to 0\n }\n //get the current index of where the character being encrypted is and then\n //get the character in the current position of the string using passwordPos and then\n //use this to look up the index in the alphabet\n int temp = ((alphabet.indexOf(c)) + (alphabet.indexOf(password.charAt(passwordPos)))); \n passwordPos += 1; //increment password pos;\n return alphabet.get(wrapInt(temp)); //wrap the index and return\n }", "public static void main(String args[]) {\n Scanner s=new Scanner(System.in);\n char c=s.next().charAt(0);\n int k=s.nextInt();\n if(c=='c')\n {\n //char m='z';\n System.out.print(\"z \");\n return;\n }\n else if (c>='a' && c<='z')\n {\n int o=c+'a';\n o=(o-k)%26;\n c=(char)(o+'a');\n }\n else if(c>='A' && c<='Z')\n {\n int o=c+'A';\n o=(o-k)%26;\n c=(char)(o+'A');\n }\n System.out.print(c);\n }", "char caseconverter(int k,int k1)\n{\nif(k>=65 && k<=90)\n{\nk1=k1+32;\n}\nelse\nif(k>=97 && k<=122)\n{\nk1=k1-32;\n}\nreturn((char)k1);\n}", "public char index2letter(int i) { \t\n \treturn (char) (i + 'A');\n }", "public final void mLETTER() throws RecognitionException {\n try {\n // /Users/dannluciano/Sources/MyLanguage/expr.g:163:8: ( 'a' .. 'z' | 'A' .. 'Z' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "@Override\n public Object processChars(char[] pattern, int k) {\n\n int b = clog2(k + 1) + 1;\n int l = Math.min(pattern.length, 31 / b);\n int lim = k << ((l - 1) * b);\n int ovmask = 0;\n int mask = 1 << (b - 1);\n\n for (int j = 0; j < l; ++j) {\n ovmask |= mask;\n mask <<= b;\n }\n\n int tInit = ovmask >> (b - 1);\n CharIntMap T = createCharIntMap(pattern, l, tInit);\n\n lim += 1 << ((l - 1) * b);\n mask = 1;\n\n for (int j = 0; j < l; ++j) {\n T.set(pattern[j], T.get(pattern[j]) & ~mask);\n mask <<= b;\n }\n\n return new Object[] { T, mask - 1, ovmask, lim, b };\n\n }", "public CharCharMap clone() {\n char[] k = new char[key.length], v = new char[value.length];\n System.arraycopy(key, 0, k, 0, key.length);\n System.arraycopy(value, 0, v, 0, value.length);\n return new CharCharMap(k, v, f);\n }", "public static String encrypt(String text, int key) {\n StringBuilder sb = new StringBuilder();\n for (char c : text.toCharArray()) {\n if (Character.isLetter(c)) {\n sb.append(shift(c, key));\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public char get_char(int k) throws Exception {\r\n\t\tif (k < 0 || k >= text.length())\r\n\t\t\tthrow new IndexOutOfBoundsException(\"Invalid index: \" + k);\r\n\t\telse\r\n\t\t\treturn text.charAt(k);\r\n\t}", "public static String caesarify(String text, int key) {\r\n String newText = \"\";\r\n String alpha = shiftAlphabet(0);\r\n String newAlpha = shiftAlphabet(key);\r\n\r\n for (int i = 0; i < text.length(); i++) {\r\n String currentLetter = String.valueOf(text.charAt(i));\r\n int indexOfLetter = alpha.indexOf(currentLetter);\r\n String letterReplacement = String.valueOf(newAlpha.charAt(indexOfLetter));\r\n\r\n newText += letterReplacement;\r\n\r\n }\r\n return newText;\r\n }", "char toChar(int index) {\n if (index > _chars.length() || index < 0) {\n throw new EnigmaException(\"Alpha.toChar: Index out of range.\");\n }\n return _chars.charAt(index);\n }", "public int characterReplacement2(String s, int k) {\n Set<Character> letters = new HashSet();\n int longest = 0;\n for(int i=0;i<s.length();i++) letters.add(s.charAt(i));\n for(char l: letters){\n int c = 0;\n for(int i=0,j=0;j<s.length();j++){\n if(l==s.charAt(j))c++;\n if((j-i+1)>c+k)\n if(l==s.charAt(i++)) c--;\n longest = Math.max(j-i+1, longest);\n }\n }\n return longest;\n }", "public static String KthPermutation(int n, int k){\n if(n > 9 || k <= 0) return \"\";\n if(n == 1) return \"1\";\n\n int[] factors = new int[n + 1];\n factors[0] = 1;\n for(int i = 1; i <= n; i++) factors[i] = factors[i - 1] * i;\n\n k = k - 1;\n k = k % factors[n];\n\n StringBuilder nums = new StringBuilder(\"123456789\");\n StringBuilder permutation = new StringBuilder();\n for(int i = n - 1; i >= 0; i--){\n int curNum = k / factors[i];\n permutation.append(nums.charAt(curNum));\n nums.deleteCharAt(curNum);\n k = k - curNum * factors[i];\n }\n return permutation.toString();\n }", "public CharCharMap(final char[] k, final char[] v, final float f) {\n this(k.length, f);\n if (k.length != v.length)\n throw new IllegalArgumentException(\"The key array and the value array have different lengths (\" + k.length + \" and \" + v.length + \")\");\n for (int i = 0; i < k.length; i++)\n this.put(k[i], v[i]);\n }", "public char crypt(char letter){\n\n char l = conns[alphabet.indexOf(letter)];\n\n return l;\n }", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "public String generateKey(String str, String key)\n{\n int x = str.length();\n \n for (int i = 0; ; i++)\n {\n if (x == i)\n i = 0;\n if (key.length() == str.length())\n break;\n key+=(key.charAt(i));\n }\n return key;\n}", "public String getPermutation1(int n, int k) {\n\t\t ArrayList<String> rs = new ArrayList<String>();\n\t\t char[] data = new char[n];\n\t\t for (int i = 0; i < n ; ++i)\n\t\t\t data[i] = String.valueOf(i + 1).charAt(0);\n\t\t permutate(data, 0, rs);\n\t\t return rs.get(k); \n\t }", "public static void main(String[] args)\n\t{\n\t\t\n\t\tchar letter = 'Z';\n\t\tint count = 8;\n\t\tchar temp_letter = letter;\n\t\tint temp_count = count;\n\t\t\n\t\tfor(int a = 0; a < count ; a++) {\n\t\t\tfor(int i = 0; i < temp_count ; i++) {\n\t\t\t\tfor(int j = 0; j < count ; j++) {\n\t\t\t\t\tif(temp_letter == 'Z') {\n\t\t\t\t\t\ttemp_letter = (char)('Z' - (26 * i));\n\t\t\t\t\t} else {\n//\t\t\t\t\t\ttemp_letter = (char) (temp_letter + i);\n\t\t\t\t\t};\n\t\t\t\t\tSystem.out.print((char) (temp_letter + i));\t\n\t\t\t\t};\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tcount = count - 1;\n\t\t\t\t\n\t\t\t};\n\t\t\tSystem.out.println();\n\t\t\ttemp_count = temp_count - 1;\n\t\t\tcount = 8;\n\t\t\ttemp_letter = letter;\n\t\t}\n\t\t\t\n\t\t\t\t\n\t}", "public static List<Character> duplicate (String text){\n HashMap<Character,Integer> map = new HashMap<>();\n char [] charArray = text.toCharArray();\n List<Character> duplicateChars = new ArrayList<>();\n for (char c: charArray){\n if(map.containsKey(c)){\n int count = map.get(c);\n map.put(c,++count);\n }\n else\n {\n map.put(c,1);\n }\n }\n for (char c: map.keySet()){\n if (map.get(c)>1){\n duplicateChars.add(c);\n }\n }\n return duplicateChars;\n }", "public void mutate(int k, char c) {\n if (isValid(c)) seq.set(k, c);\n }", "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "@Test\n public void generateValue_incrementsAndResets() {\n char expectedCharacter = 'a';\n for (int i = 0; i < 26; i++) {\n Object characterValue = delegate.generateValue(null, null, null, null, null);\n assertThat(characterValue, is(expectedCharacter));\n expectedCharacter++;\n }\n \n // make sure we start over at 'a' after 'z'\n Object characterValue = delegate.generateValue(null, null, null, null, null);\n assertThat(characterValue, is('a'));\n }", "public String rotationCipherCrack(String cipher, String alphabet);", "public static void main(String args[]) {\n \nScanner sc = new Scanner(System.in);\n\nint n = sc.nextInt();\n\nint i=1; int j=0;\nchar p;\nwhile (i<=n) {\n j=1;\n p = (char) ('A' + i - 1);\n while (j<=n) {\n \n System.out.print(p);\n p=(char)(p+1);\n j=j+1;\n\n }\nSystem.out.println();\ni=i+1;\n}\nsc.close();\n}", "public final void mLETTER() throws RecognitionException {\r\n try {\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:307:17: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:\r\n {\r\n if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\r\n input.consume();\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "char cipher(int charToCipher);", "private static String getPermutation(long k, int strlen, Map<Character, CharCount> map, List<Character> chars) {\n if (map.isEmpty()) {\n return \"\";\n }\n long n = getExpectedSize(strlen, map);\n \n if (k > n) return \"\"; // invalid. Should never reach here.\n long f = 0;\n \n \n for (int i = 0; i < chars.size(); i++) {\n Character curChar = chars.get(i);\n CharCount charCount = map.get(curChar);\n charCount.decrementCount();\n strlen--;\n if (charCount.count == 0) {\n map.remove(curChar);\n chars.remove(i);\n }\n \n long temp = getExpectedSize(strlen, map);\n f += temp;\n if(f <= k){\n charCount.incrementCount();\n strlen++;\n if (charCount.count == 1) {\n map.put(curChar, charCount);\n chars.add(i, curChar);\n }\n continue;\n }\n else{\n f = f - temp;\n return curChar + getPermutation(k - f, strlen, map, chars);\n }\n }\n \n //SHould not reach here unless k is too large\n return \"\";\n }", "public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }", "public final void mLETTER() throws RecognitionException {\n\t\ttry {\n\t\t\t// src/aofC/AspectParser/AOC.g:186:16: ( ( 'a' .. 'z' | 'A' .. 'Z' ) )\n\t\t\t// src/aofC/AspectParser/AOC.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "int getCharacterOrdering(char key);", "protected char[] initialValue() {\n return new char[c.jk];\n }", "public CharCharMap() {\n this(DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR);\n }", "private void populateLetterList() {\n int numberOfTabs = LETTERS_IN_ALPHABET / numberInGroup;\n\n if (LETTERS_IN_ALPHABET % numberInGroup != 0) {\n numberOfTabs++;\n }\n for (int i = 0; i < numberOfTabs; i++) {\n Character startLetter = (char) ((i * numberInGroup) + 65);\n Character endLetter = (char) (startLetter + numberInGroup - 1);\n if ((int) endLetter > (25 + 65)) {\n endLetter = (char) (25 + 65);\n }\n startLetterList.put(startLetter, endLetter);\n }\n }", "public void initialize() {\n\t\tString alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tint N = alphabet.length();\n\n\t\tRandom r = new Random();\n\t\tString key = \"\";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tkey+= alphabet.charAt(r.nextInt(N));\n\t\t}\n\t\tthis.key = key;\n\t}", "public String indexToLetter(int index) {\r\n\t\tif (index == 0)\r\n\t\t\treturn \"a\";\r\n\t\telse if (index == 1)\r\n\t\t\treturn \"b\";\r\n\t\telse if (index == 2)\r\n\t\t\treturn \"c\";\r\n\t\telse if (index == 3)\r\n\t\t\treturn \"d\";\r\n\t\telse if (index == 4)\r\n\t\t\treturn \"e\";\r\n\t\telse if (index == 5)\r\n\t\t\treturn \"f\";\r\n\t\telse if (index == 6)\r\n\t\t\treturn \"g\";\r\n\t\telse if (index == 7)\r\n\t\t\treturn \"h\";\r\n\t\telse if (index == 8)\r\n\t\t\treturn \"i\";\r\n\t\telse if (index == 9)\r\n\t\t\treturn \"j\";\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public static final String repeat(char key, int count) {\n return repeat(String.valueOf(key), count);\n }", "private String cipher(String s)\n {\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n char[] input = s.toCharArray();\n \n int pos = 0;\n String finalString = \"\";\n for( int i = 0; i < input.length; i++ )\n {\n if((input[i] >= 'a' && input[i] <= 'z') || (input[i] >= 'A' && input[i] <= 'Z'))\n {\n for( int j = 0; j < alphabet.length; j++ )\n {\n if( alphabet[j] == input[i] )\n {\n pos = j;\n break;\n }\n }\n finalString += alphabet[(rotateValue+pos)%26];\n }\n else{ finalString += input[i]; }\n }\n return finalString;\n }", "public String encrypt(String text) {\n\t\t\n\t\t//If key is shorter than the text, repeat keyword along length of text\n\t\tif(key.length() < text.length()) {\n\t\t\trepeatKey(text);\n\t\t}\n\t\t\n\t\ttext = text.toLowerCase();\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(int i = 0 ; i < text.length(); i++) {\n\t\t\tchar textLetter = text.charAt(i);\n\t\t\tchar keyLetter = key.charAt(i);\n\t\t\t\t\t\t\n\t\t\t//Char to encode's position in alphabet\n\t\t\tint textCharacterIndex = alphabet.indexOf(textLetter);\n\t\t\t\n\t\t\t//Only encrypt letters\n\t\t\tif(Character.isLetter(textLetter)) {\n\t\t\t\t\n\t\t\t\t//If character is in the second half of cipher A-M\n\t\t\t\tif(charMap.get(textLetter) > 12 && charMap.get(textLetter) <= 25) {\n\t\t\t\t\t\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftLeft(baseCipherRHS, keyValue);\t\t\t\t\t\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftRight(baseCipherLHS, keyValue);\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsb.append(text.charAt(i));\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "public static void m7() {\r\n\tchar ch ='A';\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\tfor(int j =1;j<=i;j++)\r\n\t\t{\r\n\t\t\tSystem.out.print(ch);\r\n\t\t}\r\n\t\tch++;\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }", "public String createString(int N, int K) {\n\t\t\t\t\n\t\tif (N <= 1) {\n\t\t\treturn \"\";\n\t\t}\n\t\telse if (N == 2 && K == 1) {\n\t\t\treturn \"AB\";\n\t\t}\n\t\telse if (N == 2 && K == 0) {\n\t\t\treturn \"BA\";\n\t\t}\n\t\t\n\t\t//Ignore the cases when K is too large\n\t\tif (getMaxK(N) < K)\n\t\t\treturn \"\";\n\t\t\n\t\tString s = fillStringWithBs(N);\n\t\tint k = calculateK(s);\n\t\t\n\t\t//Target BABB\n\t\t//Current BBBB\n\t\twhile (K > k) {\n\t\t\tSystem.out.println(\"K is \"+K+\", k is \"+k + \", s is \"+s);\n\t\t\tif (K >= calculateK(s.replaceFirst(\"B\", \"A\"))) {\n\t\t\t\ts = s.replaceFirst(\"B\", \"A\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//replace B in the right place\n\t\t\t\tint b_count = countBs(s);\n\t\t\t\tint indexOfBToReplace = 0;\n\t\t\t\tif (k > 0)\n\t\t\t\t\tindexOfBToReplace = b_count - (K-k)-1;\n\t\t\t\telse\n\t\t\t\t\tindexOfBToReplace = b_count - (K-k);\n\t\t\t\ts = replaceIthB(s, indexOfBToReplace);\n\t\t\t}\n\t\t\tk = calculateK(s);\n\t\t}\n\t\treturn s;\n\t}", "public String originalText(String cipher_text, String key)\n{\n String orig_text=\"\";\n \n for (int i = 0 ; i < cipher_text.length() && \n i < key.length(); i++)\n {\n if(cipher_text.charAt(i) == ' ' || cipher_text.charAt(i) == '\\n')\n orig_text+=cipher_text.charAt(i);\n else{\n // converting in range 0-25\n int x = (cipher_text.charAt(i) - \n key.charAt(i) + 26) %26; \n // convert into alphabets(ASCII)\n x += 'A';\n orig_text+=(char)(x);\n }\n }\n return orig_text;\n}", "public final void mLETTER() throws RecognitionException {\n\t\ttry {\n\t\t\t// src/VSLLexer.g:15:17: ( 'a' .. 'z' )\n\t\t\t// src/VSLLexer.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public void setKey(char key){ this.key = key;}", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tStringBuffer stb = new StringBuffer(\"abcdefghigklmnopqrstuvwxyz\");\r\n\t\tStringBuffer result = new StringBuffer(\"\");\r\n\t\t\r\n\t\tString stP = sc.nextLine();\r\n\t\tString stK = sc.nextLine();\r\n\t\tint numP;\r\n\t\tint numK;\r\n\t\tint index;\r\n\t\t\r\n\t\tint j=0;\r\n\t\tfor(int i=0;i<stP.length();i++){\r\n\t\t\t\r\n\t\t\tif(j!=stK.length()){\r\n\t\t\t\t\r\n\t\t\t\tif((int)stP.charAt(i)==32){\r\n\t\t\t\t\tresult.append(\" \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnumP=((int)stP.charAt(i)-96);\r\n\t\t\t\t\tnumK=((int)stK.charAt(j)-96);\r\n\t\t\t\t\tindex = numP-numK;\r\n\t\t\t\t\r\n\t\t\t\t\tif(index<=0) index += 26;\r\n\t\t\t\t\r\n\t\t\t\t\tresult.append(stb.charAt(index-1));\r\n\t\t\t\t}\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tj=0; i--;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(result.toString());\r\n\t\r\n\t}", "private void buildString(String input, int k, int[] samp) {\n\r\n\t\tMap<Character, Integer> countermap = new HashMap<Character, Integer>();\r\n\r\n\t\tString out = \"\";\r\n\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tcountermap.put(input.charAt(i), countermap.getOrDefault(input.charAt(i), 0) + 1);\r\n\t\t\tif (countermap.get(input.charAt(i)) <= k) {\r\n\r\n\t\t\t\tif (countermap.get(input.charAt(i)) == 1) {\r\n\t\t\t\t\tout += input.charAt(i);\r\n\t\t\t\t\tsamp[(int) input.charAt(i)] -= 1;\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\t\tif ((samp[(int) input.charAt(j)] != 0) && (countermap.get(input.charAt(i)) != 1)) {\r\n\t\t\t\t\t\t\tout += input.charAt(j);\r\n\t\t\t\t\t\t\tsamp[(int) input.charAt(j)] -= 1;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(out);\r\n\t}", "public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String str=sc.nextLine();\n int len=str.length();\n int stat[]=new int[26];\n for(int i=0;i<len;i++)\n {\n if((str.charAt(i)>='a') && ( str.charAt(i)<='z'))\n {\n int offset=str.charAt(i) - 'a';\n stat[offset]++; \n }\n if((str.charAt(i)>='A') && ( str.charAt(i)<='Z'))\n {\n int offset=str.charAt(i) - 'A';\n stat[offset]++; \n }\n }\n for(int i=0;i<26;i++)\n {\n \n if( stat[i]==0)\n {\n char ch=(char)('a'+i);\n System.out.print(ch+\" \");\n \n \n \n }\n }\n}", "public static String randChar(){\n int n = rand.nextInt(52);\n return String.valueOf(KEYBOARD.charAt(n));\n }", "public static String keyToString(int k){\n\t\tString output=\"Unknown Key\";\n\t\t\n\t\t//if the key is a letter\n\t\tif (k>=(int)'a' && k<=(int)'z'){\n\t\t\toutput=\"\"+(char)k;\n\t\t\toutput=output.toUpperCase();\n\t\t}\n\t\telse if (k>=(int)'0' && k<=(int)'9') //if the key is a number\n\t\t\toutput=\"\"+(char)k;\n\t\telse if (k==KeyEvent.VK_SPACE)\n\t\t\toutput=\"Space\";\n\t\telse if (k==KeyEvent.VK_CONTROL)\n\t\t\toutput=\"Control\";\n\t\telse if (k==KeyEvent.VK_SHIFT)\n\t\t\toutput=\"Shift\";\n\t\telse if (k==KeyEvent.VK_ENTER)\n\t\t\toutput=\"Enter\";\n\t\telse if (k==KeyEvent.VK_ALT)\n\t\t\toutput=\"Alt\";\n\t\t\n\t\treturn output;\n\t}", "public Builder addLetters(\n int index, com.vine.vinemars.net.pb.SocialMessage.LetterObj value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureLettersIsMutable();\n letters_.add(index, value);\n\n return this;\n }", "protected char randomChar(int length) {\n\n int randomLetter = (int) (Math.random() * length);\n char letter = this.alphabet[randomLetter];\n return letter;\n }", "public String encrypt(String input)\n {\n StringBuilder encrypted = new StringBuilder(input);\n\n String alphabetLower = alphabet.toLowerCase();\n String shiftedAlphabetLower1 = shiftedAlphabet1.toLowerCase();\n String shiftedAlphabetLower2 = shiftedAlphabet2.toLowerCase();\n\n for (int k = 0; k < encrypted.length() ; k++)\n {\n char currentChar = encrypted.charAt(k);\n int indexOfCurrentCharAlphabet = alphabet.indexOf(currentChar);\n int indexOfCurrentCharLower = alphabetLower.indexOf(currentChar);\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 == 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet1.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 != 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet2.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 == 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower1.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 != 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower2.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n }\n return encrypted.toString();\n }", "public static String caesarCypherEncryptor(String str, int key) {\n /* StringBuilder cipher = new StringBuilder();\n for (char ch : str.toCharArray()) {\n char shiftedChar = (char) (((ch - 'a' + key) % 26) + 'a');\n cipher.append(shiftedChar);\n }\n return cipher.toString();*/\n\n return str.chars()\n .mapToObj(ch -> (char) (((ch - 'a' + key) % 26) + 'a'))\n .map(String::valueOf)\n .collect(Collectors.joining());\n }", "public static void m9() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\t\r\n\t for(int j =1;j<=i;j++) {\r\n\t\t System.out.print(\" \");\r\n\t }\r\n\t char ch ='A';\r\n\t for(int k=0;k<=(5-i);k++) {\r\n\t System.out.print(ch);\r\n\t ch++;\r\n\t }\r\n\t System.out.println();\r\n\t}\r\n}", "public static void m2() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\tchar ch ='A';\r\n\t\tfor(int j =1;j<=5;j++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n\t}", "static char[] generateAZLowercaseAndNumbers(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 2);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateNumberChar();\n }\n }\n return charArray;\n }", "CharacterTarget put(char[] symbols, int from, int to) throws PrintingException;", "static char[] generateAZLowercaseAndNumbersAndSpecial(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 3);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateNumberChar();\n } else if (k == 2) {\n charArray[i] = RandomChar.generateSpecChar();\n }\n }\n return charArray;\n }" ]
[ "0.63510275", "0.6331801", "0.6245081", "0.62305796", "0.61666155", "0.61200404", "0.6070606", "0.60699713", "0.60592884", "0.6025828", "0.59133875", "0.5849188", "0.5806185", "0.5783484", "0.57674986", "0.57433087", "0.573129", "0.5700645", "0.5677591", "0.5676296", "0.5670033", "0.56697315", "0.5652645", "0.564146", "0.56353575", "0.5605426", "0.5605426", "0.5605426", "0.55933857", "0.55786884", "0.55623305", "0.55608225", "0.55317557", "0.5527188", "0.5523318", "0.55121446", "0.55100256", "0.5509065", "0.54855466", "0.5482418", "0.547772", "0.5461325", "0.544162", "0.54326946", "0.54162896", "0.54091513", "0.5401138", "0.5396694", "0.5382295", "0.537969", "0.53785074", "0.53615814", "0.5338633", "0.5337751", "0.5337189", "0.53370446", "0.53342485", "0.5331644", "0.53308094", "0.53124815", "0.5312447", "0.53049105", "0.52867955", "0.528451", "0.52648664", "0.52642494", "0.5263175", "0.5253966", "0.5242265", "0.5225446", "0.52156115", "0.5213479", "0.52124894", "0.5212351", "0.52086866", "0.520502", "0.5199653", "0.5197759", "0.51935214", "0.51899296", "0.5186824", "0.51859176", "0.5170574", "0.51690125", "0.51676315", "0.5157663", "0.51571023", "0.5157074", "0.5149221", "0.51411057", "0.51366156", "0.5134223", "0.51199454", "0.5117594", "0.511148", "0.5101475", "0.5100878", "0.51004493", "0.50926834", "0.50794685" ]
0.590941
11
Returns the size of the alphabet.
int size() { return _chars.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int size() {\n return _alphabet.size();\n }", "int size() {\n return _letters.length();\n }", "public int getLettersCount() {\n return letters_.size();\n }", "public int getLettersCount() {\n return letters_.size();\n }", "int size() {\n return _chars.length();\n }", "int size() {\n return _chars.length();\n }", "int getLettersCount();", "public int getNumberOfCharacters() {\n return numberOfCharacters;\n }", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "public static int size_amtype() {\n return (8 / 8);\n }", "@Override\r\n\tpublic int length() {\n\t\treturn chars.length;\r\n\t}", "public int size() {\n return AL.length;\n }", "public static int size_length() {\n return (8 / 8);\n }", "public int getNumCharacters()\n\t{\n\t\treturn gameCharCount;\n\t}", "@Override\n\tpublic int getLength() {\n\t\tint c = 0;\n\t\tfor (char c1 : theString.toCharArray()) {\n\t\t\tc++;\n\t\t}\n\t\treturn c;\n\t}", "public int size() {\n\t\t\treturn ALPHABET.length;\n\t\t}", "public int size() {\n return CAPABILITY_LENGTH;\n }", "public int getSizeOfUniqueChars() {\n return uniqueChars.size();\n }", "public int length() {\n return aminoAcidSequence.length();\n }", "public long getCharCount() {\n return charCount;\n }", "static int chara(String a) {\n int character = 0;\n while ((16 * character) < a.length()) {\n character++;\n }\n return character;\n }", "int length() {\n if (extMap.isEmpty()) {\n return 0;\n } else {\n return encodedLength;\n }\n }", "public int size() {\n return a.length;\n }", "static int size_of_aci(String passed){\n\t\treturn 2;\n\t}", "public int get_length();", "public int getEntryCount() {\n return mem.getChar(34);\n }", "public static int howManyLetters (String s)\n {\n if (s.length()==0) //stop condition - the end case, if the string is empty\n return 0;\n int isc=( s.charAt(s.length()-1)>='a'&&s.charAt(s.length()-1)<='z'||\n s.charAt(s.length()-1)>='A'&& s.charAt(s.length()-1)<='Z')? 1: 0; //checks whether the current character is a letter\n return isc+howManyLetters(s.substring(0,s.length()-1)); //return the amount of letters (by re-call the method again)\n }", "public int getNumberOfCharactersInThisText(){\n\t\treturn this.number;\n\t}", "public int getNbCharacter()\n\t{\n\t\treturn this.nbCharacter;\n\t}", "public static int size_estLength() {\n return (8 / 8);\n }", "public int getMinimumNumberOfCharacters() {\n\t\treturn this.minimumNumberOfCharacters;\n\t}", "int getKeySize();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "static int size_of_ana(String passed){\n\t\treturn 1;\n\t}", "int getMaxCharSize();", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public int getLength();", "public int getLength();", "public int getLength();", "String size();", "public String getCharacterSize() {\n\t\tString result = null;\n\t\tRaces dropDownText = (Races) race.getSelectedItem();\n\n\t\tif (dropDownText.equals(Races.DWARF)) {\n\t\t\tresult = Races.DWARF.getSize();\n\t\t} else if (dropDownText.equals(Races.ELF)) {\n\t\t\tresult = Races.ELF.getSize();\n\t\t} else if (dropDownText.equals(Races.GNOME)) {\n\t\t\tresult = Races.GNOME.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFELF)) {\n\t\t\tresult = Races.HALFELF.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFORC)) {\n\t\t\tresult = Races.HALFORC.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFLING)) {\n\t\t\tresult = Races.HALFLING.getSize();\n\t\t} else if (dropDownText.equals(Races.HUMAN)) {\n\t\t\tresult = Races.HUMAN.getSize();\n\t\t}\n\n\t\treturn result;\n\t}", "private int getKeyLength() {\n MongoCursor<Document> cursor = this.keystoreCollection.find(eq(\"conf\", \"homomorphic-keylength\")).iterator();\n\n int keyLength = 2048; // Default value is 2048 bits\n while (cursor.hasNext()) {\n keyLength = cursor.next().getDouble(\"keylength\").intValue();\n }\n return keyLength;\n }", "public long getLowerCaseLettersCount() {\n return lowerCaseLettersCount;\n }", "public int numberOfCharacters(String senha){\n return senha.length();\n }", "public static int sizeBits_amtype() {\n return 8;\n }", "public int getKeyLength() {\n\t\treturn keyLength;\n\t}", "public int length();", "public int length();", "public int length();", "public int length();", "public int length();", "public int size()\n \t{\n \t\treturn getLength();\n \t}", "public int getDisplayCharacterCount() {\r\n return _displaySize;\r\n }", "static int size_of_adi(String passed){\n\t\treturn 2;\n\t}", "public double getLength() {\n return count;\n }", "public int length()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn mLength;\n\t}", "public int my_length();", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "static int size_of_cma(String passed){\n\t\treturn 1;\n\t}", "public int length() {\n int counter = 0;\n while (bitAt(counter) == '1' || bitAt(counter) == '0') {\n counter = counter + 1;\n }\n return counter;\n }", "public int getMazeWidth() {\n\t\tint result = 0;\n\t\t\n\t\tfor (String line : this.mMazeChars) {\n\t\t\tif (result < line.length()) \n\t\t\t\tresult = line.length();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }", "public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }", "public int length() {\n\t\treturn size;\r\n\t}", "public int length() {\n\t\treturn CarerAccounts.size();\n\t}", "public static int size_count() {\n return (16 / 8);\n }", "public static int getWordlenght() {\r\n\t\treturn lenght;\r\n\t}", "public int getWordSize(){\n\t\treturn word.length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength() {\n return mySize.getLength();\n }", "BigInteger getLength();", "public static int size_sum_a() {\n return (32 / 8);\n }", "public int getLength() {\n\t\treturn this.length;\n\t}", "@Override\n\tpublic long size() {\n\t\treturn this.currentLength.get();\n\t}", "public int length() {\r\n return fCharBuffer.length();\r\n }", "public final int mo66557hg() {\n int size;\n synchronized (this.aen) {\n mo66559hj();\n size = this.aeo.size();\n }\n return size;\n }", "public int getEncodedSize() {\n return encoded.length;\n }", "public int length() {\n return size();\n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "public int size() {\r\n return numberOfKeys;\r\n }", "public int getLength() {\r\n return passwordLength;\r\n }", "public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int getLengthInBytes()\n \t{\n \t\treturn FormatableBitSet.numBytesFromBits(lengthAsBits);\n \t}", "int len();", "protected String getArraySize()\n {\n return arraySize;\n }" ]
[ "0.8101566", "0.7775351", "0.74167335", "0.73806685", "0.7123137", "0.7123137", "0.6907532", "0.6832305", "0.67312086", "0.6682212", "0.65633565", "0.6554055", "0.6544257", "0.65286887", "0.65260947", "0.6521087", "0.64276516", "0.6386872", "0.6370318", "0.63564664", "0.6346258", "0.6326263", "0.63174474", "0.6237853", "0.623028", "0.6206294", "0.6193553", "0.61879784", "0.6174352", "0.617346", "0.61674166", "0.6144342", "0.6135588", "0.6135588", "0.6135588", "0.6135588", "0.6135588", "0.6135588", "0.6135588", "0.6135588", "0.6135588", "0.6135588", "0.61317384", "0.61315554", "0.6131154", "0.60997427", "0.60997427", "0.60997427", "0.6090884", "0.6089167", "0.6072119", "0.6070812", "0.60512453", "0.6050463", "0.6035877", "0.6019407", "0.6019407", "0.6019407", "0.6019407", "0.6019407", "0.6011357", "0.60104954", "0.597885", "0.5954009", "0.59470594", "0.5941441", "0.59383315", "0.5928098", "0.59253216", "0.5917411", "0.5911792", "0.59109825", "0.5901627", "0.5900392", "0.5899267", "0.5899206", "0.5894193", "0.5892518", "0.5889508", "0.5889508", "0.5887147", "0.58864444", "0.58768433", "0.58752966", "0.5863362", "0.5861907", "0.5860584", "0.58456635", "0.5843194", "0.58428687", "0.58351517", "0.5827808", "0.5821847", "0.58194095", "0.58170503", "0.58166146", "0.58166146", "0.5814201", "0.58079", "0.58061725" ]
0.699177
6
Returns true if C is in this alphabet.
boolean contains(char c) { for (char x : _chars) { if (x == c) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean contains(char ch) {\n return _letters.indexOf(ch) >= 0;\n }", "private boolean letter() {\r\n return CATS(Lu, Ll, Lt, Lm, Lo);\r\n }", "public abstract boolean matches(char c);", "private static boolean inArray(char c, char[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (c == array[i]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private boolean isValid() {\n return Character.isLetter(c);\n }", "boolean hasHasCharacter();", "private boolean isValid(char c) {\n if (c == 'A' || c == 'T' || c == 'G' || c == 'C' || c == 'N'\n || c == 'a' || c == 't' || c == 'g' || c == 'c') {\n return true;\n }\n return false;\n }", "boolean alreadyAdded(char c) {\n for (char x :_chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }", "private static boolean m127620a(char c) {\n return Pattern.compile(\"[一-龥]\").matcher(String.valueOf(c)).matches();\n }", "public boolean is(char chIn) {\n for (char ch: allOps) {\n if (chIn == ch){\n return true;\n }\n }\n return false;\n }", "boolean hasChar();", "public boolean contains(Chamber c) {\n return chambers.containsKey(c);\n }", "static boolean isCharacter(char c) {\n\t\t\tswitch (c) {\n\t\t\t\tcase CHARACTER:\n\t\t\t\tcase CHARACTER_UPPER:\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "static boolean isBasePair(char c)\n{\n\treturn c >= 'A' && c <= 'Z';\n}", "boolean hasC();", "private static boolean checkChar(char c) {\n\t\tif (Character.isDigit(c)) {\n\t\t\treturn true;\n\t\t} else if (Character.isLetter(c)) {\n\t\t\tif (Character.toUpperCase(c) >= 'A' && Character.toUpperCase(c) <= 'F') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "boolean getHasCharacter();", "public static boolean isLetter(char c)\n {\n return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');\n }", "public static boolean isIUPAC(final char base) {\n\tswitch(base) {\n\t case 'A':\n\t case 'C':\n\t case 'G':\n\t case 'T':\n\t case 'U':\n\t case 'R':\n\t case 'Y':\n\t case 'S':\n\t case 'W':\n\t case 'K':\n\t case 'M':\n\t case 'B':\n\t case 'D':\n\t case 'H':\n\t case 'V':\n\t case 'N':\n\t //\n\t case 'a':\n\t case 'c':\n\t case 'g':\n\t case 't':\n\t case 'u':\n\t case 'r':\n\t case 'y':\n\t case 's':\n\t case 'w':\n\t case 'k':\n\t case 'm':\n\t case 'b':\n\t case 'd':\n\t case 'h':\n\t case 'v':\n\t case 'n': return true;\n\t default: return false;\n\t\t}\n\t}", "public boolean isOperator(char c){\n char[] operator = { '+', '-', '*', '/','^', ')', '(' };\r\n int temp = 0;\r\n for (int i = 0; i < operator.length; i++) {\r\n if (c == operator[i])\r\n temp +=1;\r\n }\r\n return temp != 0;\r\n }", "public static boolean isLetter(char c) {\r\n\r\n\t\tif ((c >= 65 && c <= 95) || (c >= 97 && c <= 122)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public boolean isEquivalent(char character, char anothercharacter);", "public boolean isChar(char c) \n\t{\n\t\tif (this.numBytes==1 && (charBytes[0]==c))\n\t\t\treturn true; \n\t\treturn false; \n\t}", "public static boolean isATGC(char c) {\n\tswitch(c) {\n\t\tcase 'A': case 'a':\n\t\tcase 'C': case 'c':\n\t\tcase 'G': case 'g':\n\t\tcase 'T': case 't':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t\t}\n\t}", "public abstract boolean isStarterChar(char c);", "private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }", "boolean contains(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return true;\n }\n }\n return false;\n }", "public boolean updateLetterList(char c){\n\t\tif(!usedLetters.contains(c)){\n\t\t\tusedLetters.add(c);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean checkAllAlphabets(String input) {\n if (input.length() < 26) {\n return false;\n }\n\n //Even a single character is missing, return false\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n if (input.indexOf(ch) < 0 && input.indexOf((char) (ch + 32)) < 0) {\n return false;\n }\n }\n return true;\n }", "protected boolean isIn(int r, int c) {\n\t\tboolean result = false;\n\t\tif (r >= 0 && r < maze.sizeR && c >= 0 && c < maze.sizeC) {\n\t\t\tresult = true;\n\t\t}\n\t\tif (maze.type == HEX) {\n\t\t\tif (r >= 0 && r < maze.sizeR && c >= (r + 1) / 2 && c < maze.sizeC + (r + 1) / 2)\n\t\t\t\t;\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public boolean contains(LetterTile letter) {\n\t\tfor (int i = 0; i < lettersInPlay.size(); i++)\n\t\t\tif (letter.getChar() == lettersInPlay.get(i).getChar())\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean check_charac_exist(String charac_name){\n if(charac_store.get(charac_name) != null)\n return true;\n else\n return false;\n }", "boolean contains(char ch) {\n String check = Character.toString(ch);\n return _chars.contains(check);\n }", "final public boolean isEqual(final char c, final char other) {\n return Comparators.EQUAL == this.compare(c, other);\n }", "public static boolean isATGCN(char c) {\n\tswitch(c) {\n\t\tcase 'n': case 'N': return true;\n\t\tdefault: return isATGC(c);\n\t\t}\n\t}", "public boolean characterInput(char c);", "public boolean isConsonant(int charCode);", "@Override\n\tpublic boolean contains(Charset cs) {\n\t\treturn false;\n\t}", "private boolean isAlfabetico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase 'A':\r\n\t\t\treturn true;\r\n\t\tcase 'B':\r\n\t\t\treturn true;\r\n\t\tcase 'C':\r\n\t\t\treturn true;\r\n\t\tcase 'D':\r\n\t\t\treturn true;\r\n\t\tcase 'E':\r\n\t\t\treturn true;\r\n\t\tcase 'F':\r\n\t\t\treturn true;\r\n\t\tcase 'G':\r\n\t\t\treturn true;\r\n\t\tcase 'H':\r\n\t\t\treturn true;\r\n\t\tcase 'I':\r\n\t\t\treturn true;\r\n\t\tcase 'J':\r\n\t\t\treturn true;\r\n\t\tcase 'K':\r\n\t\t\treturn true;\r\n\t\tcase 'L':\r\n\t\t\treturn true;\r\n\t\tcase 'M':\r\n\t\t\treturn true;\r\n\t\tcase 'N':\r\n\t\t\treturn true;\r\n\t\tcase 'Ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'O':\r\n\t\t\treturn true;\r\n\t\tcase 'P':\r\n\t\t\treturn true;\r\n\t\tcase 'Q':\r\n\t\t\treturn true;\r\n\t\tcase 'R':\r\n\t\t\treturn true;\r\n\t\tcase 'S':\r\n\t\t\treturn true;\r\n\t\tcase 'T':\r\n\t\t\treturn true;\r\n\t\tcase 'U':\r\n\t\t\treturn true;\r\n\t\tcase 'V':\r\n\t\t\treturn true;\r\n\t\tcase 'W':\r\n\t\t\treturn true;\r\n\t\tcase 'X':\r\n\t\t\treturn true;\r\n\t\tcase 'Y':\r\n\t\t\treturn true;\r\n\t\tcase 'Z':\r\n\t\t\treturn true;\r\n\t\tcase 'a':\r\n\t\t\treturn true;\r\n\t\tcase 'b':\r\n\t\t\treturn true;\r\n\t\tcase 'c':\r\n\t\t\treturn true;\r\n\t\tcase 'd':\r\n\t\t\treturn true;\r\n\t\tcase 'e':\r\n\t\t\treturn true;\r\n\t\tcase 'f':\r\n\t\t\treturn true;\r\n\t\tcase 'g':\r\n\t\t\treturn true;\r\n\t\tcase 'h':\r\n\t\t\treturn true;\r\n\t\tcase 'i':\r\n\t\t\treturn true;\r\n\t\tcase 'j':\r\n\t\t\treturn true;\r\n\t\tcase 'k':\r\n\t\t\treturn true;\r\n\t\tcase 'l':\r\n\t\t\treturn true;\r\n\t\tcase 'm':\r\n\t\t\treturn true;\r\n\t\tcase 'n':\r\n\t\t\treturn true;\r\n\t\tcase 'ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'o':\r\n\t\t\treturn true;\r\n\t\tcase 'p':\r\n\t\t\treturn true;\r\n\t\tcase 'q':\r\n\t\t\treturn true;\r\n\t\tcase 'r':\r\n\t\t\treturn true;\r\n\t\tcase 's':\r\n\t\t\treturn true;\r\n\t\tcase 't':\r\n\t\t\treturn true;\r\n\t\tcase 'u':\r\n\t\t\treturn true;\r\n\t\tcase 'v':\r\n\t\t\treturn true;\r\n\t\tcase 'w':\r\n\t\t\treturn true;\r\n\t\tcase 'x':\r\n\t\t\treturn true;\r\n\t\tcase 'y':\r\n\t\t\treturn true;\r\n\t\tcase 'z':\r\n\t\t\treturn true;\r\n\t\tcase ' ':\r\n\t\t\treturn true;\r\n\t\tcase '*':\r\n\t\t\treturn true;// debido a búsquedas\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "static boolean maybeTibetanCompositeVowel(int c) {\n return (c & 0x1fff01) == 0xf01;\n }", "private boolean CATS(Category... cs) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int ch = input.nextChar(in, len);\r\n Category cat = Category.get(ch);\r\n boolean ok = false;\r\n for (Category c : cs) if (cat == c) ok = true;\r\n if (! ok) return false;\r\n in += len;\r\n return true;\r\n }", "public boolean a(C c) {\n return Range.a(this.a, (Comparable) c) <= 0;\n }", "public boolean a(C c) {\n return Range.a(this.a, (Comparable) c) < 0;\n }", "private static boolean isAlpha(char p_char) {\n return ((p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z' ));\n }", "boolean hasAabbValue();", "public boolean isC() {\n return c;\n }", "boolean hasCdkey();", "public boolean isEncodingAlpha();", "private boolean isEnLetter(char ch) {\n if ( ( (ch >= 'a') && (ch <= 'z')) || ( (ch >= 'A') && (ch <= 'Z'))) {\n return true;\n } // if\n else {\n return false;\n } // else\n }", "public static boolean validAtom(char atom)\n\t{\n\t\tchar temp = Character.toUpperCase(atom);\n\t\treturn temp == 'C' || temp == 'H' || temp == 'O';\n\t}", "public static boolean isAbecedarian(String s) {\n for (char c = 1; c < s.length(); c++) {\n\n //Checking if the letter is bigger or equal to the previous index letter.\n if (s.charAt(c) >= s.charAt(c - 1)) {\n }\n else {\n //Returns if input is not abecedarian.\n return (false);\n }\n }\n //Returns if input is abecedarian.\n return (true);\n }", "public static boolean isAsciiAlpha(char ch) {\n/* 460 */ return (isAsciiAlphaUpper(ch) || isAsciiAlphaLower(ch));\n/* */ }", "public static boolean hasA( String w, String letter )\r\n { return w.indexOf(letter) != -1;\r\n }", "public static boolean isLetter ( char letter )\n {\n if ( ( letter >= 'a' ) && ( letter <= 'z' ) ) return true;\n if ( ( letter >= 'A' ) && ( letter <= 'Z' ) ) return true;\n return false;\n }", "private static boolean c(char paramChar)\r\n/* 680: */ {\r\n/* 681:674 */ return ((paramChar >= '0') && (paramChar <= '9')) || ((paramChar >= 'a') && (paramChar <= 'f')) || ((paramChar >= 'A') && (paramChar <= 'F'));\r\n/* 682: */ }", "public static boolean hasA( String w, String letter ) \n {\n return (w.indexOf(letter) > -1);\n }", "public static boolean isATGCN(final CharSequence c) {\n\tif(c==null || c.length()==0) return false;\n\tfor(int i=0;i< c.length();i++) if(!isATGCN(c.charAt(i))) return false;\n\treturn true;\n\t}", "public static boolean isKanji(char c){\n\t\treturn kanjiWhitelist.contains(c);\n\t}", "public boolean hasC() {\n return c_ != null;\n }", "public boolean isCharacterInSameLocation(Character inputCharA, Character inputCharB) {\r\n\t\tString LocationCharA = inputCharA.getLocation();\r\n\t\tArrayList<Character> inputListLocation = getListCharacterInLocation(LocationCharA);\r\n\t\tif (inputListLocation.contains(inputCharA) && inputListLocation.contains(inputCharB))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "boolean hasB26();", "boolean contains(Card c);", "public boolean checkForAce() {\n\t\thandIterator = new HandIterator(hand.getCards());\n\t\twhile (handIterator.hasNext()) {\n\t\t\tCard card = (Card) handIterator.next();\n\t\t\tif (card.getCardName().equals(\"A\"))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasContKey();", "public static void main(String[] args) {\n\n\t\t System.out.println(Character.isLetter('A')); \n \n\t System.out.println(Character.isLetter('0')); \n\t \n\t System.out.println(Character.isDigit('A')); \n\t \n\t System.out.println(Character.isDigit('0')); \n\t \n\t System.out.println(Character.isUpperCase('A')); \n\t System.out.println(Character.isUpperCase('a')); \n\t System.out.println(Character.isUpperCase(65)); \n\t \n\t System.out.println(Character.isLowerCase('A')); \n\t System.out.println(Character.isLowerCase('a')); \n\t System.out.println(Character.isLowerCase(97)); \n\t}", "public boolean isAnInt(char charac) {\r\n \treturn isAnInt(Character.toString(charac));\r\n }", "private boolean isHexadecimalDigit(final char c) {\n return (c <= 'f' && map[c] >= 0);\n }", "private static boolean isHex(char c) {\n\t\tboolean result = false;\n\t\tif (Character.isDigit(c)) {\n\t\t\tresult = true;\n\t\t}\n\t\telse if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || c == 'e' || c == 'f') {\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public static boolean isName(int c) {\n return c < 0x10000 && (CHARS[c] & MASK_NAME) != 0;\n }", "public boolean containsCustomer(String c){\n\t\tfor (int i = 0; i < this.list.size(); i++){\n\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isAlpha(char toCheck) {\n return (toCheck >= 'a' && toCheck <= 'z') ||\n (toCheck >= 'A' && toCheck <= 'Z') ||\n toCheck == '_';\n }", "public boolean checkForChar(String str) {\n\t\tif (str.contains(\"a\") || str.contains(\"A\") || str.contains(\"e\") || str.contains(\"E\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TO DO\n\n\t\treturn false;\n\t}", "public boolean contains(Coord c) {\n\t\treturn getAWTRectangle().contains(c.getAWTPoint());\n\t}", "private boolean isChar(char c){\n\t\tif(Character.isISOControl(c))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean checkO(Country c) {\n\t\tfor (Country ca : players.get(turnCounter).getCountries()) {\r\n\t\t\tif (c.equals(ca)) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \t\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t\t\r\n\t}", "private boolean isVowel(char c){\n boolean flag;\n switch (c){\n case 'A':\n case 'E':\n case 'I':\n case 'O':\n case 'U': flag = true; break;\n default: flag = false;\n }\n return flag;\n }", "public char test(char c) {\n\t\tchar[] lower = { '-', '+' };\n\t\tchar[] higher = { '*', '/' };\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tif (lower[i] == c) {\n\t\t\t\treturn 'l';\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tif (higher[i] == c) {\n\t\t\t\treturn 'h';\n\t\t\t}\n\t\t}\n\t\t// just to make the method work , no meaning for the 'n'\n\t\treturn 'n';\n\t}", "public static boolean isATGC(final CharSequence c) {\n\tif(c==null || c.length()==0) return false;\n\tfor(int i=0;i< c.length();i++) if(!isATGC(c.charAt(i))) return false;\n\treturn true;\n\t}", "public static void main(String[]args) {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n System.out.println(\"Enter a character\");\n \n char chr = scan.next().charAt(0);\n \n if((chr>='a' && chr<='z')||(chr>='A' && chr<='Z')) {\n System.out.println(\"The character is in alphabet\");\n }else{\n System.out.println(\"The character is not in alphabet\");\n }\n\t\t scan.close();\n\t\t\n\t}", "public boolean containCharacter(ArrayList<String> inputList)\r\n\t{\r\n\t\t\r\n\t\tString variable;\r\n\t\tString desireValue;\r\n\t\t\r\n\t\t//Character currentChar = new Character(); //15-2-2019\r\n\t\tCharacter currentChar = null;\r\n\t\t\r\n\t\t\r\n\t\tfor (String currentInput : inputList)\r\n\t\t{\r\n\t\t\tvariable = currentInput.substring(0, currentInput.indexOf(\":\"));\r\n\t\t\tdesireValue = currentInput.substring(currentInput.indexOf(\":\")+1,currentInput.length());\r\n\t\t\t\r\n\t\t\r\n\t\t\t//Looking for the character index\r\n\t\t\tint indexChar = 0;\r\n\t\t\tfor (int x = 0; x<listCharacter.size();x++)\r\n\t\t\t{\r\n\t\t\t\tif (listCharacter.get(x).getName() == variable) \r\n\t\t\t\t\tcurrentChar = listCharacter.get(x);\r\n\t\t\t\t\tindexChar = x;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// IF This is true, it means the character doesn't exist\r\n\t\t\tif (indexChar == 0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Character in GameState's wishlist doesn't exist\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Now consult siwtchCheckCharacter\r\n\t\t\t//IF even one of them return false, it mean one of condition isn't met\r\n\t\t\tif (!siwtchCheckCharacter(currentChar, desireValue))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "static boolean isOperator(char c) {\n return \"+\\u2212\\u00d7\\u00f7/*\".indexOf(c) != -1;\n }", "boolean isCaseInsensitive();", "public static boolean isVocab(char c)\r\n {\r\n int i=(int)c;\r\n return (i>=33&&i<=39)||(i>=44&&i<=45)||(i>=47&&i<=62)||(i>=64&i<=90)||(i>=94&&i<=123)||(i>=125&&i<=126);\r\n }", "public static Boolean Letter(String arg){\n\t\tif(arg.matches(\"\\\\p{L}{1}\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isCharAt(int row, int col, char c)\n {\n if (row < 0 || row >= SIZE || col < 0 || col >= SIZE) {\n return false;\n }\n\n if (map[row][col] == c) {\n return true;\n }\n else {\n return false;\n } \n }", "boolean isAccess(char access);", "private static boolean isAlpha(byte b)\r\n\t{\r\n\t\treturn (b >= 'a' && b <= 'z') || \r\n\t\t\t (b >= 'A' && b <= 'Z');\r\n\t}", "private boolean isAlphanumeric(char c) {\n if (c < '0' || c > 'z') {\n return false;\n }\n if (c <= '9' || c >= 'a') {\n return true;\n }\n if (c >= 'A' && c <= 'Z') {\n return true;\n }\n return false;\n }", "public static boolean isConsonant(char carattere) {\n\t\t\tif (carattere == 'a' || carattere == 'e' || carattere == 'i' || carattere == 'o' || carattere == 'u' || carattere == 'A' || carattere == 'E' || carattere == 'I' || carattere == 'O' || carattere == 'U') return false;\n\t\t\t\telse return true;\n\t\t}", "private static boolean CharInClassInternal(char ch, String set, int start, int mySetLength, int myCategoryLength)\n\t{\n\t\tint min;\n\t\tint max;\n\t\tint mid;\n\t\tmin = start + SETSTART;\n\t\tmax = min + mySetLength;\n\n\t\twhile (min != max)\n\t\t{\n\t\t\tmid = (min + max) / 2;\n\t\t\tif (ch < set.charAt(mid))\n\t\t\t{\n\t\t\t\tmax = mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\t// The starting position of the set within the character class determines\n\t\t// whether what an odd or even ending position means. If the start is odd, \n\t\t// an *even* ending position means the character was in the set. With recursive \n\t\t// subtractions in the mix, the starting position = start+SETSTART. Since we know that \n\t\t// SETSTART is odd, we can simplify it out of the equation. But if it changes we need to \n\t\t// reverse this check. \n\t\tDebug.Assert((SETSTART & 0x1) == 1, \"If SETSTART is not odd, the calculation below this will be reversed\");\n\t\tif ((min & 0x1) == (start & 0x1))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (myCategoryLength == 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn CharInCategory(ch, set, start, mySetLength, myCategoryLength);\n\t\t}\n\t}", "public boolean mo46251a(char c) {\n return C14794o.m64544a(this.f43070b, c);\n }", "public boolean isAscii()\n { \n for (int i=0; i<val.length(); ++i)\n { \n int c = val.charAt(i);\n if (c > 0x7f) return false;\n }\n return true;\n }", "private boolean checkGuess(char c){\r\n boolean contains = false;\r\n for (int i = 0; i < wordArray.length; i++) {\r\n if (wordArray[i] == c) {\r\n contains = true;\r\n hidden[i] = c;\r\n }\r\n }\r\n if (!contains){\r\n guesses.add(c);\r\n }\r\n return contains;\r\n }", "public static boolean hasLeadingChar(char c,String s) {\n \tif(s == null || s.length()==0) {\n \t\treturn false;\n \t}\n \t\n \treturn (s.charAt(0) == c);\n }", "public static boolean inWord(String s, char c) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif (s.charAt(i) == Character.toLowerCase(c)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean equals(Case c){\n\t\treturn (this.posX==c.getPosX() && this.posY==c.getPosY()); \n\t}", "public boolean contains(Course c) {\n return courseList.contains(c); \n }", "public boolean isValidChar(char c) {\n\t\tif (Character.isIdentifierIgnorable(c))\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn renderer.getFont().canDisplay(c);\r\n\t}", "@Override\n\tpublic boolean search(char c)\n\t{\n\t\tmoveToStart();\n\t\t\n\t\t//Now search through our right stack\n\t\twhile(!right.isEmpty())\n\t\t{\n\t\t\t//peek the right, if it is the answer, return true\n\t\t\tif(right.peek().equals(c)) \n\t\t\t{\n\t\t\t\tmoveRight();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t//just simple go to the next character\n\t\t\telse moveRight();\n\t\t}\n\t\t\n\t\t//If we have gotten here than we never found the item, \n\t\t//simply move to the end and return false\n\t\tmoveToEnd();\n\t\treturn false;\n\t}", "public static boolean isAsciiAlphaLower(char ch) {\n/* 498 */ return (ch >= 'a' && ch <= 'z');\n/* */ }" ]
[ "0.6793201", "0.67022395", "0.66984004", "0.66926295", "0.6613243", "0.66063696", "0.65604305", "0.64962053", "0.6446119", "0.6442338", "0.63834095", "0.6370955", "0.6369671", "0.63693273", "0.6320478", "0.6308274", "0.6300025", "0.62702906", "0.62439007", "0.62377703", "0.62062085", "0.6178771", "0.61734784", "0.6165201", "0.6140659", "0.61301523", "0.6112366", "0.6104865", "0.6092714", "0.6082726", "0.6080193", "0.6074938", "0.60699344", "0.6058819", "0.60476613", "0.6033069", "0.6005369", "0.6004667", "0.5994694", "0.59894836", "0.5986233", "0.59828734", "0.5976002", "0.5966146", "0.59581846", "0.5929674", "0.59145725", "0.5913726", "0.59111917", "0.5885706", "0.5876676", "0.58449274", "0.5839524", "0.58240783", "0.5820836", "0.5820058", "0.58065313", "0.57973284", "0.5793605", "0.57912564", "0.5784658", "0.5769054", "0.5760016", "0.5754243", "0.57480484", "0.57391155", "0.5732695", "0.57228225", "0.57220614", "0.57199854", "0.5716363", "0.57157606", "0.5713111", "0.5712967", "0.57118404", "0.5711422", "0.570642", "0.56827587", "0.56810695", "0.5680954", "0.56775993", "0.56660485", "0.5663471", "0.5654577", "0.5653509", "0.5652171", "0.5642222", "0.56368554", "0.5633589", "0.563108", "0.56309843", "0.5628953", "0.5608384", "0.5599405", "0.5598686", "0.55916715", "0.5590737", "0.55901235", "0.55861104", "0.5585609" ]
0.7144437
0
Returns character number INDEX in the alphabet, where 0 <= INDEX < size().
char toChar(int index) { if (index >= 0 && index < size()) { return _chars[index]; } else { throw new EnigmaException("Index out of bounds."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int getIdx(char ch)\n {\n return (ch - 'a');\n }", "char toChar(int index) {\n return _letters.charAt(index);\n }", "private int getCharNumber(Character letter) {\n\t\tint integerA = Character.getNumericValue('a');\n\t\tint integerZ = Character.getNumericValue('z');\n\t\tint integerLetter = Character.getNumericValue(letter);\n\t\tif (integerLetter >= integerA && integerLetter <= integerZ) {\n\t\t\treturn integerLetter - integerA; //a -> 0, b -> 1, c -> 2, etc\n\t\t}\n\t\treturn -1;\n\t}", "public char charAt(int index);", "int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}", "public int letter2index(char c) { \t\n \treturn (int)(c - 'A')%26 ;\n }", "char toChar(int index) {\n if (index > _chars.length() || index < 0) {\n throw new EnigmaException(\"Alpha.toChar: Index out of range.\");\n }\n return _chars.charAt(index);\n }", "public int letterToIndex(char letter) {\r\n\t\tif (Character.toLowerCase(letter) == 'a')\r\n\t\t\treturn 0;\r\n\t\telse if (Character.toLowerCase(letter) == 'b')\r\n\t\t\treturn 1;\r\n\t\telse if (Character.toLowerCase(letter) == 'c')\r\n\t\t\treturn 2;\r\n\t\telse if (Character.toLowerCase(letter) == 'd')\r\n\t\t\treturn 3;\r\n\t\telse if (Character.toLowerCase(letter) == 'e')\r\n\t\t\treturn 4;\r\n\t\telse if (Character.toLowerCase(letter) == 'f')\r\n\t\t\treturn 5;\r\n\t\telse if (Character.toLowerCase(letter) == 'g')\r\n\t\t\treturn 6;\r\n\t\telse if (Character.toLowerCase(letter) == 'h')\r\n\t\t\treturn 7;\r\n\t\telse if (Character.toLowerCase(letter) == 'i')\r\n\t\t\treturn 8;\r\n\t\telse if (Character.toLowerCase(letter) == 'j')\r\n\t\t\treturn 9;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t}", "public char charAt(int index)\r\n/* 31: */ {\r\n/* 32: 44 */ if (index > this.pos) {\r\n/* 33: 45 */ throw new IndexOutOfBoundsException();\r\n/* 34: */ }\r\n/* 35: 47 */ return this.chars[index];\r\n/* 36: */ }", "public static int indexOfChar(char A,String alphabet) throws IOException\n {\n for(int i=0;i< alphabet.length();i++)\n {\n if(alphabet.charAt(i)==A)\n return i;\n }\n // Not Found in the alphabet\n return -1;\n }", "public char getLetter(int index) {\n\t\treturn _objMyStringBuilder.getCharAt(index);\n\t}", "private int getIndex(char c) {\n // if the character is a-z then return 0-25 based on position in alphabet\n if (c >= 'a' && c <= 'z') {\n return c - 'a';\n }\n // if the character is an appostrophe return 26 (last element in node array)\n else if (c == '\\'') {\n return 26;\n }\n // if the character is not a-z nor an apostrophe, return -1 to signify error\n else {\n return -1;\n }\n }", "private String getByAsc(int index) {\n int asc = 0;\n for (int i = 7; i >= 0; i--) {\n int tempInt = this.code[++index] - 48;\n asc += tempInt * Math.pow(2, i);\n }\n char ret = (char) asc;\n return String.valueOf(ret);\n }", "static int chara(String a) {\n int character = 0;\n while ((16 * character) < a.length()) {\n character++;\n }\n return character;\n }", "public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}", "public char index2letter(int i) { \t\n \treturn (char) (i + 'A');\n }", "char toChar(int index) {\n return _chars.charAt(index);\n }", "int getStartCharIndex();", "public char charAt(int anIndex)\n {\n return _xstr.charAt(_start + anIndex);\n }", "private int getCharacterIndex(Character c, int index) {\r\n if (c instanceof CommonInfected) {\r\n return (index % cInfectedNum);\r\n\t\t}\r\n else if (c instanceof Tank) {\r\n return (index % tankNum);\r\n\t\t}\r\n else if (c instanceof Child) {\r\n return (index % childNum);\r\n\t\t}\r\n else if (c instanceof Teacher) {\r\n return (index % teacherNum);\r\n\t\t}\r\n else if (c instanceof Soldier) {\r\n return (index % soldierNum);\r\n\t\t}\r\n else {\r\n return -1;\r\n\t\t}\r\n }", "@Override\r\n\tpublic char charAt(int index) {\n\t\treturn chars[index];\r\n\t}", "public int convertToInteger(char letterToEncode)\n\t{\n\t\tfor (int i = 0; i<characters.length; i++)\n\t\t{\n\t\t\tif(letterToEncode == characters[i])\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t}", "private static int alphabetPos(char l) {\n\t\tfor (int x = 0; x < ALPHABET.length; x++) {\n\t\t\tif (ALPHABET[x] == l) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public String indexToLetter(int index) {\r\n\t\tif (index == 0)\r\n\t\t\treturn \"a\";\r\n\t\telse if (index == 1)\r\n\t\t\treturn \"b\";\r\n\t\telse if (index == 2)\r\n\t\t\treturn \"c\";\r\n\t\telse if (index == 3)\r\n\t\t\treturn \"d\";\r\n\t\telse if (index == 4)\r\n\t\t\treturn \"e\";\r\n\t\telse if (index == 5)\r\n\t\t\treturn \"f\";\r\n\t\telse if (index == 6)\r\n\t\t\treturn \"g\";\r\n\t\telse if (index == 7)\r\n\t\t\treturn \"h\";\r\n\t\telse if (index == 8)\r\n\t\t\treturn \"i\";\r\n\t\telse if (index == 9)\r\n\t\t\treturn \"j\";\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public char getChar(int index) throws ArrayIndexOutOfBoundsException\n\t{\n\t\treturn (char) bytes[index];\n\t}", "public char crypt(char letter){\n\n char l = conns[alphabet.indexOf(letter)];\n\n return l;\n }", "public char charAt(int index) throws stackException\n {\n char ans;\n if(index >= 0 && index < numNodes)\n {\n Node n = this.get(index);\n ans = n.item;\n return ans;\n }\n else\n {\n throw new stackException(\"Index Is Out Of Bounds\");\n }\n }", "int toInt(char ch) {\n return _letters.indexOf(ch);\n }", "private char getRandomCharacter() {\n int min = 0;\n int max = ALPHABET.length-1;\n int randomPos;\n\n // Could possibly have used ASCII numbers 61-95\n randomPos = min + (int)(Math.random() * ((max - min) + 1));\n\n return ALPHABET[randomPos];\n }", "public char charAt(int charOffset);", "private int getCharNumber(char c) {\n int myReturn = -1;\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n if (a <= val && val <= z) {\n myReturn = val - a;\n }\n return myReturn;\n }", "public char givenIndex(String str, int index)\r\n {\r\n char a= str.charAt(index);\r\n return a;\r\n }", "public static int lookup(char letter) {\n\t\tswitch (letter) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'R':\n\t\t\treturn 1;\n\t\tcase 'N':\n\t\t\treturn 2;\n\t\tcase 'D':\n\t\t\treturn 3;\n\t\tcase 'C':\n\t\t\treturn 4;\n\t\tcase 'Q':\n\t\t\treturn 5;\n\t\tcase 'E':\n\t\t\treturn 6;\n\t\tcase 'G':\n\t\t\treturn 7;\n\t\tcase 'H':\n\t\t\treturn 8;\n\t\tcase 'I':\n\t\t\treturn 9;\n\t\tcase 'L':\n\t\t\treturn 10;\n\t\tcase 'K':\n\t\t\treturn 11;\n\t\tcase 'M':\n\t\t\treturn 12;\n\t\tcase 'F':\n\t\t\treturn 13;\n\t\tcase 'P':\n\t\t\treturn 14;\n\t\tcase 'S':\n\t\t\treturn 15;\n\t\tcase 'T':\n\t\t\treturn 16;\n\t\tcase 'W':\n\t\t\treturn 17;\n\t\tcase 'Y':\n\t\t\treturn 18;\n\t\tcase 'V':\n\t\t\treturn 19;\n\t\tcase 'B':\n\t\t\treturn 20;\n\t\tcase 'Z':\n\t\t\treturn 21;\n\t\tcase 'X':\n\t\t\treturn 22;\n\t\tcase '*':\n\t\t\treturn 23;\n\t\tcase '|':\n\t\t\treturn 24;\n\t\tcase '.':\n\t\t\treturn 25;\n\n\t\tdefault:\n\t\t\treturn -1;\n\t\t}\n\n\t}", "protected int charIndex(char c) {\r\n\t\ttry {\r\n\t\t\treturn characterMap.indexOf(c);\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public char charAt(int index) {\n/* 121 */ return this.m_str.charAt(index);\n/* */ }", "public char get_char(int k) throws Exception {\r\n\t\tif (k < 0 || k >= text.length())\r\n\t\t\tthrow new IndexOutOfBoundsException(\"Invalid index: \" + k);\r\n\t\telse\r\n\t\t\treturn text.charAt(k);\r\n\t}", "private String createAlphabeticalIndex(int replicateIndex) {\n StringBuilder builder = new StringBuilder();\n while (replicateIndex >= 26) {\n builder.append((char) (97 + (replicateIndex % 26)));\n replicateIndex /= 26;\n replicateIndex--;\n }\n builder.append((char) (97 + replicateIndex));\n return builder.reverse().toString();\n\n }", "int toInt(char c) {\n for (int i = 0; i < size(); i += 1) {\n if (_chars[i] == c) {\n return i;\n }\n }\n throw new EnigmaException(\"Character \" + c + \" not found.\");\n }", "public char convertToCharacter(int letterThatIsNumber)\n\t{\n\t\treturn characters[letterThatIsNumber];\n\t}", "public int getNbCharacter()\n\t{\n\t\treturn this.nbCharacter;\n\t}", "int toInt(char ch) {\n if (!contains(ch)) {\n throw new EnigmaException(\"Alpha.toInt: Char not in Alpha.\" + ch);\n }\n return _chars.indexOf(ch);\n }", "private static int letterToNumber(String str) {\n return (\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".indexOf(str))%26+1;\n }", "static int charToInt(char c) {\n if (c >= 'A' && c <= 'Z') return c - 'A';\n else if (c >= 'a' && c <= 'z') return c - 'a' + 26;\n else return -1;\n }", "public int charNum() {\n return myCharNum;\n }", "public char charAt(int index)\n\t{\n\t\tif (index < 0 || index > (length - 1))\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tCNode character = getCNodeAt(index, firstC);\n\t\treturn character.data;\n\t}", "public int getIndex() {\n\t\treturn index & 0xffff;\n\t}", "Character getCode();", "public int getSelectedCharacterIndex() {\n return selectedCharacterIndex;\n }", "public static char getUniqueChar() {\n return CHARS.charAt(getNextPosition());\n }", "public char getChar(int wordIndex, int charIndex) {\n return this.words.get(wordIndex).charAt(charIndex);\n }", "int toInt(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return i;\n }\n }\n return -1;\n }", "private char getMappingCode(char c) {\n if (!Character.isLetter(c)) {\n return 0;\n } \n else {\n return soundexMapping[Character.toUpperCase(c) - 'A'];\n }\n }", "protected char encrypt1(char c) throws NotInAlphabetException{\n if (passwordPos > password.length()-1) { //reset position to zero after every char is used\n passwordPos = 0; //reset to 0\n }\n //get the current index of where the character being encrypted is and then\n //get the character in the current position of the string using passwordPos and then\n //use this to look up the index in the alphabet\n int temp = ((alphabet.indexOf(c)) + (alphabet.indexOf(password.charAt(passwordPos)))); \n passwordPos += 1; //increment password pos;\n return alphabet.get(wrapInt(temp)); //wrap the index and return\n }", "protected int findFromIndex(char c) {\r\n int len = fromChars.length;\r\n for(int i = 0; i < len; i++) {\r\n if(fromChars[i] == c) return i;\r\n }\r\n return -1;\r\n }", "String getIndexBits();", "private int getValueFromBase64Alphabet(char character)\r\n {\r\n if (character >= 'A' && character <= 'Z')\r\n {\r\n return character - 'A';\r\n }\r\n if (character >= 'a' && character <= 'z')\r\n {\r\n return character - 'a' + 26;\r\n }\r\n if (character >= '0' && character <= '9')\r\n {\r\n return character - '0' + 52;\r\n }\r\n if (character == '+')\r\n {\r\n return 62;\r\n }\r\n if (character == '/')\r\n {\r\n return 63;\r\n }\r\n if (character == '=')\r\n {\r\n return 0;\r\n }\r\n return -1;\r\n }", "public static Integer SheetLetterToCol(String letter) {\n int loc_RetVal = 0;\n int loc_Val = 0;\n\n letter = letter.toUpperCase().trim();\n\n loc_RetVal = letter.charAt(letter.length() - 1) - 65;\n\n if (letter.length() > 1) {\n\n //loc_RetVal++;\n\n //A\n //AA\n //AB\n\n for (int loc_Conta = 1; loc_Conta < letter.length(); loc_Conta++) {\n\n loc_Val = letter.charAt((letter.length() - 1) - loc_Conta) - 64;\n\n loc_RetVal += loc_Val * (26 * (letter.length() - loc_Conta));\n\n }\n\n }\n\n return loc_RetVal;\n }", "public static int nextIndexOf(String string, String characters, int index) {\n int retInd = string.length();\n int auxIndex = -1;\n \n for (int i = 0; i < characters.length(); i++) {\n auxIndex = string.substring(index + 1).indexOf(characters.charAt(i));\n if ((auxIndex > -1) && (auxIndex + index + 1 < retInd)) {\n retInd = auxIndex + index + 1;\n }\n }\n return retInd;\n }", "public static int intForChar(char c) {\n for (int i = 0; i < DICT.length; i++) {\n if (DICT[i] == c) {\n return i;\n }\n }\n //Return 0 if character can't be found.\n return 0;\n }", "int fixIndex(int i) {\n int ALPHABET_SCOPE = 26;\n char ch = (char) (isEncryption ? i - shift : i + shift);\n int index = i;\n\n if (ch >= 65 && ch <= 90) {\n while (index < 65)\n index += ALPHABET_SCOPE;\n while (index > 90)\n index -= ALPHABET_SCOPE;\n } else {\n while (index < 97)\n index += ALPHABET_SCOPE;\n while (index > 122)\n index -= ALPHABET_SCOPE;\n }\n return index;\n }", "public int getDigit(int index){\n\t\tif (index+1 > data.length){\n\t\t\tSystem.out.println(\"index out of bounds\");\n\t\t}\n\t\treturn index;\n\t\t\n\t}", "public static byte getNumForChar(char c) {\n if (c < 48 || c > 57) {\n throw new IndexOutOfBoundsException(\"not 0-9\");\n }\n // the ascii offset for numbers is 48, subtracting 48 gets the right\n // byte\n return (byte) (c - 48);\n }", "public final int getContinuationCharacter(int index) {\n return this.continuationCharacters[index];\n }", "public int letterValue(char letter){\n int val;\n\n switch(letter){\n case 'a':\n case 'e':\n case 'i':\n case 'o':\n case 'u':\n case 'l':\n case 'n':\n case 's':\n case 't':\n case 'r': val =1;\n break;\n\n case 'd':\n case 'g': val =2;\n break;\n\n case 'b':\n case 'c':\n case 'm':\n case 'p': val =3;\n break;\n\n case 'f':\n case 'h':\n case 'v':\n case 'w':\n case 'y': val =4;\n break;\n\n case 'k': val =5;\n break;\n\n case 'j':\n case 'x': val =8;\n break;\n\n case 'q':\n case 'z': val =10;\n break;\n\n default: val =0;\n }\n return val;\n }", "public static int getLetterIndex(String word, byte startFrom) {\r\n int i, j;\r\n if (startFrom == head) // start checking from beginning\r\n {\r\n for (i = 0; i < word.length(); i++) {\r\n if (word.charAt(i) >= 'a' && word.charAt(i) <= 'z')\r\n return i;\r\n }\r\n return -1; // cannot found any letter in the string\r\n } else if (startFrom == tail) // start check from the ed\r\n {\r\n for (j = word.length() - 1; j >= 0; j--) {\r\n if (word.charAt(j) >= 'a' && word.charAt(j) <= 'z')\r\n return j;\r\n }\r\n return -1; // cannot found any letter in the string\r\n }\r\n return 0;\r\n }", "public int getCharStart() {\n\t\treturn -1;\n\t}", "private static int codePointToStringIndex(String string, int index, int cpLength) {\n if ( index < 0 )\n return 0;\n\n return (index > cpLength)\n ? string.length()\n : string.offsetByCodePoints(0, index);\n }", "int getEndCharIndex();", "private static int convertCharToInt(char charAt) {\n\t\tif(charAt == 48) {\t\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn 1;\n\t\t}\n\t}", "@Override\n\tpublic char charAt(int index) {\n\t\tif (index >= this.size()) throw new IndexOutOfBoundsException(\"out of bounds gah\");\n\t\tif (index<0) throw new IndexOutOfBoundsException(\"invalid index\");\n\n\t\tif (index<myIndex) {\n\t\t\tmyIndex = 0;\n\t\t\tmyLocalIndex=0;\n\t\t\tmyCurrent = myFirst;\n\t\t}\n\t\twhile (myIndex != index) {\n\n\t\t\tmyIndex++;\n\t\t\tmyLocalIndex++;\n\t\t\t\n\t\t\tif (myLocalIndex >= myCurrent.info.length()) {\n\t\t\t\tmyLocalIndex = 0;\n\t\t\t\t\n\t\t\t\tif (myCurrent.next.info == null) throw new IndexOutOfBoundsException(\"out of nodes\");\n\t\t\t\tmyCurrent = myCurrent.next;\n\t\t\t\t\n\t\t\t}\n\t\t}\n return myCurrent.info.charAt(myLocalIndex);\n }", "@Override\n public final char charAt(final int index) {\n return text.charAt(index);\n }", "public char getNextKey() {\n char nextChar = _input.charAt(_index++);\n return nextChar;\n }", "public int getCodePoint()\n {\n ensureGlyphIndex();\n return codePoint.intValue();\n }", "static int getValue(char c) {\n\t\tswitch(c) {\n\t\tcase 'A': return 0;\n\t\tcase 'C': return 1;\n\t\tcase 'G': return 2;\n\t\tcase 'T': return 3;\n\t\tdefault: return -1;\n\t\t}\n\t}", "private static int letterToXOrdinate(char c) {\n\t\t\n\t\tswitch (c) {\n\t\t\tcase 'A': return 0;\n\t\t\t\n\t\t\tcase 'B': return 1;\n\t\t\t\n\t\t\tcase 'C': return 2;\n\t\t\t\n\t\t\tcase 'D': return 3;\n\t\t\t\n\t\t\tcase 'E': return 4;\n\t\t\t\n\t\t\tcase 'F': return 5;\n\t\t\t\n\t\t\tcase 'G': return 6;\n\t\t\t\n\t\t\tcase 'H': return 7;\n\t\t\t\n\t\t\tcase 'I': return 8;\n\t\t\t\n\t\t\tdefault: return -1;\t\n\t\t}\n\t\n\t}", "public static int a(String name) {\n/* 80 */ String value = (String)a.get(name);\n/* 81 */ return (value != null) ? value.charAt(0) : -1;\n/* */ }", "private int char2Int(char _char){\n \tswitch(_char){\r\n \tcase 'A': case 'a': return 0; \r\n \tcase 'R': case 'r': return 1;\r\n \tcase 'N': case 'n': return 2; \t\r\n \tcase 'D': case 'd': return 3;\r\n \tcase 'C': case 'c': return 4;\r\n \tcase 'Q': case 'q': return 5;\r\n \tcase 'E': case 'e': return 6;\r\n \tcase 'G': case 'g': return 7;\r\n \tcase 'H': case 'h': return 8;\r\n \tcase 'I': case 'i': return 9;\r\n \tcase 'L': case 'l': return 10;\r\n \tcase 'K': case 'k': return 11;\r\n \tcase 'M': case 'm': return 12;\r\n \tcase 'F': case 'f': return 13;\r\n \tcase 'P': case 'p': return 14;\r\n \tcase 'S': case 's': return 15;\r\n \tcase 'T': case 't': return 16;\r\n \tcase 'W': case 'w': return 17;\r\n \tcase 'Y': case 'y': return 18;\r\n \tcase 'V': case 'v': return 19;\r\n \tcase 'B': case 'b': return 20;\r\n \tcase 'Z': case 'z': return 21;\r\n \tcase 'X': case 'x': return 22; \t\r\n \tdefault: return 23;\r\n \t}\r\n \t//\"A R N D C Q E G H I L K M F P S T W Y V B Z X *\"\r\n }", "private char generateRandomCharacter(){\n String alphabets = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n Random rand = new Random();\n int randomNumber = rand.nextInt(26);\n return alphabets.charAt(randomNumber);\n }", "private static int getNumber(char uppercaseLetter) {\n\t\tint res=0;\n\t\tString a=\"\";\n\t\t\n\t\tif (uppercaseLetter =='A' ||uppercaseLetter =='B' ||uppercaseLetter =='C') {\n\t\t\ta=\"2\";\n\t\t}\n\t\telse if (uppercaseLetter =='D' ||uppercaseLetter =='E' ||uppercaseLetter =='F') {\n\t\t\ta=\"3\";\n\t\t}\n\t\telse if (uppercaseLetter =='G' ||uppercaseLetter =='H' ||uppercaseLetter =='I' ) {\n\t\t\ta=\"4\";\n\t\t}\n\t\telse if(uppercaseLetter =='J' ||uppercaseLetter =='K' ||uppercaseLetter =='L' ) {\n\t\t\ta=\"5\";\n\t\t}\n\t\telse if(uppercaseLetter =='M' ||uppercaseLetter =='N' ||uppercaseLetter =='O' ) {\n\t\t\ta=\"6\";\n\t\t}\n\t\telse if (uppercaseLetter =='P' ||uppercaseLetter =='Q' ||uppercaseLetter =='R'|| uppercaseLetter=='S') {\n\t\t\ta=\"7\";\n\t\t}\n\t\telse if (uppercaseLetter =='T' ||uppercaseLetter =='U' ||uppercaseLetter =='V' ) {\n\t\t\ta=\"8\";\n\t\t}\n\t\telse if(uppercaseLetter =='W' ||uppercaseLetter =='X' ||uppercaseLetter =='Y' ||uppercaseLetter=='Z') {\n\t\t\ta=\"9\";\n\t\t}\n\t\telse \n\t\t\tSystem.out.print(\"Invalid input\");\n\t\t\n\t\treturn res;\n\t}", "public int letterPoolIndex(){\n return this.letterPoolIndex;\n }", "public static char generateLetter() {\n\t\t\n\t\treturn (char)((int)('A' + Math.random() * ('Z' - 'A' + 1)));\n\t}", "public int letterToInt(char letter){\n\t\t\treturn letters_to_num.get(letter);\n\t\t}", "public int getIndex() {\r\n\t\ttry {\r\n\t\t\treturn (int)(index * ((float)this.originalTextLength / (float)this.text.length));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// maybe there were a division by zero\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}", "public int getCharacter() {\n return getStat(character);\n }", "public static char getDigitCharacter(){\n\t\treturn getRandomCharacter('0','9');\n\t}", "public static int getValueAt(char[] parleValues, char index) {\t\n\t\treturn parleValues[binarySearchLeft(parleValues, index)+2];\n\t}", "public GameCharacter gameCharacterAt(int idx)\n\t{\n\t\tif (idx<0 || idx>=randomGameChars.length)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t\n\t\treturn randomGameChars[idx];\n\t}", "public int getUnicode(int index) {\n return codeToUnicode[index];\n }", "public static char getKey() {\n try {\n return (char) Input.read(true);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return 0;\n }", "public static char posLetterToNumber(char POS)\n\t{\n\t\tswitch (POS)\n\t\t{\n\t\t\tcase 'n':\n\t\t\t\treturn '1';\n\t\t\tcase 'v':\n\t\t\t\treturn '2';\n\t\t\tcase 'a':\n\t\t\t\treturn '3';\n\t\t\tcase 'r':\n\t\t\t\treturn '4';\n\t\t\tcase 's':\n\t\t\t\treturn '5';\n\t\t}\n\t\tSystem.err.println(\"ERROR in WordNetUtilities.posLetterToNumber(): bad letter: \" + POS);\n\t\treturn '1';\n\t}", "public int getIndex()\n {\n return getInt(\"Index\");\n }", "public char randomChar() {\n\t\tRandom r = new Random();\n\t\tint threshold = r.nextInt(total);\n\t\tint current = 0;\n\t\t\n\t\tfor (char c : letters.keySet()) {\n\t\t\tcurrent += letters.get(c);\n\t\t\tif (current > threshold) {\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ' ';\n\t}", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();" ]
[ "0.7101913", "0.6949462", "0.69350696", "0.6892408", "0.6892324", "0.68592876", "0.678823", "0.67746806", "0.66597444", "0.6659476", "0.6655807", "0.6545222", "0.65060496", "0.6475423", "0.6472309", "0.6412621", "0.6398413", "0.63928056", "0.6354717", "0.6350527", "0.629805", "0.6255386", "0.6247605", "0.62456644", "0.6243287", "0.62222755", "0.6202456", "0.61949235", "0.61907434", "0.6156719", "0.6150248", "0.6141253", "0.61381584", "0.6126287", "0.61151487", "0.60728025", "0.60660285", "0.6050487", "0.6041816", "0.59900916", "0.5983084", "0.5982146", "0.5970254", "0.59476596", "0.59454924", "0.5934508", "0.59258777", "0.5914503", "0.5905426", "0.5888083", "0.58879757", "0.5887134", "0.58653575", "0.585409", "0.5849713", "0.58410716", "0.5837241", "0.5835772", "0.58353305", "0.58222353", "0.58124036", "0.5809393", "0.5801986", "0.579759", "0.57703155", "0.5758151", "0.57576233", "0.5753481", "0.57460356", "0.5742359", "0.5736669", "0.5734065", "0.57313114", "0.5728434", "0.57057625", "0.56837714", "0.5679327", "0.5673878", "0.56649", "0.5662694", "0.5661719", "0.5649288", "0.5647915", "0.5620357", "0.56170535", "0.5616493", "0.5613051", "0.56067175", "0.55972224", "0.5594721", "0.558676", "0.5579831", "0.55773115", "0.55773115", "0.55773115", "0.55773115", "0.55773115", "0.55773115", "0.55773115", "0.55773115" ]
0.67038065
8
Returns the index of character C, which must be in the alphabet.
int toInt(char c) { for (int i = 0; i < size(); i += 1) { if (_chars[i] == c) { return i; } } throw new EnigmaException("Character " + c + " not found."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}", "public int letter2index(char c) { \t\n \treturn (int)(c - 'A')%26 ;\n }", "private int getIndex(char c) {\n // if the character is a-z then return 0-25 based on position in alphabet\n if (c >= 'a' && c <= 'z') {\n return c - 'a';\n }\n // if the character is an appostrophe return 26 (last element in node array)\n else if (c == '\\'') {\n return 26;\n }\n // if the character is not a-z nor an apostrophe, return -1 to signify error\n else {\n return -1;\n }\n }", "public static int indexOfChar(char A,String alphabet) throws IOException\n {\n for(int i=0;i< alphabet.length();i++)\n {\n if(alphabet.charAt(i)==A)\n return i;\n }\n // Not Found in the alphabet\n return -1;\n }", "protected int charIndex(char c) {\r\n\t\ttry {\r\n\t\t\treturn characterMap.indexOf(c);\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "static int getIdx(char ch)\n {\n return (ch - 'a');\n }", "private static int alphabetPos(char l) {\n\t\tfor (int x = 0; x < ALPHABET.length; x++) {\n\t\t\tif (ALPHABET[x] == l) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "protected int findFromIndex(char c) {\r\n int len = fromChars.length;\r\n for(int i = 0; i < len; i++) {\r\n if(fromChars[i] == c) return i;\r\n }\r\n return -1;\r\n }", "public static int indexOf(char c, CharSequence seq) {\n int max = seq.length();\n for (int i = 0; i < max; i++) {\n if (c == seq.charAt(i)) {\n return i;\n }\n }\n return -1;\n }", "private int getCharNumber(char c) {\n int myReturn = -1;\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n if (a <= val && val <= z) {\n myReturn = val - a;\n }\n return myReturn;\n }", "private char getMappingCode(char c) {\n if (!Character.isLetter(c)) {\n return 0;\n } \n else {\n return soundexMapping[Character.toUpperCase(c) - 'A'];\n }\n }", "public static int intForChar(char c) {\n for (int i = 0; i < DICT.length; i++) {\n if (DICT[i] == c) {\n return i;\n }\n }\n //Return 0 if character can't be found.\n return 0;\n }", "public int letterToIndex(char letter) {\r\n\t\tif (Character.toLowerCase(letter) == 'a')\r\n\t\t\treturn 0;\r\n\t\telse if (Character.toLowerCase(letter) == 'b')\r\n\t\t\treturn 1;\r\n\t\telse if (Character.toLowerCase(letter) == 'c')\r\n\t\t\treturn 2;\r\n\t\telse if (Character.toLowerCase(letter) == 'd')\r\n\t\t\treturn 3;\r\n\t\telse if (Character.toLowerCase(letter) == 'e')\r\n\t\t\treturn 4;\r\n\t\telse if (Character.toLowerCase(letter) == 'f')\r\n\t\t\treturn 5;\r\n\t\telse if (Character.toLowerCase(letter) == 'g')\r\n\t\t\treturn 6;\r\n\t\telse if (Character.toLowerCase(letter) == 'h')\r\n\t\t\treturn 7;\r\n\t\telse if (Character.toLowerCase(letter) == 'i')\r\n\t\t\treturn 8;\r\n\t\telse if (Character.toLowerCase(letter) == 'j')\r\n\t\t\treturn 9;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t}", "static int getValue(char c) {\n\t\tswitch(c) {\n\t\tcase 'A': return 0;\n\t\tcase 'C': return 1;\n\t\tcase 'G': return 2;\n\t\tcase 'T': return 3;\n\t\tdefault: return -1;\n\t\t}\n\t}", "private static int letterToXOrdinate(char c) {\n\t\t\n\t\tswitch (c) {\n\t\t\tcase 'A': return 0;\n\t\t\t\n\t\t\tcase 'B': return 1;\n\t\t\t\n\t\t\tcase 'C': return 2;\n\t\t\t\n\t\t\tcase 'D': return 3;\n\t\t\t\n\t\t\tcase 'E': return 4;\n\t\t\t\n\t\t\tcase 'F': return 5;\n\t\t\t\n\t\t\tcase 'G': return 6;\n\t\t\t\n\t\t\tcase 'H': return 7;\n\t\t\t\n\t\t\tcase 'I': return 8;\n\t\t\t\n\t\t\tdefault: return -1;\t\n\t\t}\n\t\n\t}", "protected char encrypt1(char c) throws NotInAlphabetException{\n if (passwordPos > password.length()-1) { //reset position to zero after every char is used\n passwordPos = 0; //reset to 0\n }\n //get the current index of where the character being encrypted is and then\n //get the character in the current position of the string using passwordPos and then\n //use this to look up the index in the alphabet\n int temp = ((alphabet.indexOf(c)) + (alphabet.indexOf(password.charAt(passwordPos)))); \n passwordPos += 1; //increment password pos;\n return alphabet.get(wrapInt(temp)); //wrap the index and return\n }", "static int charToInt(char c) {\n if (c >= 'A' && c <= 'Z') return c - 'A';\n else if (c >= 'a' && c <= 'z') return c - 'a' + 26;\n else return -1;\n }", "private int c2i(char c) {\n if (c >= 'A' && c <= 'Z')\n return c - 'A';\n else\n throw new BadCharException(c);\n }", "private int getCharNumber(Character letter) {\n\t\tint integerA = Character.getNumericValue('a');\n\t\tint integerZ = Character.getNumericValue('z');\n\t\tint integerLetter = Character.getNumericValue(letter);\n\t\tif (integerLetter >= integerA && integerLetter <= integerZ) {\n\t\t\treturn integerLetter - integerA; //a -> 0, b -> 1, c -> 2, etc\n\t\t}\n\t\treturn -1;\n\t}", "public static int lookup(char letter) {\n\t\tswitch (letter) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'R':\n\t\t\treturn 1;\n\t\tcase 'N':\n\t\t\treturn 2;\n\t\tcase 'D':\n\t\t\treturn 3;\n\t\tcase 'C':\n\t\t\treturn 4;\n\t\tcase 'Q':\n\t\t\treturn 5;\n\t\tcase 'E':\n\t\t\treturn 6;\n\t\tcase 'G':\n\t\t\treturn 7;\n\t\tcase 'H':\n\t\t\treturn 8;\n\t\tcase 'I':\n\t\t\treturn 9;\n\t\tcase 'L':\n\t\t\treturn 10;\n\t\tcase 'K':\n\t\t\treturn 11;\n\t\tcase 'M':\n\t\t\treturn 12;\n\t\tcase 'F':\n\t\t\treturn 13;\n\t\tcase 'P':\n\t\t\treturn 14;\n\t\tcase 'S':\n\t\t\treturn 15;\n\t\tcase 'T':\n\t\t\treturn 16;\n\t\tcase 'W':\n\t\t\treturn 17;\n\t\tcase 'Y':\n\t\t\treturn 18;\n\t\tcase 'V':\n\t\t\treturn 19;\n\t\tcase 'B':\n\t\t\treturn 20;\n\t\tcase 'Z':\n\t\t\treturn 21;\n\t\tcase 'X':\n\t\t\treturn 22;\n\t\tcase '*':\n\t\t\treturn 23;\n\t\tcase '|':\n\t\t\treturn 24;\n\t\tcase '.':\n\t\t\treturn 25;\n\n\t\tdefault:\n\t\t\treturn -1;\n\t\t}\n\n\t}", "public char crypt(char letter){\n\n char l = conns[alphabet.indexOf(letter)];\n\n return l;\n }", "int getStartCharIndex();", "public static char scanChar(String s) {\n\t\tCharacter key = null;\n\t\tMap<Character, String> mapping = new HashMap<>();\n\t\tfor (char c = 'A'; c <= '?'; c++) {\n\t\t\tmapping.put(c, AsciiArt.printChar(c));\n\t\t}\n\n\t\tfor (Map.Entry entry : mapping.entrySet()) {\n\t\t\tif (s.equals(entry.getValue())) {\n\t\t\t\tkey = (char) entry.getKey();\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tkey = '?';\n\t\t\t}\n\t\t}\n\n\t\treturn key;\n\n\t}", "Character getCode();", "public char test(char c) {\n\t\tchar[] lower = { '-', '+' };\n\t\tchar[] higher = { '*', '/' };\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tif (lower[i] == c) {\n\t\t\t\treturn 'l';\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tif (higher[i] == c) {\n\t\t\t\treturn 'h';\n\t\t\t}\n\t\t}\n\t\t// just to make the method work , no meaning for the 'n'\n\t\treturn 'n';\n\t}", "public int getCharaterPositionWithName(String s){\n int i;\n for(i = 0; i<alCharacter.size(); i++){\n String nameNextChar = alCharacter.get(i).getName();\n if(s.equals(nameNextChar)){\n break;\n }\n }\n return i;\n }", "public static char getLetter(String s){\n //A variable used in the helper method\n int i = 0;\n return getLetter(codeTree, s, i);\n }", "public static int indexOf(char[] array, char control) throws Exception{\r\n\t\tfor(int j=0;j<array.length;j++){\r\n\t\t\tif(array[j]==control){\r\n\t\t\t\treturn j;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new Exception(\"Non-valid arguments for encryption\");\r\n\t}", "private int getCharacterIndex(Character c, int index) {\r\n if (c instanceof CommonInfected) {\r\n return (index % cInfectedNum);\r\n\t\t}\r\n else if (c instanceof Tank) {\r\n return (index % tankNum);\r\n\t\t}\r\n else if (c instanceof Child) {\r\n return (index % childNum);\r\n\t\t}\r\n else if (c instanceof Teacher) {\r\n return (index % teacherNum);\r\n\t\t}\r\n else if (c instanceof Soldier) {\r\n return (index % soldierNum);\r\n\t\t}\r\n else {\r\n return -1;\r\n\t\t}\r\n }", "public static int ascii(char c) {\n \treturn (int)c;\n }", "public char charAt(int index);", "public char encryptChar(char c) {\r\n try {\r\n char returni = charMap.get(c);\r\n System.out.println(returni);\r\n return returni;\r\n } catch(NullPointerException e) {\r\n System.out.println(\"cant do this dude: \" + c);\r\n return c;\r\n }\r\n }", "public Letter getLetter(Character c) {\n return get(c);\n }", "int toInt(char ch) {\n return _letters.indexOf(ch);\n }", "public static int convert(char c) {\n switch (c) {\n case 'A': return 0;\n case 'T': return 1;\n case 'G': return 2;\n case 'C': return 3;\n default: return 4;\n }\n }", "int getCharacterOrdering(char key);", "public int acharCliente(List<Cliente> c, String str) {\r\n\t\tfor(int i = 0; i < c.tamanho(); i++) {\r\n\t\t\tif(c.get(i).getNome().compareTo(str) == 0) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "int toInt(char ch) {\n if (!contains(ch)) {\n throw new EnigmaException(\"Alpha.toInt: Char not in Alpha.\" + ch);\n }\n return _chars.indexOf(ch);\n }", "protected char decrypt1(char c) throws NotInAlphabetException {\n if (passwordPos > password.length()-1) { //reset position to zero after every char is used\n passwordPos = 0; //reset to 0\n }\n //get the current index of where the character being decrypted is and then\n //get the character in the current position of the string using passwordPos then make\n //it negative because we want to go to left and then\n //use this to look up the index in the alphabet\n int temp = alphabet.indexOf(c) + ( alphabet.indexOf(password.charAt(passwordPos)) *-1);\n passwordPos +=1; //increment password pos;\n return alphabet.get(wrapInt(temp)); //wrap the index and return\n }", "private static byte charToByte(char c) {\r\n\t\treturn (byte) \"0123456789ABCDEF\".indexOf(c);\r\n\t}", "static int chara(String a) {\n int character = 0;\n while ((16 * character) < a.length()) {\n character++;\n }\n return character;\n }", "public static byte getNumForChar(char c) {\n if (c < 48 || c > 57) {\n throw new IndexOutOfBoundsException(\"not 0-9\");\n }\n // the ascii offset for numbers is 48, subtracting 48 gets the right\n // byte\n return (byte) (c - 48);\n }", "private static byte charToByte(char c) {\n\t\treturn (byte) \"0123456789ABCDEF\".indexOf(c);\n\t}", "public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}", "public static char getKeyCharacter()\n {\n \n //Prompts and reads the key character in String\n final int MINIMUM_LENGTH = 0, MAXIMUM_LENGTH = 1;\n Scanner key = new Scanner(System.in);\n System.out.print(\"Please enter a single character to act as a key: \");\n String fh = key.nextLine();\n \n //Checks for key character length and loops for proper input\n while (fh.length() == MINIMUM_LENGTH|| fh.length() > MAXIMUM_LENGTH)\n {\t\n System.out.print(\"Please enter a single character to act as a key: \");\n fh = key.nextLine();\n }\n \n //Converts String to char\n char gKC = fh.charAt(0);\n return gKC;\n }", "static int baseToInt(char c)\n\t{\n\t\tif(c == 'a' || c == 'A')\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tif(c == 'c' || c == 'C')\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\tif(c == 'g' || c == 'G')\n\t\t{\n\t\t\treturn 2;\n\t\t}\n\t\treturn 3;\n\t}", "final public int compare(final char c, final char other) {\n return this.maybeLowercase(c) - this.maybeLowercase(other);\n }", "public static int getLetterIndex(String word, byte startFrom) {\r\n int i, j;\r\n if (startFrom == head) // start checking from beginning\r\n {\r\n for (i = 0; i < word.length(); i++) {\r\n if (word.charAt(i) >= 'a' && word.charAt(i) <= 'z')\r\n return i;\r\n }\r\n return -1; // cannot found any letter in the string\r\n } else if (startFrom == tail) // start check from the ed\r\n {\r\n for (j = word.length() - 1; j >= 0; j--) {\r\n if (word.charAt(j) >= 'a' && word.charAt(j) <= 'z')\r\n return j;\r\n }\r\n return -1; // cannot found any letter in the string\r\n }\r\n return 0;\r\n }", "private static int ind(char a, char b) {\n return (a == b) ? 1 : 0;\n }", "private static byte charToByte(char c) {\n return (byte) \"0123456789ABCDEF\".indexOf(c);\n }", "private static byte charToByte(char c) {\n return (byte) \"0123456789ABCDEF\".indexOf(c);\n }", "private static byte charToByte(char c) {\n return (byte) \"0123456789ABCDEF\".indexOf(c);\n }", "public int convertToInteger(char letterToEncode)\n\t{\n\t\tfor (int i = 0; i<characters.length; i++)\n\t\t{\n\t\t\tif(letterToEncode == characters[i])\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t}", "private char getRandomCharacter() {\n int min = 0;\n int max = ALPHABET.length-1;\n int randomPos;\n\n // Could possibly have used ASCII numbers 61-95\n randomPos = min + (int)(Math.random() * ((max - min) + 1));\n\n return ALPHABET[randomPos];\n }", "int toInt(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return i;\n }\n }\n return -1;\n }", "public int O000000o(char c) {\r\n for (int i = this.O00000oO; i < this.O00000o; i++) {\r\n if (c == this.O00000o0[i]) {\r\n return i - this.O00000oO;\r\n }\r\n }\r\n return -1;\r\n }", "private int inputChange(char c) {\n\n int co = 0;\n if ((c == 'A') || (c == 'a') || (c == '1')) {\n co = 0;\n }\n if ((c == 'B') || (c == 'b') || (c == '2')) {\n co = 1;\n }\n if ((c == 'C') || (c == 'c') || (c == '3')) {\n co = 2;\n }\n if ((c == 'D') || (c == 'd') || (c == '4')) {\n co = 3;\n }\n if ((c == 'E') || (c == 'e') || (c == '5')) {\n co = 4;\n }\n if ((c == 'F') || (c == 'f') || (c == '6')) {\n co = 5;\n }\n if ((c == 'G') || (c == 'g') || (c == '7')) {\n co = 6;\n }\n if ((c == 'H') || (c == 'h') || (c == '8')) {\n co = 7;\n }\n return co;\n }", "public int b(char paramChar)\r\n/* 714: */ {\r\n/* 715:706 */ return this.f[\"0123456789abcdef\".indexOf(paramChar)];\r\n/* 716: */ }", "private static int fromHexChar(final char c) {\n\t\tif (c >= 0x30 && c <= 0x39) {\n\t\t\t// ASCII codes from 0 to 9\n\t\t\treturn c - 0x30;\n\t\t} else if (c >= 0x61 && c <= 0x66) {\n\t\t\t// ASCII codes from 'a' to 'f'\n\t\t\treturn c - 0x57;\n\t\t} else if (c >= 0x41 && c <= 0x46) {\n\t\t\t// ASCII codes from 'A' to 'F'\n\t\t\treturn c - 0x37;\n\t\t}\n\t\treturn 0;\n\t}", "public int search(char value)\n {\n for(int i = 0; i < this.raw_value.length; i++)\n {\n if(this.raw_value[i] == value) return i;\n }\n return -1;\n }", "public int getNumberOfActorWhichLastnameStartWithChar(char c) {\r\n\t\tIterator<Entry<Identity, Actor>> iter = actors.entrySet().iterator();\r\n\t\tint nbActors = 0;\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMap.Entry<Identity, Actor> me = (Entry<Identity, Actor>)(iter).next();\r\n\t\t\tif(Character.toLowerCase(c) == me.getKey().getLastName().toLowerCase().charAt(0)){\r\n\t\t\t\tnbActors++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn nbActors;\r\n\t}", "protected static char columnToChar(int c) {\n if (c < 0 || c > 7) throw new IllegalArgumentException(c + \" is not a valid column.\");\n return (char) (97 + c);\n }", "public int letterValue(char letter){\n int val;\n\n switch(letter){\n case 'a':\n case 'e':\n case 'i':\n case 'o':\n case 'u':\n case 'l':\n case 'n':\n case 's':\n case 't':\n case 'r': val =1;\n break;\n\n case 'd':\n case 'g': val =2;\n break;\n\n case 'b':\n case 'c':\n case 'm':\n case 'p': val =3;\n break;\n\n case 'f':\n case 'h':\n case 'v':\n case 'w':\n case 'y': val =4;\n break;\n\n case 'k': val =5;\n break;\n\n case 'j':\n case 'x': val =8;\n break;\n\n case 'q':\n case 'z': val =10;\n break;\n\n default: val =0;\n }\n return val;\n }", "public static int lastIndexOf(char c, CharSequence seq) {\n int max = seq.length() - 1;\n for (int i = max; i >= 0; i--) {\n if (c == seq.charAt(i)) {\n return i;\n }\n }\n return -1;\n }", "private static int base64toInt(char c, byte[] alphaToInt) {\n int result = alphaToInt[c];\n if (result < 0) {\n throw new IllegalArgumentException(\"Illegal character \" + c);\n }\n return result;\n }", "public static int char_count(String y, char c){\r\n\tint count = 0;\r\n\tfor(int i = 0; i < y.length(); i++){\r\n\t\tif(y.charAt(i) == c){\r\n\t\t\tcount++;\r\n\t\t}\r\n\t}\r\n\treturn count;\r\n}", "@SuppressWarnings(\"WeakerAccess\")\n abstract public int hash(char c);", "private static int base64toInt(char c, byte[] alphaToInt) {\r\n int result = alphaToInt[c];\r\n if (result < 0)\r\n throw new IllegalArgumentException(\"Illegal character \" + c);\r\n return result;\r\n }", "int getNumCyc();", "public static int asInt(char c) {\n int temp = 0;\n switch (c) {\n case '2':\n temp = 2;\n break;\n case '3':\n temp = 3;\n break;\n case '4':\n temp = 4;\n break;\n case '5':\n temp = 5;\n break;\n case '6':\n temp = 6;\n break;\n case '7':\n temp = 7;\n break;\n case '8':\n temp = 8;\n break;\n case '9':\n temp = 9;\n break;\n case 'T':\n temp = 10;\n break;\n case 'J':\n temp = 11;\n break;\n case 'Q':\n temp = 12;\n break;\n case 'K':\n temp = 13;\n break;\n case 'A':\n temp = 14;\n break;\n\n default:\n throw new AssertionFailedError(\n \"Invalid Character \" + c + \" in card number column: Expected 1-9,J,Q,K,A\");\n\n }\n return temp;\n }", "public char charAt(int charOffset);", "public int getCharStart() {\n\t\treturn -1;\n\t}", "private int findCharacter(char ch, String inputString, int currentIdx) {\n if (inputString.isEmpty()) {\n return -1;\n }\n return inputString.charAt(0) == ch ? currentIdx : findCharacter(ch, inputString.substring(1), ++currentIdx);\n }", "public int[] shortestToChar(String S, char C) {\n int[] sol = initializeSol(S.length());\n \n for (int i = 0; i < S.length(); i++) {\n if (S.charAt(i) == C) {\n int j = 0;\n \n while (j < S.length()) {\n int l = Math.abs(i - j);\n if (sol[j] > l) {\n sol[j] = l;\n }\n j++;\n }\n }\n }\n \n return sol;\n }", "protected char map(char c) {\r\n int index = findFromIndex(c);\r\n if(index < 0) return c;\r\n return toChars[index];\r\n }", "public static int charToInt(char c) \n\t{\n\t\tswitch (c) \n\t\t{\n\t\tcase '0':\n\t\t\treturn 0;\n\t\tcase '1':\n\t\t\treturn 1;\n\t\tcase '2':\n\t\t\treturn 2;\n\t\tcase '3':\n\t\t\treturn 3;\n\t\tcase '4':\n\t\t\treturn 4;\n\t\tcase '5':\n\t\t\treturn 5;\n\t\tcase '6':\n\t\t\treturn 6;\n\t\tcase '7':\n\t\t\treturn 7;\n\t\tcase '8':\n\t\t\treturn 8;\n\t\tcase '9':\n\t\t\treturn 9;\n\t\tcase 'A':\n\t\t\treturn 10;\n\t\tcase 'B':\n\t\t\treturn 11;\n\t\tcase 'C':\n\t\t\treturn 12;\n\t\tcase 'D':\n\t\t\treturn 13;\n\t\tcase 'E':\n\t\t\treturn 14;\n\t\tcase 'F':\n\t\t\treturn 15;\n\t\tcase 'G':\n\t\t\treturn 16;\n\t\tcase 'H':\n\t\t\treturn 17;\n\t\tcase 'I':\n\t\t\treturn 18;\n\t\tcase 'J':\n\t\t\treturn 19;\n\t\tcase 'K':\n\t\t\treturn 20;\n\t\tcase 'L':\n\t\t\treturn 21;\n\t\tcase 'M':\n\t\t\treturn 22;\n\t\tcase 'N':\n\t\t\treturn 23;\n\t\tcase 'O':\n\t\t\treturn 24;\n\t\tcase 'P':\n\t\t\treturn 25;\n\t\tcase 'Q':\n\t\t\treturn 26;\n\t\tcase 'R':\n\t\t\treturn 27;\n\t\tcase 'S':\n\t\t\treturn 28;\n\t\tcase 'T':\n\t\t\treturn 29;\n\t\tcase 'U':\n\t\t\treturn 30;\n\t\tcase 'V':\n\t\t\treturn 31;\n\t\tcase 'W':\n\t\t\treturn 32;\n\t\tcase 'X':\n\t\t\treturn 33;\n\t\tcase 'Y':\n\t\t\treturn 34;\n\t\tcase 'Z':\n\t\t\treturn 35;\n\t\tcase '-':\n\t\t\treturn 36;\n\t\tdefault:\n\t\t\treturn -1;\n\t\t}\n\t}", "protected char tryReduceChar(char letter) {\n int comp = (letter < 97) ? Character.toLowerCase(letter) : letter;\n return (Integer.compare(comp, 97) > 0) ? (char) (letter - 1) : letter;\n }", "public char getChar();", "public static int countABC(String str) {\n int x = 0;\n char[] chars = str.toCharArray();\n for (char c : chars) {\n if (c == 'a' || c == 'b' || c == 'c') {\n x += 1;\n }\n }\n return x;\n }", "private static int firstUniqChar3(String s) {\n if (s == null || s.isEmpty()) {\n return -1;\n }\n\n int idx = Integer.MAX_VALUE;\n for (char c = 'a'; c <= 'z'; c++) {\n int first = s.indexOf(c);\n int last = s.lastIndexOf(c);\n\n if (first != -1 && first == last) {\n idx = Math.min(idx, first);\n }\n }\n\n return idx == Integer.MAX_VALUE ? -1 : idx;\n }", "private int getUseOfLetter(String word) {\n int result = 0;\n for (int i = 0; i < word.length(); i++) {\n result |= tables[word.charAt(i)];\n }\n return result;\n }", "public int findCourseIndex(Course c) {\n return courseList.indexOf(c);\n }", "public int indexOf(int ch) {\n/* 411 */ return this.m_str.indexOf(ch);\n/* */ }", "public int getGroup(char letter);", "private int countLetter(char c, File trainDir) {\r\n\t\tint totalCharacterCount = 0;\r\n\t\tfor(File file : trainDir.listFiles()){\r\n\t\t\ttry{\r\n\t\t\t\t// open file\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\t\r\n\t\t\t\twhile(br.ready()){\r\n\t\t\t\t\t// read a character and increment our counter\r\n\t\t\t\t\t// if this character matches the one we are looking for\r\n\t\t\t\t\tif((char)br.read() == c){\r\n\t\t\t\t\t\ttotalCharacterCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(FileNotFoundException e){\r\n\t\t\t\tSystem.err.println(\"Failed to Find File: \" + file.toString());\r\n\t\t\t}\r\n\t\t\tcatch(IOException ioe){\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn totalCharacterCount;\r\n\t}", "private int getCharacterGroup(char c){\n\t\t// Check to see which HashSet contains the character\n\t\tif ( GROUP1.contains( c ) ) {\n\t\t\treturn 1;\n\t\t} else if ( GROUP2.contains(c) ) {\n\t\t\treturn 2;\n\t\t} else if ( GROUP3.contains(c) ) {\n\t\t\treturn 3;\n\t\t} else if ( GROUP4.contains(c) ) {\n\t\t\treturn 4;\n\t\t} else if ( GROUP5.contains(c) ) {\n\t\t\treturn 5;\n\t\t} else if ( GROUP6.contains(c) ) {\n\t\t\treturn 6;\n\t\t} else if ( GROUP7.contains(c) ) {\n\t\t\treturn 7;\n\t\t} else if ( GROUP8.contains(c) ) {\n\t\t\treturn 8;\n\t\t}\n\t\t\n\t\t// Return -1 for any failed matchings \n\t\t//(this should not occur as all alphabetical characters have been declared in a HashSet)\n\t\treturn -1;\n\t}", "private int char2Int(char _char){\n \tswitch(_char){\r\n \tcase 'A': case 'a': return 0; \r\n \tcase 'R': case 'r': return 1;\r\n \tcase 'N': case 'n': return 2; \t\r\n \tcase 'D': case 'd': return 3;\r\n \tcase 'C': case 'c': return 4;\r\n \tcase 'Q': case 'q': return 5;\r\n \tcase 'E': case 'e': return 6;\r\n \tcase 'G': case 'g': return 7;\r\n \tcase 'H': case 'h': return 8;\r\n \tcase 'I': case 'i': return 9;\r\n \tcase 'L': case 'l': return 10;\r\n \tcase 'K': case 'k': return 11;\r\n \tcase 'M': case 'm': return 12;\r\n \tcase 'F': case 'f': return 13;\r\n \tcase 'P': case 'p': return 14;\r\n \tcase 'S': case 's': return 15;\r\n \tcase 'T': case 't': return 16;\r\n \tcase 'W': case 'w': return 17;\r\n \tcase 'Y': case 'y': return 18;\r\n \tcase 'V': case 'v': return 19;\r\n \tcase 'B': case 'b': return 20;\r\n \tcase 'Z': case 'z': return 21;\r\n \tcase 'X': case 'x': return 22; \t\r\n \tdefault: return 23;\r\n \t}\r\n \t//\"A R N D C Q E G H I L K M F P S T W Y V B Z X *\"\r\n }", "char getEChar();", "private int getValueFromBase64Alphabet(char character)\r\n {\r\n if (character >= 'A' && character <= 'Z')\r\n {\r\n return character - 'A';\r\n }\r\n if (character >= 'a' && character <= 'z')\r\n {\r\n return character - 'a' + 26;\r\n }\r\n if (character >= '0' && character <= '9')\r\n {\r\n return character - '0' + 52;\r\n }\r\n if (character == '+')\r\n {\r\n return 62;\r\n }\r\n if (character == '/')\r\n {\r\n return 63;\r\n }\r\n if (character == '=')\r\n {\r\n return 0;\r\n }\r\n return -1;\r\n }", "char getContactLetter(ContactSortOrder sortOrder);", "int invert(char c) {\n return _alphabet.toChar(invert(_alphabet.toInt(c)));\n }", "public abstract boolean matches(char c);", "char toChar(int index) {\n if (index > _chars.length() || index < 0) {\n throw new EnigmaException(\"Alpha.toChar: Index out of range.\");\n }\n return _chars.charAt(index);\n }", "public static Integer SheetLetterToCol(String letter) {\n int loc_RetVal = 0;\n int loc_Val = 0;\n\n letter = letter.toUpperCase().trim();\n\n loc_RetVal = letter.charAt(letter.length() - 1) - 65;\n\n if (letter.length() > 1) {\n\n //loc_RetVal++;\n\n //A\n //AA\n //AB\n\n for (int loc_Conta = 1; loc_Conta < letter.length(); loc_Conta++) {\n\n loc_Val = letter.charAt((letter.length() - 1) - loc_Conta) - 64;\n\n loc_RetVal += loc_Val * (26 * (letter.length() - loc_Conta));\n\n }\n\n }\n\n return loc_RetVal;\n }", "char startChar();", "private static int characterCount(String expr, Character c) {\n\t\tint count = 0;\n\t\tfor(Character ch : expr.toCharArray()) if(ch == c) count ++;\n\t\treturn count;\n\t}", "static int maxCharacter(String string) {\n\t\tchar[] ch = string.toCharArray();\n\t\t// create a hashmap for lookup using the char as a key\n\t\tMap<Character, int[]> map = new HashMap<Character, int[]>();\n\t\t// loop through string\n\t\tfor (int i = 0; i < ch.length; i++) {\n\t\t\t// if the character is already in the map increase occurrence value\n\t\t\tif (map.containsKey(ch[i])) {\n\t\t\t\t// get value array\n\t\t\t\t// increase occurrence\n\t\t\t\t// set new value\n\t\t\t\tint[] curArr = map.get(ch[i]);\n\t\t\t\tcurArr[1] = curArr[1] + 1;\n\t\t\t\tmap.put(ch[i], curArr);\n\t\t\t\t// if the character isn't in map, make a new entry\n\t\t\t} else {\n\t\t\t\t// create an array { index, occurrence vale}\n\t\t\t\tint[] newArr = { i, 1 };\n\t\t\t\tmap.put(ch[i], newArr);\n\t\t\t}\n\t\t}\n\t\tint max = 0;\n\t\tint index = 0;\n\t\t// loop through entries\n\t\tfor (Map.Entry<Character, int[]> e : map.entrySet()) {\n\t\t\t// find the largest occurrence value\n\t\t\tint[] maxArr = e.getValue();\n\t\t\tif (maxArr[1] > max) {\n\t\t\t\tmax = maxArr[1];\n\t\t\t\tindex = maxArr[0];\n\t\t\t}\n\t\t}\n\t\t// return the index of the first found character\n\t\treturn index;\n\t}", "Rule Letter() {\n // No effect on value stack\n return FirstOf(\n CharRange('a', 'z'),\n CharRange('A', 'Z'));\n }", "public char get_char(int k) throws Exception {\r\n\t\tif (k < 0 || k >= text.length())\r\n\t\t\tthrow new IndexOutOfBoundsException(\"Invalid index: \" + k);\r\n\t\telse\r\n\t\t\treturn text.charAt(k);\r\n\t}", "private static int countOccurrences(String input, char c) {\n int count = 0;\n for (int i = 0; i < input.length(); i++) {\n if (input.charAt(i) == c) {\n count++;\n }\n }\n return count;\n }" ]
[ "0.79564804", "0.78931963", "0.7884025", "0.77034366", "0.7542158", "0.73922676", "0.7339698", "0.7252818", "0.70559996", "0.7026614", "0.70044595", "0.6987912", "0.6980196", "0.6932417", "0.68966794", "0.68859524", "0.68663836", "0.6864741", "0.6817227", "0.6785924", "0.6648523", "0.65800756", "0.652563", "0.64830625", "0.6406301", "0.6394333", "0.6384914", "0.6369882", "0.6362839", "0.6288997", "0.62802523", "0.62771773", "0.6271555", "0.6250998", "0.6244668", "0.6243382", "0.623739", "0.62242955", "0.6203565", "0.61985004", "0.6195412", "0.61802083", "0.61726916", "0.6164209", "0.61477965", "0.6146741", "0.61433035", "0.6137677", "0.61371976", "0.61350375", "0.61350375", "0.61350375", "0.60975575", "0.60908043", "0.6080479", "0.60780513", "0.6061768", "0.60577834", "0.60358715", "0.60300905", "0.60240746", "0.6016313", "0.6014817", "0.59817505", "0.5976801", "0.597055", "0.5965779", "0.5963745", "0.59547704", "0.5950065", "0.59375", "0.59333175", "0.59330934", "0.5921212", "0.59201956", "0.5918045", "0.59158677", "0.5912416", "0.5906462", "0.5904135", "0.58989865", "0.5890591", "0.58878547", "0.58865345", "0.587292", "0.5872793", "0.58719075", "0.586928", "0.5856739", "0.5844624", "0.58440673", "0.5836072", "0.5832001", "0.5829082", "0.58279204", "0.58197665", "0.5819322", "0.58184916", "0.5811071", "0.5808388" ]
0.7003145
11
Returns true if C has already been added to CHARS.
boolean alreadyAdded(char c) { for (char x :_chars) { if (x == c) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean add(Character e) {\n\t\tif (!this.contains(e)) {\n\t\t\treturn super.add(e);\n\t\t} else\n\t\t\treturn false;\n\t}", "public boolean updateLetterList(char c){\n\t\tif(!usedLetters.contains(c)){\n\t\t\tusedLetters.add(c);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean add(char c) throws Exception\n {\n \n if(this.has(c))\n return false;\n else if(c != 'M' && c != 'T' && c != 'W' && c != 'R' && c != 'F')\n {\n throw new Exception(\"This is not a day!\");\n }\n else\n {\n char[] temp = new char[days.length + 1];\n temp[temp.length - 1] = c;\n days = temp;\n return true;\n }\n }", "boolean contains(char c) {\n for (char x : _chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }", "public boolean append(final char c) {\n buff[(beg + len) % size] = c;\n if (len == size) {\n beg = (beg + 1) % size;\n return true;\n } else {\n len += 1;\n return false;\n }\n }", "protected boolean isToBeRemoved(char c) {\r\n if(removeChars == null) return false;\r\n int len = removeChars.length;\r\n if(len == 8) return false;\r\n for(char removeChar : removeChars) {\r\n if(removeChar == c) return true;\r\n }\r\n return false;\r\n }", "public boolean hasC() {\n return c_ != null;\n }", "@Override\n\tpublic boolean contains(Charset cs) {\n\t\treturn false;\n\t}", "protected boolean isAddOp(char c) {\r\n\t\treturn (c == '+' || c == '-');\r\n\t}", "boolean contains(char ch) {\n return _letters.indexOf(ch) >= 0;\n }", "boolean hasHasCharacter();", "public boolean isChar(char c) \n\t{\n\t\tif (this.numBytes==1 && (charBytes[0]==c))\n\t\t\treturn true; \n\t\treturn false; \n\t}", "public boolean prepend(final char c) {\n beg = (beg + size - 1) % size;\n buff[beg] = c;\n if (len == size) {\n return true;\n } else {\n len += 1;\n return false;\n }\n }", "public boolean hasC() {\n return cBuilder_ != null || c_ != null;\n }", "boolean contains(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return true;\n }\n }\n return false;\n }", "boolean getHasCharacter();", "boolean hasChar();", "boolean contains(char ch) {\n String check = Character.toString(ch);\n return _chars.contains(check);\n }", "boolean eatChar (char c) {\n if (getChar () == c) { \n m_pos++;\n return true;\n }\n return false;\n }", "public boolean matches(char cNext) {\n int nIndex = 0;\n while (nIndex < m_cBuffer.length - 1)\n m_cBuffer[nIndex] = m_cBuffer[++nIndex];\n // save the new character\n m_cBuffer[nIndex] = cNext;\n\n // compare the buffer to the pattern\n nIndex = m_cBuffer.length;\n boolean bMatch = true;\n while (nIndex-- > 0 && bMatch)\n bMatch = (m_cBuffer[nIndex] == m_cPattern[nIndex]);\n\n return bMatch;\n }", "private boolean checkGuess(char c){\r\n boolean contains = false;\r\n for (int i = 0; i < wordArray.length; i++) {\r\n if (wordArray[i] == c) {\r\n contains = true;\r\n hidden[i] = c;\r\n }\r\n }\r\n if (!contains){\r\n guesses.add(c);\r\n }\r\n return contains;\r\n }", "public boolean isOccupied() {\r\n\treturn character != null;\r\n }", "public final boolean addToChest(ChestCharacter character) {\n if (chestCharacters.containsKey(character.getCharacterName())) {\n return false;\n }\n\n chestCharacters.put(character.getCharacterName(), character);\n\n return true;\n }", "public boolean isC() {\n return c;\n }", "public boolean isEquivalent(char character, char anothercharacter);", "public boolean hasHasCharacter() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean addAll(Iterable<T> c){\r\n\t\t//same addAll from HW2 denseboard\r\n\t\tboolean added = false;\r\n\t\tfor(T thing : c){\r\n\t\t\tadded |= this.add(thing);\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "public boolean check_charac_exist(String charac_name){\n if(charac_store.get(charac_name) != null)\n return true;\n else\n return false;\n }", "public boolean hasHasCharacter() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "final public boolean isEqual(final char c, final char other) {\n return Comparators.EQUAL == this.compare(c, other);\n }", "public boolean isCharged(){\n\t\treturn IS_CHARGED;\n\t}", "public boolean hasCharacter(final int col, final int row)\r\n {\r\n for (int index = 0; index < characters.size(); index++)\r\n {\r\n //get the current character\r\n final Character character = characters.get(index);\r\n \r\n //if the integer values match, we have a character\r\n if ((int)character.getCol() == col && (int)character.getRow() == row)\r\n return true;\r\n }\r\n \r\n //no characters found, return false\r\n return false;\r\n }", "public boolean add(String key) {\n char[] characters = key.trim().toCharArray();\n\n TrieNode trieNode = root; // current trie node\n\n boolean alreadyExists = true;\n\n for (char ch : characters) {\n // get the character represent index from the current trie node\n int index = ch - 'a';\n if (trieNode.offsprings[index] == null) {\n trieNode.offsprings[index] = new TrieNode();\n alreadyExists = false;\n }\n\n trieNode = trieNode.offsprings[index];\n }\n\n trieNode.isRepresentACompleteWord = true;\n\n return alreadyExists;\n }", "public boolean getHasCharacter() {\n return hasCharacter_;\n }", "boolean hasC();", "public boolean is(char chIn) {\n for (char ch: allOps) {\n if (chIn == ch){\n return true;\n }\n }\n return false;\n }", "public boolean getHasCharacter() {\n return hasCharacter_;\n }", "void add(char c);", "public boolean insertCuadrante(Cuadrante c) {\r\n\t\tint i=0;\r\n\t\twhile (i<cuadrantes.size()){\r\n\t\t\tif (cuadrantes.get(i).getMes()==c.getMes() && cuadrantes.get(i).getAnio()==c.getAnio())\r\n\t\t\t\tcuadrantes.remove(i);\r\n\t\t\telse\r\n\t\t\t\ti++;\r\n\t\t}\r\n\t\tcuadrantes.add(c);\r\n\t\tinsertCache(c, \"Cuadrante\");\r\n\t\treturn true;\r\n\t}", "private static boolean inArray(char c, char[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (c == array[i]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public Character isUsedBy(Character character);", "private static boolean needsConsolidation(final Cigar c) {\n if ( c.numCigarElements() <= 1 )\n return false; // fast path for empty or single cigar\n\n CigarOperator lastOp = null;\n for( final CigarElement cur : c.getCigarElements() ) {\n if ( cur.getLength() == 0 || lastOp == cur.getOperator() )\n return true;\n lastOp = cur.getOperator();\n }\n\n return false;\n }", "static boolean isCharacter(char c) {\n\t\t\tswitch (c) {\n\t\t\t\tcase CHARACTER:\n\t\t\t\tcase CHARACTER_UPPER:\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "boolean hasUniqueCharactersTimeEfficient(String s) {\n Set<Character> characterSet = new HashSet<Character>();\n for(int i=0; i < s.length();i++) {\n if(characterSet.contains(s.charAt(i))) {\n return false;\n } else {\n characterSet.add(s.charAt(i));\n }\n }\n return true;\n }", "protected boolean canAddCollation(RelDataTypeField field) {\n return field.getType().getSqlTypeName().getFamily() == SqlTypeFamily.CHARACTER;\n }", "public boolean hasNext() {\n return c != -1;\n }", "public abstract boolean matches(char c);", "public boolean isValidControlChar(java.awt.event.KeyEvent e){\n\t\t//CTRL\n\t\tif(e.isControlDown() && !e.isAltDown() && !e.isShiftDown()){\n\t\t\tif(e.getKeyCode() == java.awt.event.KeyEvent.VK_V){\n\t\t\t\tClipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();\n\t\t\t\ttry {\n\t\t\t\t\tappendText((String)(cb.getData(DataFlavor.stringFlavor)));\n\t\t\t\t} catch (UnsupportedFlavorException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}else if(e.getKeyCode() == java.awt.event.KeyEvent.VK_C){\n\t\t\t\tClipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();\n\t\t\t\ttimer.stop();\n\t\t\t\tcursorVisible = false;\n\t\t\t\tStringSelection s = new StringSelection(getText());\n\t\t\t\tcb.setContents(s, s);\n\t\t\t\ttimer.start();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else{ //Other, such as backspace\n\t\t\tif(e.getKeyCode() == java.awt.event.KeyEvent.VK_BACK_SPACE)\n\t\t\t\tremoveChar();\n\t\t}\n\t\treturn false;\n\t}", "private boolean isValid(char c) {\n if (c == 'A' || c == 'T' || c == 'G' || c == 'C' || c == 'N'\n || c == 'a' || c == 't' || c == 'g' || c == 'c') {\n return true;\n }\n return false;\n }", "public boolean hasCharactersLeft() {\n\t\treturn world.getAllCharacterOfOwner(this).size() > 0;\n\t}", "public boolean O00000o(char[] cArr) {\r\n return !O00000Oo() && Arrays.binarySearch(cArr, this.O00000o0[this.O00000oO]) >= 0;\r\n }", "public boolean isCharAt(int row, int col, char c)\n {\n if (row < 0 || row >= SIZE || col < 0 || col >= SIZE) {\n return false;\n }\n\n if (map[row][col] == c) {\n return true;\n }\n else {\n return false;\n } \n }", "public boolean isCharacterInSameLocation(Character inputCharA, Character inputCharB) {\r\n\t\tString LocationCharA = inputCharA.getLocation();\r\n\t\tArrayList<Character> inputListLocation = getListCharacterInLocation(LocationCharA);\r\n\t\tif (inputListLocation.contains(inputCharA) && inputListLocation.contains(inputCharB))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "public boolean alreadyGuessed(char guess) {\r\n \t//Convert guess to string, use contains method to check guessesMade ArrayList.\r\n if (guessesMade.contains(String.valueOf(guess))) {\r\n \treturn true;\r\n }\r\n \treturn false;\r\n }", "public boolean add(LooseChange c)\n {\n\tthis.pennies += c.pennies;\n\tthis.nickels += c.nickels;\n\tthis.dimes += c.dimes;\n\tthis.quarters += c.quarters;\n\t\n\treturn true;\n }", "public boolean canPutCD(){\n if(seesSlot() && !seesCD() && stackHasCD())\n return true;\n else\n return false;\n }", "private boolean CATS(Category... cs) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int ch = input.nextChar(in, len);\r\n Category cat = Category.get(ch);\r\n boolean ok = false;\r\n for (Category c : cs) if (cat == c) ok = true;\r\n if (! ok) return false;\r\n in += len;\r\n return true;\r\n }", "public boolean isPossibleToadd() {\n if (capacity == storage) {\n return false;\n } else {\n return true;\n }\n }", "public boolean mo46251a(char c) {\n return C14794o.m64544a(this.f43070b, c);\n }", "public boolean contains(Chamber c) {\n return chambers.containsKey(c);\n }", "public boolean add(E element){\n Object result = map.put(element, \"\");\n return (result == null);\n }", "public boolean add(String s){\n if(count == contents.length) {\n return false;\n }\n contents[count] = s;\n count++;\n return true;\n }", "public boolean verificaDuplicidade(String s) {\n\t\tfor (Compromisso c : this.compromisso) {\n\t\t\tif (c.getDataInicio().equals(s)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean hasNextChar() {\n \t boolean result = scanner.hasNext();\n \t return result;\n }", "public synchronized boolean setUserChar(@NonNull Puzzle puzzle, char selectedCharacter,\n char c) {\n boolean changed = false;\n Character previousChar = getUserCharsMapping(puzzle).get(selectedCharacter);\n if (previousChar == null) {\n previousChar = 0;\n }\n char userChar = Character.toUpperCase(c);\n if (previousChar != userChar && userChar != 0) {\n if (previousChar != 0) {\n // User made a correction\n changed = true;\n }\n if (mInputs == null) {\n mInputs = 1;\n } else {\n mInputs++;\n }\n }\n getUserCharsMapping(puzzle).put(selectedCharacter, userChar);\n return changed;\n }", "public boolean canAdd(Card c)\r\n {\r\n int val;\r\n int v;\r\n if(c.getSuit() != suit)\r\n return false;\r\n \r\n v = c.getValue();\r\n if(pile.isEmpty() && v == 12)\r\n return true;\r\n \r\n if(!pile.isEmpty())\r\n {\r\n card = pile.peek();\r\n val = card.getValue();\r\n if (val == 12)\r\n val = -1;\r\n if(v == (val+1))\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean cellAlreadyExists(Cell c) {\r\n for (Cell cell : cells) {\r\n if (Arrays.equals(c.getShape().xpoints, cell.getShape().xpoints)) { // && Arrays.equals(c.getShape().ypoints, cell.getShape().ypoints)) {\r\n\r\n return true;\r\n }\r\n }\r\n return false;\r\n\r\n }", "public static boolean m64544a(@C6003d char[] cArr, char c) {\n C14445h0.m62478f(cArr, \"$receiver\");\n return m64612b(cArr, c) >= 0;\n }", "public boolean characterInput(char c);", "public boolean addIngredient(char ingredient) \n\t{\n\t\tif (ingredients.length() < numIngredients) \n\t\t{\n\t\t\t//check to see that the ingredients are valid \n\t\t\tif (ingredient=='a' | ingredient=='b' | ingredient=='c' | ingredient=='d' | ingredient=='w')\n\t\t\t{\n\t\t\t\t//add the ingredient if it is valid\n\t\t\t\tingredients+=ingredient;\n\t\t\t\treturn true; \n\t\t\t}\n\t\t\t//if it is an invalid ingredient\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t\t//if there is no more space in the potion bottle\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean canAdd() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] == null) {\r\n temp++;\r\n }\r\n }\r\n if (temp > 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@Override\n public boolean add(T value) {\n if (!this.validate(this.cursor)) {\n this.ensureCapacity();\n }\n this.values[this.cursor++] = value;\n return this.values[this.cursor - 1].equals(value);\n }", "public static boolean isUniqueChars(String str) {\n\t if(str.length() > 128) return false;\n\t \n\t //created hash table boolean to flag duplicate characters\n\t boolean [] check = new boolean [128];\n\t \n\t //run a for look in order to iterate through the string.\n for(int i = 0; i < str.length(); i++){\n //convert the characters of the string array into integers\n int val = str.charAt(i);\n //check the hash table for past characters seen, there are 128 ascii codes\n\t if(check[val]) return false;\n\t //turn on the true flag for characters you are seeing\n\t check[val] = true;\n\t }\n\t \n\t //pass the hash table therefore it is unique and true;\n\t return true;\n\n\t}", "public static boolean uniqueCharString(String s){\r\n HashMap<Character, Integer> map = new HashMap<Character, Integer>();\r\n for (int i = 0; i < s.length(); i++){\r\n if (map.get(s.charAt(i)) == null){\r\n map.put(s.charAt(i), 1);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean\tadd(String e) {\n\t\tboolean notExist = false;\n\t\tif (map.put(e, PRESENT)==null) {\n\t\t\tnotExist = true;\n\t\t}\n\t\treturn notExist;\n\t}", "@Override\n public boolean addAll(Collection<? extends T> c) {\n Object[] newArray = c.toArray();\n int newSize = newArray.length;\n System.arraycopy(newArray, 0, data, size, newSize);\n size += newSize;\n return newSize != 0 ? true : false;\n }", "public static boolean append(String word){\n\t\tboolean x = false;\n\t\tboolean y = false;\n\t\tfor(int i = 33; i <= 126; i++){\n\t\t\tchar c = (char)i;\n\t\t\tx = guessPW(word.concat(Character.toString(c)));\n\t\t\ty = guessPW(Character.toString(c).concat(word));\n\t\t}\n\n\t\tif(x | y){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public static final boolean m23677a(char c) {\n if (Character.isWhitespace(c) || Character.isSpaceChar(c)) {\n return true;\n }\n return false;\n }", "private static boolean m44512a(char c) {\n return c == 10 || c == 13 || c == 9 || c == ' ';\n }", "public boolean add(String e) {\r\n \tSystem.out.println(e + \" \" + PRESENT);\r\n return map.put(e, PRESENT)==null;\r\n }", "private boolean isChar(char c){\n\t\tif(Character.isISOControl(c))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public static boolean isAllCharacterUnique(String sIn) {\n if (sIn.length() > 32768) {\n return false;\n }\n for (char c : sIn.toCharArray()) {\n if (sIn.indexOf(c) != sIn.lastIndexOf(c)) return false;\n }\n return true;\n }", "public boolean alreadyGuessed(char guess) {\r\n return this.guesses.contains(guess);\r\n }", "public boolean O00000o0(char c) {\r\n return !O00000Oo() && this.O00000o0[this.O00000oO] == c;\r\n }", "private boolean cat() {\r\n if (in >= input.length() - 2) return false;\r\n boolean ok = cats.contains(input.substring(in, in + 2));\r\n if (ok) in = in + 2;\r\n return ok;\r\n }", "public boolean checkDuplicates(String chars) {\n char[] check = chars.toCharArray();\n for (int i = 0; i < chars.length(); i++) {\n for (int j = i + 1; j < chars.length(); j++) {\n if (check[i] == check[j]) {\n return true;\n }\n }\n }\n return false;\n }", "private boolean CHAR(char ch) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code != ch) return false;\r\n in += len;\r\n return true;\r\n }", "public void addChar(Character target)\r\n\t{\r\n\t\tboolean isReplace = false;\r\n\t\t\r\n\t\t//Check if 'target' already exist: If yes, replace it with new one\r\n\t\tListIterator<Character> iterator = listCharacter.listIterator();\r\n\t\twhile (iterator.hasNext())\r\n\t\t{\r\n\t\t Character next = iterator.next();\r\n\t\t if (next.isSameChararacter(target)) \r\n\t\t {\r\n\t\t\t //Replace element\r\n\t\t\t iterator.set(target);\t\t\r\n\t\t\t System.out.println(target.getName()+\" already exist, it was replaced\");\r\n\t\t\t isReplace = true;\r\n\t\t }\r\n\t\t }\r\n\t\t\r\n\t\t// If the list doesn't contain Character 'target', add it to the list\r\n\t\tif (!isReplace)\r\n\t\t{\r\n\t\tlistCharacter.add(target);\r\n\t\t}\r\n\t}", "boolean hasCsStr();", "public boolean addAll(OpenERPRecordSet c) {\r\n\t\tboolean allOK = false;\r\n\t\tIterator<OpenERPRecord> i = c.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord o = i.next();\r\n\t\t\tallOK = this.add(o) && allOK;\r\n\t\t}\r\n\t\treturn allOK;\r\n\t}", "private static boolean checkChar(char c) {\n\t\tif (Character.isDigit(c)) {\n\t\t\treturn true;\n\t\t} else if (Character.isLetter(c)) {\n\t\t\tif (Character.toUpperCase(c) >= 'A' && Character.toUpperCase(c) <= 'F') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private boolean exists(byte cijfer) {\r\n\t\tbyte i = 0;\r\n\t\tCell[] cells = getCellArray();\r\n\t\twhile (i < cells.length && cells[i] != null) {\r\n\t\t\tif (cells[i].getValue() == cijfer)\r\n\t\t\t\treturn true;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static boolean isATGC(final CharSequence c) {\n\tif(c==null || c.length()==0) return false;\n\tfor(int i=0;i< c.length();i++) if(!isATGC(c.charAt(i))) return false;\n\treturn true;\n\t}", "public boolean isStringMadeofAllUniqueChars(String word) {\n if (word.length() > 128) {\n return false;\n }\n boolean[] char_set = new boolean[128];\n for (int i = 0; i < word.length(); i++) {\n int val = word.charAt(i);\n System.out.println(val);\n if (char_set[val]) {\n return false;\n }\n char_set[val] = true;\n }\n return true;\n }", "private boolean inSameSuit() {\n for (int i = 0; i < cards.length-2; i++) {\n if (cards[i].charAt(1) != cards[i + 1].charAt(1)) {\n return false;\n }\n }\n \n return true;\n }", "public abstract boolean isStarterChar(char c);", "public boolean isOperator(char c){\n char[] operator = { '+', '-', '*', '/','^', ')', '(' };\r\n int temp = 0;\r\n for (int i = 0; i < operator.length; i++) {\r\n if (c == operator[i])\r\n temp +=1;\r\n }\r\n return temp != 0;\r\n }", "private boolean equalsChars(char[] first, char[] second) {\n for (int i = 0; i < second.length; i++)\n if (first[i] != second[i])\n return false;\n return true;\n }", "public static boolean is_C_plus_C__plus__C_plus_C(FunctionNode node) {\n return true;\n }", "public Boolean isUnique(String value) {\n\t\t//Validation step \n\t\tif (value == null || value.length() > 128) return false;\n\t\t\n\t\t//Logic to find if the string has only unique characters\n\t\tboolean[] asciiCharList = new boolean[128];\n\t\t\n\t\t//toUpperCase because is case insensitive (\"C\" == \"c\") \n\t\t//replaceAll(\"\\\\s\",\"\") because whitespace don't matters. \n\t\tfor (char letter : value.toUpperCase().replaceAll(\"\\\\s\",\"\").toCharArray()) {\n\t\t\tif (asciiCharList[(int) letter]) return false;\n\t\t\tasciiCharList[(int) letter] = true;\n\t\t}\n\t\treturn true;\n\t}" ]
[ "0.68170357", "0.65844244", "0.6552134", "0.6493809", "0.636551", "0.61892396", "0.6147078", "0.6073158", "0.60024995", "0.59398323", "0.5926222", "0.5917985", "0.58437717", "0.5822037", "0.5799943", "0.57950336", "0.5774097", "0.5740953", "0.57372373", "0.57189137", "0.5716605", "0.57163155", "0.5668771", "0.56609297", "0.5644794", "0.5642163", "0.5641182", "0.56337625", "0.5629002", "0.5558757", "0.55524534", "0.55439264", "0.5529241", "0.5520179", "0.5512997", "0.549092", "0.54856884", "0.54776204", "0.547533", "0.54748327", "0.54722965", "0.54619694", "0.5440554", "0.5429397", "0.5425334", "0.5419307", "0.5394511", "0.53845304", "0.53825796", "0.53800994", "0.53767335", "0.53690255", "0.5365992", "0.53604716", "0.535176", "0.5346539", "0.5337522", "0.5328362", "0.5324735", "0.53233254", "0.53002024", "0.5296126", "0.52938", "0.5290571", "0.529055", "0.52877235", "0.5275493", "0.52753013", "0.52689123", "0.5266208", "0.5262361", "0.52441657", "0.5238121", "0.523534", "0.5235091", "0.52349454", "0.52307373", "0.52266353", "0.5226623", "0.5221589", "0.5218072", "0.5210624", "0.5202786", "0.519401", "0.5193194", "0.51922935", "0.51851964", "0.51813203", "0.51800853", "0.5178907", "0.5178199", "0.5170067", "0.51697826", "0.51655895", "0.51638776", "0.5162897", "0.5160612", "0.5154008", "0.5149319", "0.51488984" ]
0.8215283
0
Returns String of all characters in alphabet.
String string() { return _charsString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "public Set<Character> alphabet(){\n\t\tSet<Character> a = new HashSet<Character>();\n\t\ta.addAll(gauche.alphabet());\n\t\ta.addAll(droit.alphabet());\n\t\treturn a;\n\t}", "public static String[] generateRegularAlphabet()\n {\n String[] regularAlphabet = new String[26];\n for(int index = 0; index<regularAlphabet.length; index++)\n {\n regularAlphabet[index] = (char)(index+65) + \"\";\n }\n return regularAlphabet;\n }", "public static String ranLetterString() {\n ArrayList<Character> ranCharArr = new ArrayList<Character>();\n ArrayList<Character> letter = new ArrayList<Character>();\n for (char i = 'a'; i <= 'z'; i++) {\n letter.add(i);\n }\n Collections.shuffle(letter);\n for ( int i = 0; i < 5; i++) {\n ranCharArr.add(letter.get(i));\n }\n System.out.println(ranCharArr);\n StringBuilder ranString = new StringBuilder();\n for(char ranChar : ranCharArr) {\n ranString.append(ranChar);\n }\n return ranString.toString();\n }", "public String toString(){\r\n\t\treturn \"\" + letter;\r\n\t}", "public String getLetters() {\r\n\t\treturn solution.getLetterSet();\r\n\t}", "Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }", "public static String rndLetterString() {\r\n int spLen = RBytes.rndInt(10, 20);\r\n char[] c = RBytes.rndCharArray('a', 'z');\r\n char[] C = RBytes.rndCharArray('A', 'Z');\r\n char[] d = RBytes.rndCharArray('0', '9');\r\n String special = \"\";\r\n for (int s = 0; s < spLen; s++) {\r\n special += \"!@#$%^&*()-_~`=+:;.,\";\r\n }\r\n String s1 = new String(c) + new String(d) + new String(C) + special;\r\n return shaffleString(s1);\r\n }", "private String getCharacterString()\n {\n String returnString = \"Characters:\\n\\t\";\n Set<String> keys = characters.keySet();\n if(characters.size() <= 0) {\n returnString += \"[None]\";\n return returnString;\n }\n for(String character : keys) {\n returnString += \" [\" + character + \"]\";\n }\n return returnString;\n }", "public String getLetters()\n\t\t\t{\n\t\t\treturn letters;\n\t\t\t}", "Alphabet alphabet() {\n return _alphabet;\n }", "public static String shiftAlphabet(int shift) {\r\n int start = 0;\r\n if (shift < 0) {\r\n start = (int) 'Z' + shift + 1;\r\n } else {\r\n start = 'A' + shift;\r\n }\r\n String result = \"\";\r\n char currChar = (char) start;\r\n for (; currChar <= 'Z'; ++currChar) {\r\n result = result + currChar;\r\n }\r\n if (result.length() < 26) {\r\n for (currChar = 'A'; result.length() < 26; ++currChar) {\r\n result = result + currChar;\r\n }\r\n }\r\n return result;\r\n }", "public static char generateLetter() {\n\t\t\n\t\treturn (char)((int)('A' + Math.random() * ('Z' - 'A' + 1)));\n\t}", "Alphabet(String chars) {\n _charsString = chars;\n _chars = new char[chars.length()];\n for (int i = 0; i < _chars.length; i += 1) {\n if (alreadyAdded(chars.charAt(i))) {\n throw new EnigmaException(\"Alphabet cannot have duplicates.\");\n } else {\n _chars[i] = chars.charAt(i);\n }\n }\n }", "public static char getRandomLowerCaseLetter(){\n\t\treturn getRandomCharacter('a','z');\n\t}", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "public static String onlyAlpha(final String s) {\n\t\tfinal StringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tif (Character.isLetter(s.charAt(i))) {\n\t\t\t\tsb.append(s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "Alphabet(String chars) {\n if (chars.contains(\"(\") || chars.contains(\")\") || chars.contains(\"*\")) {\n throw error(\"Parentheses and asterisks not permitted in alphabet.\");\n }\n Map<Character, Integer> map = new HashMap<>();\n char[] string2chars = chars.toCharArray();\n for (char c : string2chars) {\n if (map.containsKey(c)) {\n throw error(\"Repeated character found: %c\", c);\n } else {\n map.put(c, 1);\n }\n }\n\n _chars = chars;\n }", "private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.append(alphaNum.charAt(num));\n }\n return sbRan.toString();\n }", "public String getCharacterSequence();", "public char[] getLettersArray() {\n\t\treturn this.letters;\n\t}", "public Set<String> getAllCharacters() {\n\t\treturn characterStates.keySet();\n\t}", "public static String getLetters(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return s;\r\n \r\n // Removes spaces and dashes\r\n StringBuffer buf = new StringBuffer();\r\n int len = s.length();\r\n for (int n = 0; n < len; n++)\r\n {\r\n char c = s.charAt(n);\r\n if (Character.isLetter(c))\r\n buf.append(c);\r\n }\r\n return buf.toString();\r\n }", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "static char[] getAutoactivationChars() {\n\n // To enable content proposal on deleting a char\n \n String delete = new String(new char[] { 8 });\n String allChars = LCL + UCL + NUMS + delete;\n return allChars.toCharArray();\n }", "public final char[] validChars() {\n\t\t\treturn VALID_ALPHABET;\n\t\t}", "@Override\n public Collection<Character> getAll() {\n return characters;\n }", "public static void main(String[] args) {\n List<Character> chars = Arrays.asList('K', 'I', 'T', 'T', 'E', 'N', '.');\n String charsAsString = chars.stream()\n .map(character -> character.toString())\n .collect(Collectors.joining());\n System.out.println(charsAsString);\n }", "public char randomChar() {\n\t\tRandom r = new Random();\n\t\tint threshold = r.nextInt(total);\n\t\tint current = 0;\n\t\t\n\t\tfor (char c : letters.keySet()) {\n\t\t\tcurrent += letters.get(c);\n\t\t\tif (current > threshold) {\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ' ';\n\t}", "public char crypt(char letter){\n\n char l = conns[alphabet.indexOf(letter)];\n\n return l;\n }", "public static String randomString() {\n\t\tint leftLimit = 97; // letter 'a'\n\t\tint rightLimit = 122; // letter 'z'\n\t\tint targetStringLength = 10;\n\t\tRandom random = new Random();\n\n\t\treturn random.ints(leftLimit, rightLimit + 1).limit(targetStringLength)\n\t\t\t\t.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append).toString();\n\t}", "private char generateRandomCharacter(){\n String alphabets = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n Random rand = new Random();\n int randomNumber = rand.nextInt(26);\n return alphabets.charAt(randomNumber);\n }", "public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String str=sc.nextLine();\n int len=str.length();\n int stat[]=new int[26];\n for(int i=0;i<len;i++)\n {\n if((str.charAt(i)>='a') && ( str.charAt(i)<='z'))\n {\n int offset=str.charAt(i) - 'a';\n stat[offset]++; \n }\n if((str.charAt(i)>='A') && ( str.charAt(i)<='Z'))\n {\n int offset=str.charAt(i) - 'A';\n stat[offset]++; \n }\n }\n for(int i=0;i<26;i++)\n {\n \n if( stat[i]==0)\n {\n char ch=(char)('a'+i);\n System.out.print(ch+\" \");\n \n \n \n }\n }\n}", "public String[] getLettersOfAllGames(){\n String[] letters = new String[9];\n int z = 0;\n for (SmallGameBoard game: getAllGames()) {\n String letter = game.getLetterOfWinner();\n letters[z] = letter;\n z++;\n }\n return letters;\n }", "public static String encode(String List) {\n String tempstr = \"\";\n for (int j = 0; j < List.length(); j++) {\n for (int k = 0; k < basealpha.length; k++) {\n if (List.charAt(j) == basealpha[k]) {\n tempstr += temps[k];\n }\n }\n }\n return tempstr;\n }", "private String shiftAlphabet(int key) {\n return ALPHABET.substring(key) + ALPHABET.substring(0, key);\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}", "public String getCharacters()\n\t{\n\t\treturn characters;\n\t}", "public String getSelectedLetters();", "private String cipher(String s)\n {\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n char[] input = s.toCharArray();\n \n int pos = 0;\n String finalString = \"\";\n for( int i = 0; i < input.length; i++ )\n {\n if((input[i] >= 'a' && input[i] <= 'z') || (input[i] >= 'A' && input[i] <= 'Z'))\n {\n for( int j = 0; j < alphabet.length; j++ )\n {\n if( alphabet[j] == input[i] )\n {\n pos = j;\n break;\n }\n }\n finalString += alphabet[(rotateValue+pos)%26];\n }\n else{ finalString += input[i]; }\n }\n return finalString;\n }", "public final void mLETTER() throws RecognitionException {\n try {\n // /Users/dannluciano/Sources/MyLanguage/expr.g:163:8: ( 'a' .. 'z' | 'A' .. 'Z' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public static void main(String[] args) {\n\n\t\tString s = \"P@$$w!rd\";\n\n\t\tString specialCharacters = s.replaceAll(\"[^@#$%^&*()!_+\\\\-=\\\\[\\\\]{};':\\\"\\\\\\\\|,.<>\\\\/? 0-9]\", \"\");\n\t\tString alphabets = s.replaceAll(\"[^a-zA-Z]\", \"\");\n\n\t\tSystem.out.println(specialCharacters);\n\t\tSystem.out.println(alphabets);\n\n\t\tint a = 0, b = alphabets.length() - 1;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\n\t\t\tif (Character.isAlphabetic(s.charAt(i))) {\n\t\t\t\tSystem.out.print(alphabets.charAt(b));\n\t\t\t\tb--;\n\t\t\t} else {\n\t\t\t\tSystem.out.print(specialCharacters.charAt(a));\n\t\t\t\ta++;\n\t\t\t}\n\n\t\t}\n\n\t}", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "public final void mLETTER() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:5: ( ( 'A' .. 'Z' | 'a' .. 'z' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:7: ( 'A' .. 'Z' | 'a' .. 'z' )\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public String encode() {\n\t\tString coded = \"\";\n\t\tfor (Character c: this.input.toCharArray()) {\n\t\t\tcoded += this.mapping.get(c);\n\t\t}\n\t\treturn coded;\n\t}", "public void printAllCharacters() {\n System.out.print(EXISTING_CHARACTERS);\n foundedCharacter.forEach(character -> System.out.printf(CHARACTER_PRINT_PATTERN, character));\n System.out.println();\n }", "public static void main(String[] args) {\n List<Character> charachterList = Arrays.asList('T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'S', 'p', 'a', 'r', 't', 'a', '!');\n String strings = charachterList.stream()\n .map(c -> c.toString())\n .collect(Collectors.joining());\n\n System.out.println(strings);\n }", "static String getAlphaNumericString(int n) \n {\n byte[] array = new byte[256]; \n new Random().nextBytes(array); \n \n String randomString \n = new String(array, Charset.forName(\"UTF-8\")); \n \n // Create a StringBuffer to store the result \n StringBuffer r = new StringBuffer(); \n \n // Append first 20 alphanumeric characters \n // from the generated random String into the result \n for (int k = 0; k < randomString.length(); k++) { \n \n char ch = randomString.charAt(k); \n \n if (((ch >= 'a' && ch <= 'z') \n || (ch >= 'A' && ch <= 'Z') \n || (ch >= '0' && ch <= '9')) \n && (n > 0)) { \n \n r.append(ch); \n n--; \n } \n } \n \n // return the resultant string \n return r.toString(); \n }", "public static void printLowerCase()\n {\n for(char i = 'a'; i <= 'z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "public static String getRandomConsonant()\n\t{\n\t\tchar randLetter = (char) getRandomBetween(97,122);\n\t\twhile (isCharVowel(randLetter))\n\t\t{\n\t\t\trandLetter = (char) getRandomBetween(97,122);\n\t\t}\n\n\t\treturn Character.toString(randLetter);\n\t}", "private String encrypt (String password){\r\n String encrypted = \"\";\r\n char temp;\r\n int ASCII;\r\n //For each letter in password.\r\n for (int i = 0; i < password.length(); i++){\r\n temp = password.charAt(i);\r\n ASCII = (int) temp;\r\n //If the letter is a character.\r\n if (ASCII >= 32 && ASCII <= 127){\r\n int x = ASCII - 32;\r\n x = (x + 6) % 96; /*Mod the characters so that it cannot go over the amount.\r\n The letters are all shifted plus 6 characters along. */\r\n encrypted += (char) (x + 32);\r\n }\r\n }\r\n return encrypted;\r\n }", "public String Alrevez() {\n String retorno = \"\";\n for (int i = getCadena().length() - 1; i >= 0; i--) {\n retorno += getCadena().charAt(i);\n }\n return retorno;\n }", "static byte[] getAlphabet( final int options ) {\n if ((options & URL_SAFE) == URL_SAFE)return URL_SAFE_ALPHABET;\n else if ((options & ORDERED) == ORDERED)return ORDERED_ALPHABET;\n return STANDARD_ALPHABET;\n }", "@Override\n public String toString() {\n return \"\" + character;\n }", "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }", "public char[] getCharacters() {\n return characters;\n }", "public char getRepresentative_letter(){\n\t\treturn representative_letter;\n\t}", "char[] toCharArray();", "public static void letterShuff() {\n ArrayList<Character> letter = new ArrayList<Character>();\n for (char i = 'a'; i <= 'z'; i++) {\n letter.add(i);\n }\n Collections.shuffle(letter);\n System.out.println(letter);\n System.out.println(letter.get(letter.size()-1));\n System.out.println(letter.get(0));\n if(letter.get(0) == 'a' || letter.get(0) == 'e' || letter.get(0) == 'i' || letter.get(0) == 'o' || letter.get(0) == 'u') {\n System.out.println(\"I'm a vowel!\");\n }\n }", "public Character[] getCharacters() {\n return chars.toArray(new Character[0]);\n }", "private char getRandomCharacter() {\n int min = 0;\n int max = ALPHABET.length-1;\n int randomPos;\n\n // Could possibly have used ASCII numbers 61-95\n randomPos = min + (int)(Math.random() * ((max - min) + 1));\n\n return ALPHABET[randomPos];\n }", "public static String toString(char ch) {\n/* 308 */ if (ch < '€') {\n/* 309 */ return CHAR_STRING_ARRAY[ch];\n/* */ }\n/* 311 */ return new String(new char[] { ch });\n/* */ }", "public char getLetter()\n {\n \treturn letter;\n }", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "static String getRandomString(int n){\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index = (int)(alphabet.length() * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(alphabet.charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }", "public List<String> letterCombinations(String digits) {\n\t \n\t recurse(digits, \"\");\n\t return ans; \n\t}", "Rule Letter() {\n // No effect on value stack\n return FirstOf(\n CharRange('a', 'z'),\n CharRange('A', 'Z'));\n }", "public static String charToString(char c) \n\t{\n\t\tswitch (c) \n\t\t{\n\t\tcase '0':\n\t\t\treturn \"36\";\n\t\tcase '1':\n\t\t\treturn \"01\";\n\t\tcase '2':\n\t\t\treturn \"02\";\n\t\tcase '3':\n\t\t\treturn \"03\";\n\t\tcase '4':\n\t\t\treturn \"04\";\n\t\tcase '5':\n\t\t\treturn \"05\";\n\t\tcase '6':\n\t\t\treturn \"06\";\n\t\tcase '7':\n\t\t\treturn \"07\";\n\t\tcase '8':\n\t\t\treturn \"08\";\n\t\tcase '9':\n\t\t\treturn \"09\";\n\t\tcase 'A':\n\t\t\treturn \"10\";\n\t\tcase 'B':\n\t\t\treturn \"11\";\n\t\tcase 'C':\n\t\t\treturn \"12\";\n\t\tcase 'D':\n\t\t\treturn \"13\";\n\t\tcase 'E':\n\t\t\treturn \"14\";\n\t\tcase 'F':\n\t\t\treturn \"15\";\n\t\tcase 'G':\n\t\t\treturn \"16\";\n\t\tcase 'H':\n\t\t\treturn \"17\";\n\t\tcase 'I':\n\t\t\treturn \"18\";\n\t\tcase 'J':\n\t\t\treturn \"19\";\n\t\tcase 'K':\n\t\t\treturn \"20\";\n\t\tcase 'L':\n\t\t\treturn \"21\";\n\t\tcase 'M':\n\t\t\treturn \"22\";\n\t\tcase 'N':\n\t\t\treturn \"23\";\n\t\tcase 'O':\n\t\t\treturn \"24\";\n\t\tcase 'P':\n\t\t\treturn \"25\";\n\t\tcase 'Q':\n\t\t\treturn \"26\";\n\t\tcase 'R':\n\t\t\treturn \"27\";\n\t\tcase 'S':\n\t\t\treturn \"28\";\n\t\tcase 'T':\n\t\t\treturn \"29\";\n\t\tcase 'U':\n\t\t\treturn \"30\";\n\t\tcase 'V':\n\t\t\treturn \"31\";\n\t\tcase 'W':\n\t\t\treturn \"32\";\n\t\tcase 'X':\n\t\t\treturn \"33\";\n\t\tcase 'Y':\n\t\t\treturn \"34\";\n\t\tcase 'Z':\n\t\t\treturn \"35\";\n\t\tcase '-':\n\t\t\treturn \"37\";\n\t\tdefault:\n\t\t\treturn \"00\";\n\t\t}\n\t}", "public char getLetter() {\r\n\t\t\treturn letter;\r\n\t\t}", "public char getLetter() {\r\n\t\treturn letter;\r\n\t}", "Set<String> getUniqueCharacterStrings();", "public static char randomLetter(){\n\t\t//char A-Z\n\t\tint r1 = (int) (Math.random()*26+65);\n\n\t\t//char a-z\n\t\tint r2 = (int) (Math.random()*26+97);\n\n\t\t//choose one of the two\n\t\tif(Math.random() < 0.5)\n\t\t\treturn (char) r1;\n\t\treturn (char) r2;\n\t}", "public static String Encrypt(String plainText,int key,String alphabet) throws IOException\n {\n plainText=plainText.toUpperCase();\n String cipherText=\"\";\n\n for(int i=0;i< plainText.length();i++)\n {\n int index=indexOfChar(plainText.charAt(i),alphabet);\n\n if(index==-1)\n {\n cipherText+=plainText.charAt(i);\n\n continue;\n }\n if((index+key)%alphabet.length()==0)\n {\n cipherText+=charAtIndex(index+key,alphabet);\n }\n else\n {\n cipherText+=charAtIndex((index+key)%alphabet.length(),alphabet);\n }\n }\n return cipherText;\n }", "public char getLetter(){\r\n\t\treturn letter;\r\n\t}", "public static char getA() {\n char aChar = 'B';\n return aChar;\n }", "public static String toString(char[] a) {\n String string = new String(a);\n return string;\n }", "public static boolean checkAllAlphabets(String input) {\n if (input.length() < 26) {\n return false;\n }\n\n //Even a single character is missing, return false\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n if (input.indexOf(ch) < 0 && input.indexOf((char) (ch + 32)) < 0) {\n return false;\n }\n }\n return true;\n }", "public void getAllWrongLetters() {\n allWrongLetters = \"\";\n //loop until reaching the last stored wrong letter (wrongLettersCount)\n for (int i = 0; i < this.wrongLettersCount; i++) {\n allWrongLetters += \" \" + inputLetters[i];\n }\n }", "private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }", "public char getLetter()\n\t{\n\t\treturn letter;\n\t}", "public char getLetter() {\n return letter;\n }", "public char[] toChars() {\n\t\tchar[] chars = new char[this.s.length()];\n\t\tfor (int i = 0; i < chars.length; i++) {\n\t\t\tchars[i] = this.s.charAt(i);\n\t\t}\n\t\treturn chars;\n\t}", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "@Override\n\tprotected String getAdjacentKeys(char key) {\n\t\tif((key >= 'a' && key <= 'z') || (key >= 'A' && key <= 'Z')) {\n\t\t\tif(Character.isLowerCase(key))\n\t\t\t\treturn adjacentKeys[key - 'a'];\n\t\t\telse\n\t\t\t\treturn adjacentKeys[Character.toLowerCase(key) - 'a'];\n\t\t}\n\t\t\n\t\treturn String.valueOf(key);\n\t}", "public static char getLetter(String s){\n //A variable used in the helper method\n int i = 0;\n return getLetter(codeTree, s, i);\n }", "public char getGradeLetter() {\n\t\t\n\t\t// get the current overall grade\n\t\tdouble overallAverage = averages[OVERALL];\n\t\t\n\t\t// check its value and return the correct letter\n\t\tif (overallAverage < 60) \n\t\t\treturn 'F';\n\t\telse if (overallAverage < 70) \n\t\t\treturn 'D';\n\t\telse if (overallAverage < 80) \n\t\t\treturn 'C';\n\t\telse if (overallAverage < 90) \n\t\t\treturn 'B';\n\t\telse\n\t\t\treturn 'A';\n\t}", "public Set<Character> getUniqueChars() {\n return uniqueChars;\n }", "public String printCharStack() {\r\n\t\t String elements = \"<\";\r\n\t\t \r\n\t\tfor(int i = 0; i < count; i++) {\r\n\t\t\telements += \" \" + (char)array[i];\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\telements += \">\";\r\n\t\t\treturn elements;\r\n\t }", "static char[] generateAZLowercaseAndSpecial(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 2);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateSpecChar();\n }\n }\n return charArray;\n }", "public static String getLettersOrDigits(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return s;\r\n \r\n // Removes spaces and dashes\r\n StringBuffer buf = new StringBuffer();\r\n int len = s.length();\r\n for (int n = 0; n < len; n++)\r\n {\r\n char c = s.charAt(n);\r\n if (Character.isLetterOrDigit(c))\r\n buf.append(c);\r\n }\r\n return buf.toString();\r\n }", "public static void main(String[] args) {\n\t\tString s=\"A\";\n\t\tint l=s.length();\n\t\tint c=0;\n\t\tfor(int i=0;i<l;i++){\n\t\t\tc=(int) (c+(s.charAt(s.length()-i-1)-'A'+1)*Math.pow(26, i));\n\t\t\tSystem.out.println(c);\n\n\t\t}\n\t\t//System.out.println(c);\n\t}", "public static String anyLenABC() {\n\t\treturn RString.ANY_LEN_ABC;\n\t}", "public static String lettersAbbreviationAt(String s, int start) {\n\t\tint end = start;\n\t\tfor (char c; (c = s.charAt(end)) >= 'A' && c <= 'Z'; end++)\n\t\t\t;\n\t\treturn s.substring(start, end);\n\t}", "private static int[] letterHist(String acharArray) {\n int[] alphabet = new int[26];\n\n for (int i = 0; i < acharArray.length(); i++) {\n char singleChar = acharArray.toLowerCase().charAt(i);\n\n if ('a' <= singleChar && 'z' >= singleChar) {\n alphabet[singleChar - 'a']++;\n }\n }\n return alphabet;\n }", "public static char getRandomUpperCaseLetter(){\n\t\treturn getRandomCharacter('A','Z');\n\t}", "public static String getAlphabeticalString(int[] inputArray, String alphabets){\n\n int inputSize = Array.getLength(inputArray);\n int alphabetsSize = alphabets.length();\n char[] letterArray = new char[inputSize];\n int[] alphabetsNumberArray = new int[alphabetsSize];\n\n for(int i = 0; i < alphabetsSize; i++){\n\n alphabetsNumberArray[i] = i;\n\n }\n\n for(int i = 0; i < inputSize; i++){\n\n for(int j = 0; j < alphabetsSize; j++){\n\n if(inputArray[i] == alphabetsNumberArray[j]){\n\n letterArray[i] = alphabets.charAt(j);\n break;\n\n }\n\n }\n\n }\n\n String letterString = new String(letterArray);\n return letterString;\n\n }", "public String toString() {return name().charAt(0) + name().substring(1).toLowerCase();}", "public void composeAlphabet() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name for this alphabet: \");\n\t\tString alphabetName = scanner.nextLine();\n\t\tSystem.out.println(\"Please enter the location of the window dumps \" + \"(relative to the current folder): \");\n\t\tString alphabetLoc = scanner.nextLine();\n\t\tscanner.close();\n\t\tcomposeAlphabet(alphabetName, alphabetLoc);\n\t}" ]
[ "0.7302944", "0.7146537", "0.7002479", "0.6976738", "0.6741483", "0.6568598", "0.6488897", "0.6451176", "0.6419109", "0.6328674", "0.6315271", "0.62947583", "0.6239199", "0.62330574", "0.6222416", "0.6213544", "0.6157321", "0.61413336", "0.61258155", "0.60790116", "0.6057446", "0.60176504", "0.60053796", "0.5984504", "0.5971435", "0.59646064", "0.5953131", "0.59388864", "0.58818823", "0.58659977", "0.5840987", "0.58291006", "0.57982403", "0.57953286", "0.5774726", "0.5773151", "0.5749408", "0.57291764", "0.57143927", "0.57135946", "0.5712064", "0.5708699", "0.5705674", "0.56826174", "0.56826174", "0.56826174", "0.5676577", "0.5668628", "0.56628656", "0.56606567", "0.5657211", "0.56561375", "0.564707", "0.5641471", "0.56404024", "0.5638947", "0.5637397", "0.563475", "0.5629824", "0.5621098", "0.5618582", "0.56059515", "0.5599165", "0.5598336", "0.5581672", "0.55733347", "0.55685306", "0.55613285", "0.55595887", "0.5556477", "0.5554183", "0.55432916", "0.5537243", "0.55363077", "0.5534677", "0.55186546", "0.55180645", "0.5513354", "0.5512066", "0.55103195", "0.55100125", "0.5505963", "0.5502165", "0.5490289", "0.5480287", "0.5464939", "0.5464083", "0.5457437", "0.54549384", "0.54481745", "0.54417956", "0.54392695", "0.5424564", "0.5413495", "0.5410609", "0.5410454", "0.54041976", "0.5401166", "0.53988564", "0.53918195", "0.5387947" ]
0.0
-1
Returns All Audio Header data
IAudio read(InputStream inputStream) throws AudioReaderException, InvalidFormatException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AudioHeader\n{\n /**\n * @return the audio file type\n */\n public abstract String getEncodingType();\n\n /**\n * @return the ByteRate of the Audio, this is the total average amount of bytes of data sampled per second\n */\n public Integer getByteRate();\n\n\n\n /**\n * @return the BitRate of the Audio, this is the amount of kilobits of data sampled per second\n */\n public String getBitRate();\n\n /**\n * @return bitRate as a number, this is the amount of kilobits of data sampled per second\n */\n public long getBitRateAsNumber();\n\n\n /**\n *\n * @return length of the audio data in bytes, exactly what this means depends on the audio format\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataLength();\n\n\n /**\n *\n * @return the location in the file where the audio samples start\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataStartPosition();\n\n\n /**\n *\n * @return the location in the file where the audio samples end\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataEndPosition();\n\n\n /**\n * @return the Sampling rate, the number of samples taken per second\n */\n public String getSampleRate();\n\n /**\n * @return he Sampling rate, the number of samples taken per second\n */\n public int getSampleRateAsNumber();\n\n /**\n * @return the format\n */\n public String getFormat();\n\n /**\n * @return the number of channels (i.e 1 = Mono, 2 = Stereo)\n */\n public String getChannels();\n\n /**\n * @return if the sampling bitRate is variable or constant\n */\n public boolean isVariableBitRate();\n\n /**\n * @return track length in seconds\n */\n public int getTrackLength();\n\n /**\n *\n * @return track length as float\n */\n public double getPreciseTrackLength();\n\n /**\n * @return the number of bits in each sample\n */\n public int getBitsPerSample();\n\n /**\n *\n * @return if the audio codec is lossless or lossy\n */\n public boolean isLossless();\n\n /**\n *\n * @return the total number of samples, this can usually be used in conjunction with the\n * sample rate to determine the track duration\n */\n public Long getNoOfSamples();\n}", "IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;", "private void readHeader() throws IOException, PlayerException {\n boolean finished = false;\n int packet = 1;\n\n while (!finished) {\n count = audioIn.read(buffer, index, BUFFER_SIZE);\n joggSyncState.wrote(count);\n\n int result = joggSyncState.pageout(joggPage);\n if (result == -1) {\n throw new HoleInDataException();\n } else if (result == 0) {\n // Read more\n } else if (result == 1) {\n if (packet == 1) {\n joggStreamState.init(joggPage.serialno());\n joggStreamState.reset();\n\n jorbisInfo.init();\n jorbisComment.init();\n }\n\n if (joggStreamState.pagein(joggPage) == -1)\n throw new PlayerException();\n\n if (joggStreamState.packetout(joggPacket) == -1)\n throw new HoleInDataException();\n\n if (jorbisInfo.synthesis_headerin(jorbisComment, joggPacket) < 0)\n throw new NotVorbisException();\n\n if (packet == 3) finished = true;\n else packet++;\n }\n\n index = joggSyncState.buffer(BUFFER_SIZE);\n buffer = joggSyncState.data;\n\n if (count == 0 && !finished)\n throw new PlayerException();\n }\n }", "public static byte[] createWavHeader(int dataSize, int samplingRate, int numChannels, int bytesPerSampleSlice) {\n byte header[] = {\n // [\"RIFF\" ] [total_len - 8 ]\n 0x52, 0x49, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00,\n\n // [\"WAVE\" ] [\"fmt \" ]\n 0x57, 0x41, 0x56, 0x45, 0x66, 0x6d, 0x74, 0x20,\n\n // [fmt len ] [Codec ] [# Chan ]\n 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,\n\n // [sampling rate ] [Avg. Bytes / Second ]\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\n // [B / smpl] [b / smpl] [\"data\" ]\n 0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61,\n\n // [data_len ]\n 0x00, 0x00, 0x00, 0x00\n };\n\n if (dataSize < 0) {\n throw new IllegalArgumentException(\"invalid file size : \" + dataSize);\n }\n if (samplingRate <= 0) {\n throw new IllegalArgumentException(\"invalid sampling rate : \" + samplingRate);\n }\n if (numChannels <= 0) {\n throw new IllegalArgumentException(\"invalid num Channels : \" + numChannels);\n }\n if (bytesPerSampleSlice <= 0) {\n throw new IllegalArgumentException(\"invalid bytes per sample slice : \" + bytesPerSampleSlice);\n }\n\n // dataSize must be a multiple of bytesPerSampleSlice\n // and bytesPerSampleSlice must be a multiple of numChannels.\n if (dataSize % bytesPerSampleSlice != 0) {\n throw new IllegalArgumentException(\"dataSize must be a multiple of bytesPerSampleSlice\");\n }\n if (bytesPerSampleSlice % numChannels != 0) {\n throw new IllegalArgumentException(\"bytesPerSampleSlice must be a multiple of numChannels\");\n }\n\n // Need byte of padding if data size not multiple of 2\n // (Can only happen if numChannels=1 and bytesPerSampleSlice=1)\n int padding = 0;\n if (dataSize % 2 != 0) {\n // 1 byte of padding\n padding = 1;\n }\n\n // Total length of file less first 8 bytes\n int riff_len = dataSize + padding + HEADER_SIZE - 8;\n\n // Total length of audio data; padding not included here.\n int data_len = dataSize;\n\n int riff_len_ptr = 4;\n int num_channels_ptr = 22;\n int sampling_rate_ptr = 24;\n int avg_bytes_per_second_ptr = 28;\n int bytes_per_sample_ptr = 32;\n int sig_bits_per_sample_ptr = 34;\n int data_len_ptr = 40;\n\n header[riff_len_ptr + 0] = (byte) ((riff_len) & 0xFF);\n header[riff_len_ptr + 1] = (byte) ((riff_len >> 8) & 0xFF);\n header[riff_len_ptr + 2] = (byte) ((riff_len >> 16) & 0xFF);\n header[riff_len_ptr + 3] = (byte) ((riff_len >> 24) & 0xFF);\n\n header[data_len_ptr + 0] = (byte) ((data_len) & 0xFF);\n header[data_len_ptr + 1] = (byte) ((data_len >> 8) & 0xFF);\n header[data_len_ptr + 2] = (byte) ((data_len >> 16) & 0xFF);\n header[data_len_ptr + 3] = (byte) ((data_len >> 24) & 0xFF);\n\n header[num_channels_ptr + 0] = (byte) ((numChannels) & 0xFF);\n header[num_channels_ptr + 1] = (byte) ((numChannels >> 8) & 0xFF);\n\n header[sampling_rate_ptr + 0] = (byte) ((samplingRate) & 0xFF);\n header[sampling_rate_ptr + 1] = (byte) ((samplingRate >> 8) & 0xFF);\n header[sampling_rate_ptr + 2] = (byte) ((samplingRate >> 16) & 0xFF);\n header[sampling_rate_ptr + 3] = (byte) ((samplingRate >> 24) & 0xFF);\n\n int abps = samplingRate * bytesPerSampleSlice;\n header[avg_bytes_per_second_ptr + 0] = (byte) ((abps) & 0xFF);\n header[avg_bytes_per_second_ptr + 1] = (byte) ((abps >> 8) & 0xFF);\n header[avg_bytes_per_second_ptr + 2] = (byte) ((abps >> 16) & 0xFF);\n header[avg_bytes_per_second_ptr + 3] = (byte) ((abps >> 24) & 0xFF);\n\n header[bytes_per_sample_ptr + 0] = (byte) ((bytesPerSampleSlice) & 0xFF);\n header[bytes_per_sample_ptr + 1] = (byte) ((bytesPerSampleSlice >> 8) & 0xFF);\n\n int sig_bits_per_sample = 8 * bytesPerSampleSlice / numChannels;\n header[sig_bits_per_sample_ptr + 0] = (byte) ((sig_bits_per_sample) & 0xFF);\n header[sig_bits_per_sample_ptr + 1] = (byte) ((sig_bits_per_sample >> 8) & 0xFF);\n\n return header;\n }", "public WaveData read() throws IOException {\n\t\tint res = inputStream.read(buf);\n\t\tif (res != headerSize) {\n\t\t\tthrow new IOException(\"Header reading failed\");\n\t\t}\n\t\theader.setChunkID(Arrays.copyOfRange(buf, 0, 4));\n\t\tif (new String(header.getChunkID()).compareTo(\"RIFF\") != 0) {\n\t\t\tthrow new IOException(\"Format failed\");\n\t\t}\n\n\t\theader.setChunkSize(toInt(4, false));\n\t\theader.setFormat(Arrays.copyOfRange(buf, 8, 12));\n\t\theader.setSubChunk1ID(Arrays.copyOfRange(buf, 12, 16));\n\t\theader.setSubChunk1Size(toInt(16, false));\n\t\theader.setAudioFormat(toShort(20, false));\n\t\theader.setNumChannels(toShort(22, false));\n\t\theader.setSampleRate(toInt(24, false));\n\t\theader.setByteRate(toInt(28, false));\n\t\theader.setBlockAlign(toShort(32, false));\n\t\theader.setBitsPerSample(toShort(34, false));\n\t\theader.setSubChunk2ID(Arrays.copyOfRange(buf, 36, 40));\n\t\theader.setSubChunk2Size(toInt(40, false));\n\t\treturn header;\n\t}", "public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}", "public AudioDescriptor getAudioDescriptor();", "public PayloadType[] getAudioPayloadTypes();", "public byte[] getHeader() {\n\treturn header;\n }", "public void getCallList(){\n audioList = new ArrayList<>();\n\n // Audio directory path\n String path = Environment.getExternalStorageDirectory().toString().toLowerCase()+\"/\"+AllKeys.RECORD_DIRECTORY_NAME;\n File mainFolder = new File(path);\n\n // Checking is the main folder exist or not\n if (mainFolder.isDirectory()){\n\n // All sub folder under the main directory\n File[] listOfFolders = mainFolder.listFiles();\n if (listOfFolders != null) {\n for (File item : listOfFolders) {\n\n // When file type is directory\n if (item.isDirectory()) {\n\n File subFolder = new File(path + \"/\" + item.getName());\n File[] fileList = subFolder.listFiles();\n\n for (File audio : fileList) {\n\n // When file is not a audio file -> continue for next file\n if (audio.getName().equals(\".nomedia\")) continue;\n\n // Analise file name\n FileAnalyser analyser = new FileAnalyser(audio.getName());\n\n // Add a item to audio list\n audioList.add(new Audio(analyser.getPhoneNo(),\n audio.getAbsolutePath(),\n analyser.getDateTime(item.getName()),\n analyser.getCallType(),\n analyser.getAudioDuration(this,\n audio.length(),\n audio.getAbsolutePath()))\n );\n }\n\n }\n }\n // sort array as descending order\n Collections.reverse(audioList);\n }\n\n }\n\n // Visible empty message when audio list is empty\n if (audioList.size() < 1){\n noRecordFound.setVisibility(View.VISIBLE);\n }else{\n noRecordFound.setVisibility(View.GONE);\n }\n }", "public String getAudioEncoding() {\n return audioEncoding;\n }", "private void parseHeader() throws IOException {\n\n\t\t// ////////////////////////////////////////////////////////////\n\t\t// Administrative header info\n\t\t// ////////////////////////////////////////////////////////////\n\n\t\t// First 10 bytes reserved for preamble\n\t\tbyte[] sixBytes = new byte[6];\n\t\tkeyBuffer.get(sixBytes, 0, 6);\n\t\tlogger.log(new String(sixBytes) + \"\\n\"); // says adac01\n\n\t\ttry {\n\n\t\t\tshort labels = keyBuffer.getShort();\n\t\t\tlogger.log(Integer.toString(labels)); // Number of labels in header\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Number of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sub-headers\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Unused byte\n\n\t\t\t// For each header field available.. get them\n\t\t\tfor (short i = 0; i < labels; i++) {\n\n\t\t\t\t// Attempt to find the next key...\n\t\t\t\t// ...the keynum (description)\n\t\t\t\t// ...the offset to the value\n\t\t\t\tADACKey key = getKeys();\n\t\t\t\tswitch (key.getDataType()) {\n\n\t\t\t\tcase ADACDictionary.BYTE:\n\n\t\t\t\t\tkeyList.add(new ByteKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.SHORT:\n\n\t\t\t\t\tkeyList.add(new ShortKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.INT:\n\n\t\t\t\t\tkeyList.add(new IntKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.FLOAT:\n\n\t\t\t\t\tkeyList.add(new FloatKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.EXTRAS:\n\n\t\t\t\t\tkeyList.add(new ExtrasKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"ADAC Decoder\", \"Failed to retrieve ADAC image file header. \" + \"Is this an ADAC image file?\");\n\t\t}\n\t}", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "protected void parseFlvSequenceHeader(byte[] data) throws UnsupportedOperationException, IOException {\n // Sound format: first 4 bits\n final int soundFormatInt = (data[0] >>> 4) & 0x0f;\n try {\n audioFormat = AudioFormat.valueOf(soundFormatInt);\n } catch (IllegalArgumentException ex) {\n throw new UnsupportedOperationException(\"Sound format not supported: \" + soundFormatInt);\n }\n switch (audioFormat) {\n case AAC:\n delegateWriter = new AacWriter(out);\n break;\n case MP3:\n delegateWriter = new Mp3Writer(out);\n break;\n default:\n throw new UnsupportedOperationException(\"Sound format not supported: \" + audioFormat);\n }\n }", "List<? extends Header> getAllHeaders();", "@Test\n public void voicesAndvarMeterHeaderTest(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invention.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getMeter(),\"4/4\");// this will test for M:C\n ArrayList<String> voice = new ArrayList<String>();\n voice.add(\"V:1\");\n voice.add(\"V:2\");\n assertEquals(h.getVoice(),voice);\n }", "public byte[] createHeader(int bytesLength) {\n\n int totalLength = bytesLength + 4 + 24 + 8;\n byte[] lengthData = intToBytes(totalLength);\n byte[] samplesLength = intToBytes(bytesLength);\n byte[] sampleRateBytes = intToBytes(this.sampleRate);\n byte[] bytesPerSecond = intToBytes(this.sampleRate * 2);\n\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n\n try {\n out.write(new byte[] {'R', 'I', 'F', 'F'});\n out.write(lengthData);\n out.write(new byte[] {'W', 'A', 'V', 'E'});\n\n out.write(new byte[] {'f', 'm', 't', ' '});\n out.write(new byte[] {0x10, 0x00, 0x00, 0x00}); // 16 bit chunks\n out.write(new byte[] {0x01, 0x00, 0x01, 0x00}); // mono\n out.write(sampleRateBytes); // sampling rate\n out.write(bytesPerSecond); // bytes per second\n out.write(new byte[] {0x02, 0x00, 0x10, 0x00}); // 2 bytes per sample\n out.write(new byte[] {'d', 'a', 't', 'a'});\n out.write(samplesLength);\n } catch (IOException e) {\n Log.e(\"Create WAV\", e.getMessage());\n }\n\n return out.toByteArray();\n }", "protected void loadMockData() {\n\n int ctr;\n InputStream inputStream = getResources().openRawResource(R.raw.song_list);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n\n try {\n ctr = inputStream.read();\n while (ctr != -1) {\n byteArrayOutputStream.write(ctr);\n ctr = inputStream.read();\n }\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Parse the data.\n try {\n JSONObject jObject = new JSONObject(byteArrayOutputStream.toString());\n\n String status_code = jObject.getString(\"statusCode\");\n\n if (status_code.equalsIgnoreCase(\"200\")) {\n JSONArray jArray = jObject.getJSONArray(\"data\");\n\n audioList = new ArrayList<>();\n\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject song = jArray.getJSONObject(i);\n\n String genre = song.getString(\"genre\");\n String album = song.getString(\"album\");\n String author = song.getString(\"author\");\n String title = song.getString(\"title\");\n String url = song.getString(\"url\");\n String imgUrl = song.getString(\"img\");\n\n Audio audio = new Audio(genre, album, author, title, url, imgUrl);\n\n // Save to audioList.\n audioList.add(audio);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public abstract Iterator getAllMimeHeaders();", "private static byte[] createHeader() {\n Random r = new Random();\n\n byte[] output = new byte[12];\n\n // Create random message id\n short messageID = (short) r.nextInt(Short.MAX_VALUE + 1);\n\n // Create a buffer we can construct the header in.\n ByteBuffer buf = ByteBuffer.wrap(output);\n\n // Place the message into the buffer.\n buf.putShort(messageID);\n\n // Sets QR, OPCODE, AA, TC, RD, RA, and RCODE\n buf.put((byte)0x01);\n buf.put((byte)0x20);\n\n // QDCOUNT, we're making one request.\n buf.putShort((short) 1);\n\n // Rest are 0\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n\n return output;\n }", "public String getAudioCode() {\n return audioCode;\n }", "private void write_adts_header(byte[] frame, int offset) {\n frame[offset] = (byte) 0xff;\n frame[offset + 1] = (byte) 0xf0;\n // versioin 0 for MPEG-4, 1 for MPEG-2 (1-bit)\n frame[offset + 1] |= 0 << 3;\n // layer 0 (2-bit)\n frame[offset + 1] |= 0 << 1;\n // protection absent: 1 (1-bit)\n frame[offset + 1] |= 1;\n // profile: audio_object_type - 1 (2-bit)\n frame[offset + 2] = (SrsAacObjectType.AacLC - 1) << 6;\n // sampling frequency index: 4 (4-bit)\n frame[offset + 2] |= (4 & 0xf) << 2;\n // channel configuration (3-bit)\n frame[offset + 2] |= (2 & (byte) 0x4) >> 2;\n frame[offset + 3] = (byte) ((2 & (byte) 0x03) << 6);\n // original: 0 (1-bit)\n frame[offset + 3] |= 0 << 5;\n // home: 0 (1-bit)\n frame[offset + 3] |= 0 << 4;\n // copyright id bit: 0 (1-bit)\n frame[offset + 3] |= 0 << 3;\n // copyright id start: 0 (1-bit)\n frame[offset + 3] |= 0 << 2;\n // frame size (13-bit)\n frame[offset + 3] |= ((frame.length - 2) & 0x1800) >> 11;\n frame[offset + 4] = (byte) (((frame.length - 2) & 0x7f8) >> 3);\n frame[offset + 5] = (byte) (((frame.length - 2) & 0x7) << 5);\n // buffer fullness (0x7ff for variable bitrate)\n frame[offset + 5] |= (byte) 0x1f;\n frame[offset + 6] = (byte) 0xfc;\n // number of data block (nb - 1)\n frame[offset + 6] |= 0x0;\n }", "public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }", "public interface Audio {\r\n\r\n\t//******************************GETS*****************************\r\n//\tpublic FileOutputStream getAudioByBitRate(String bitrate);\r\n\t/**\r\n\t * If the file was uploaded in a rate of 128 kbits/s then streaming at 320 kbits/s provides no benefits.\r\n\t * This method allows the client to check what bitrates exist and choose the adequate one.\t\r\n\t * @return String with all the BitRates accessible.\r\n\t */\r\n\tpublic ArrayList<Integer> getAccessibleBitRates();\r\n\t/**\r\n\t * Returns a Stream with the Audio in the default BitRate.\r\n\t * @return Audio stream.\r\n\t */\r\n//\tpublic FileOutputStream getAudio();\r\n\t/**\r\n\t * Evaluates if the Bitrate \"bitrate\" is allowed for audio and returns a Stream if it is.\r\n\t * @param bitrate \r\n\t * @return FileOutputStream\r\n\t */\r\n//\tpublic FileOutputStream getAudioByBitRate(int bitrate);\r\n\tpublic String getDir();\r\n\tpublic String getFileName();\r\n\t//******************************ACTIONS*****************************\r\n\t/**\r\n\t * Sets the bitRate for the value that comes as parameter.\r\n\t * @return\r\n\t */\r\n\tpublic boolean setDefaultBitRate(String bitrate);\r\n\t/**\r\n\t * Converts the Audio to the default system type, mp3. \r\n\t * @return The type of the file. If it failed returns a null String.\r\n\t */\r\n\tpublic boolean convertAudioTypeToDefault();\r\n\tboolean convertAudioTypeToDefault(String dir, long size,\r\n\t\t\tint defaultBitRate, String type);\r\n\tpublic boolean setAudioType(String type);\r\n\tpublic void setMaxBitRate(String bitRate);\r\n\tpublic Response download(String appId, String audioId, String dir);\r\n\tpublic void setDir(String dir);\r\n\tpublic void setSize(long size);\r\n\tpublic void setCreationDate(String creationDate);\r\n\tpublic void setFileName(String fileName);\r\n\tpublic void setLocation(String location);\r\n}", "public com.google.protobuf.ByteString getAudioIn() {\n if (converseRequestCase_ == 2) {\n return (com.google.protobuf.ByteString) converseRequest_;\n }\n return com.google.protobuf.ByteString.EMPTY;\n }", "public String[] getSoundDevicesList();", "public DataSource getAudioSource();", "public com.google.protobuf.ByteString getAudioIn() {\n if (converseRequestCase_ == 2) {\n return (com.google.protobuf.ByteString) converseRequest_;\n }\n return com.google.protobuf.ByteString.EMPTY;\n }", "public AudioBuffer getAudioBuffer() {\n\t\treturn buffer;\n\t}", "public byte[] getLsAckAsByteArray() {\n List<Byte> headerLst = new ArrayList<>();\n try {\n headerLst.add((byte) this.ospfVersion());\n headerLst.add((byte) this.ospfType());\n headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.ospfPacLength())));\n headerLst.addAll(Bytes.asList(this.routerId().toOctets()));\n headerLst.addAll(Bytes.asList(this.areaId().toOctets()));\n headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.checksum())));\n headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.authType())));\n //Authentication is 0 always. Total 8 bytes consist of zero\n byte[] auth = new byte[OspfUtil.EIGHT_BYTES];\n headerLst.addAll(Bytes.asList(auth));\n } catch (Exception e) {\n log.debug(\"Error::LsAckPacket:: {}\", e.getMessage());\n return Bytes.toArray(headerLst);\n }\n\n return Bytes.toArray(headerLst);\n }", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }", "public List<Header> getHeaderList() {\n return mHeaderList;\n }", "private DefaultListModel<String> loadCapturedHeaders(){\r\n\t\tif(FileData.getFileModel(FileType.CAPTURED) != null) {\r\n\t\t\tfor(String header : FileData.getFileModel(FileType.CAPTURED).getFileContents().getHeaderNames()) {\r\n\t\t\t\tthis.capturedHeaderModel.addElement(header);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tthis.capturedHeaderModel.clear();\r\n\t\t}\r\n\t\treturn this.capturedHeaderModel;\r\n\t}", "public int getLength() { \r\n return audioLength; \r\n }", "public abstract String[] getMimeHeader(String name);", "public byte[] getBuffer() {\r\n return this.header;\r\n }", "public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}", "String[] getHeader(String key);", "private AudioFormat getAudioFormat() {\n float sampleRate = 16000.0F;\n int sampleSizeInBits = 16;\n int channels = 1;\n boolean signed = true;\n boolean bigEndian = false;\n return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);\n }", "public String[] getHeader(String name) throws MessagingException {\n/* 363 */ if (this.headers == null)\n/* 364 */ loadHeaders(); \n/* 365 */ return this.headers.getHeader(name);\n/* */ }", "int[] getHeader(DataInputStream dataInputStream) throws IOException {\n dataInputStream.readShort();\t//Reads ID\r\n dataInputStream.readShort();\t//Reads flags\r\n dataInputStream.readShort();\t//Reads Questions\r\n short answers = dataInputStream.readShort();\r\n short authoritative = dataInputStream.readShort();\r\n short additional = dataInputStream.readShort();\r\n\r\n String hostName = getHostByName(dataInputStream);\r\n dataInputStream.readInt();\r\n\r\n int[] output = new int[3];\r\n output[0] = (int)answers;\r\n output[1] = (int)authoritative;\r\n output[2] = (int)additional;\r\n return output;\r\n }", "public void writeHeader() throws IOException, FileNotFoundException {\n\n EndianCorrectOutputStream ecs;\n ByteArrayOutputStream baos;\n FileOutputStream fos;\n short s, ss[];\n byte b, bb[], ext_blob[];\n int hsize;\n int i, n;\n int extlist[][];\n\n\n // header is 348 except nii and anz/hdr w/ extensions is 352\n hsize = Nifti1.ANZ_HDR_SIZE;\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n hsize += 4;\n }\n\n try {\n\n baos = new ByteArrayOutputStream(hsize);\n fos = new FileOutputStream(header.getDs_hdrname());\n\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n\n\n ecs.writeIntCorrect(header.getSizeof_hdr());\n\n if (header.getData_type_string().length() >= 10) {\n ecs.writeBytes(header.getData_type_string().substring(0, 10));\n } else {\n ecs.writeBytes(header.getData_type_string().toString());\n for (i = 0; i < (10 - header.getData_type_string().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n if (header.getDb_name().length() >= 18) {\n ecs.writeBytes(header.getDb_name().substring(0, 18));\n } else {\n ecs.writeBytes(header.getDb_name().toString());\n for (i = 0; i < (18 - header.getDb_name().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n ecs.writeIntCorrect(header.getExtents());\n\n ecs.writeShortCorrect(header.getSession_error());\n\n ecs.writeByte((int) header.getRegular().charAt(0));\n\n b = packDimInfo(header.getFreq_dim(), header.getPhase_dim(), header.getSlice_dim());\n ecs.writeByte((int) b);\n\n for (i = 0; i < 8; i++) {\n ecs.writeShortCorrect(header.getDim()[i]);\n }\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getIntent()[i]);\n }\n\n ecs.writeShortCorrect(header.getIntent_code());\n\n ecs.writeShortCorrect(header.getDatatype());\n\n ecs.writeShortCorrect(header.getBitpix());\n\n ecs.writeShortCorrect(header.getSlice_start());\n\n for (i = 0; i < 8; i++) {\n ecs.writeFloatCorrect(header.getPixdim()[i]);\n }\n\n\n ecs.writeFloatCorrect(header.getVox_offset());\n\n ecs.writeFloatCorrect(header.getScl_slope());\n ecs.writeFloatCorrect(header.getScl_inter());\n\n ecs.writeShortCorrect(header.getSlice_end());\n\n ecs.writeByte((int) header.getSlice_code());\n\n ecs.writeByte((int) packUnits(header.getXyz_unit_code(), header.getT_unit_code()));\n\n\n ecs.writeFloatCorrect(header.getCal_max());\n ecs.writeFloatCorrect(header.getCal_min());\n\n ecs.writeFloatCorrect(header.getSlice_duration());\n\n ecs.writeFloatCorrect(header.getToffset());\n\n ecs.writeIntCorrect(header.getGlmax());\n ecs.writeIntCorrect(header.getGlmin());\n\n ecs.write(setStringSize(header.getDescrip(), 80), 0, 80);\n ecs.write(setStringSize(header.getAux_file(), 24), 0, 24);\n\n\n ecs.writeShortCorrect(header.getQform_code());\n ecs.writeShortCorrect(header.getSform_code());\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQuatern()[i]);\n }\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQoffset()[i]);\n }\n\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_x()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_y()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_z()[i]);\n }\n\n\n ecs.write(setStringSize(header.getIntent_name(), 16), 0, 16);\n ecs.write(setStringSize(header.getMagic(), 4), 0, 4);\n\n\n // nii or anz/hdr w/ ext. gets 4 more\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n for (i = 0; i < 4; i++) {\n ecs.writeByte((int) header.getExtension()[i]);\n }\n }\n\n /** write the header blob to disk */\n baos.writeTo(fos);\n\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n\n /** write the extension blobs **/\n try {\n\n ////// extensions\n if (header.getExtension()[0] != 0) {\n\n baos = new ByteArrayOutputStream(Nifti1.EXT_KEY_SIZE);\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n extlist = header.getExtensionsList();\n n = extlist.length;\n for (i = 0; i < n; i++) {\n // write size, code\n ecs.writeIntCorrect(extlist[i][0]);\n ecs.writeIntCorrect(extlist[i][1]);\n baos.writeTo(fos);\n baos.reset();\n\n // write data blob\n ext_blob = (byte[]) header.getExtension_blobs().get(i);\n fos.write(ext_blob, 0, extlist[i][0] - Nifti1.EXT_KEY_SIZE);\n }\n }\n\n fos.close();\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header extensions for file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n }", "@Override\r\n\tpublic List<EchoSound> getEchoSoundAll() {\n\t\treturn echoSoundMapper.getEchoSoundAll();\r\n\t}", "protected abstract AudioFormat getAudioFormat();", "public synchronized VideoData popAudioData() {\r\n if (needBuffering || !hasAudio) //only has video ?\r\n return null;\r\n if (m_audioframePool.size() == 0) {\r\n Log.d(tag, \"audio size = 0,need buffer\");\r\n needBuffering = true;\r\n }\r\n return m_audioframePool.poll();\r\n }", "private void initAudioFormat() {\n\t\tfloat rate = 44100.0f;\n\t\t//float rate = 8000.0f;\n\t\t//int sampleSize = 8;\n\t\tint sampleSize = 16;\n\t\tint channels = 1;\n\t\tboolean bigEndian = true;\n\n\t\taudioFormat = new AudioFormat(rate, sampleSize, channels, bigEndian, bigEndian);\n\t\t// audioFormat = new AudioFormat(encoding, rate, sampleSize, channels, (sampleSize / 8)\n\t\t// * channels, rate, bigEndian);\n\n\t}", "public Enumeration getAllHeaders() throws MessagingException {\n/* 451 */ if (this.headers == null)\n/* 452 */ loadHeaders(); \n/* 453 */ return this.headers.getAllHeaders();\n/* */ }", "public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}", "public AudioFormat getClientAudioFormat() {\n\t\t\n\t\treturn clientAudioFormat;\n\t\n\t}", "public void pushData() {\n\t\t\tFile file = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t\t.getAbsolutePath()\n\t\t\t\t\t+ \"/reverseme.pcm\");\n\t\t\t// Get the length of the audio stored in the file (16 bit so 2 bytes\n\t\t\t// per short)\n\t\t\t// and create a short array to store the recorded audio.\n\t\t\tint audioLength = (int) (file.length() / 2);\n\t\t\taudio = new short[audioLength];\n\n\t\t\ttry {\n\t\t\t\t// Create a DataInputStream to read the audio data back from the\n\t\t\t\t// saved file.\n\t\t\t\tInputStream is = new FileInputStream(file);\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\n\t\t\t\tDataInputStream dis = new DataInputStream(bis);\n\n\t\t\t\t// Read the file into the music array.\n\t\t\t\tint i = 0;\n\t\t\t\twhile (dis.available() > 0) {\n\t\t\t\t\taudio[i] = dis.readShort();\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\t// Close the input streams.\n\t\t\t\tdis.close();\n\n\t\t\t} catch (Throwable t) {\n\t\t\t\tLog.e(\"AudioTrack\", \"Playback Failed\");\n\t\t\t}\n\t\t}", "private AudioFormat getAudioFormat(String s)\n\t{\n float sampleRate = 16000.0F;\n int sampleSizeBits = 16;\n int channels = 1;\n boolean signed = true;\n boolean bigEndian = false;\n\n \n \n //examples:\n //swimwater1.wav: PCM_SIGNED 22050.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian\n //test.wav: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian\n \n //store different aspects in differents strings\n String lastValue=\"\";\n String sampleRateString=\"\";\n String sampleSizeBitsString=\"\";\n String channelsString=\"\";\n String signedString=\"\";\n String bigEndianString=\"\";\n \n for (char ch : s.toCharArray())\n {\n //System.out.print(ch);\n \n if(ch!=',')//komma= nächste wert\n {\n \tif(ch!=' ')\n \t\tlastValue+=ch;\n }\n else\n {\n \tif(sampleRateString.isEmpty()) sampleRateString=lastValue;\n \telse if(sampleSizeBitsString.isEmpty()) sampleSizeBitsString=lastValue;\n \telse if(channelsString.isEmpty()) channelsString=lastValue;\n \telse if(signedString.isEmpty()) signedString=lastValue;\n \t\n \tlastValue=\"\";\n }\n }\n if(bigEndianString.isEmpty()) bigEndianString=lastValue;\n\n //interpret those strings\n\n //sampleRate\n String temp=\"\";\n for (char ch : sampleRateString.toCharArray())\n {\n if((ch>='0' && ch<='9'))\n {\n \ttemp+=ch;\n }\n else if(ch=='.')\n \tbreak;\n }\n sampleRate=(float)Integer.parseInt(temp);\n\n //sampleSizeBits\n temp=\"\";\n for (char ch : sampleSizeBitsString.toCharArray())\n {\n if(ch>='0' && ch<='9')\n {\n \ttemp+=ch;\n }\n }\n sampleSizeBits=Integer.parseInt(temp);\n\n //channels\n if(channelsString.contains(\"mono\"))\n \tchannels=1;\n else if(channelsString.contains(\"stereo\"))\n \tchannels=2;\n \n //signed\n signed=true;\n \n //bigEndian\n if(bigEndianString.contains(\"little-endian\"))\n \tbigEndian=false;\n else bigEndian=true;\n \n \n /*System.out.println();\n System.out.println(sampleRate);\n System.out.println(sampleSizeBits);\n System.out.println(channels);\n System.out.println(signed);\n System.out.println(bigEndian);*/\n \n return new AudioFormat(sampleRate, sampleSizeBits, channels, signed, bigEndian);\n }", "public Audio getAudioFeatures(String uri, final VolleyCallBack callBack) {\n if (uri.equals(\"\") || !uri.contains(\":\"))\n throw new IllegalArgumentException(\"Invalid URI in AudioService\");\n\n int idStartIndex = uri.lastIndexOf(\":\")+1;\n\n String id = uri.substring(idStartIndex);\n\n String endpoint = \"https://api.spotify.com/v1/audio-features/\" + id;\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest\n (Request.Method.GET, endpoint, null, response -> {\n Gson gson = new Gson();\n audio = gson.fromJson(response.toString(), Audio.class); // Put our json info into an Audio class object\n callBack.onSuccess(); // use our volley callback\n }, error -> {\n // TODO: Handle error\n\n }) {\n\n // Add our authorization token to the jsonObjectRequst\n\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n String token = sharedPreferences.getString(\"token\", \"\");\n String auth = \"Bearer \" + token;\n headers.put(\"Authorization\", auth);\n return headers;\n }\n };\n queue.add(jsonObjectRequest);\n return audio;\n }", "List<Header> headers();", "ImmutableList<SchemaOrgType> getAudioList();", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public HashMap<String, String> getHeaderList() {\n return headerList;\n }", "com.didiyun.base.v1.Header getHeader();", "public String getPlayerListHeader ( ) {\n\t\treturn extract ( handle -> handle.getPlayerListHeader ( ) );\n\t}", "public String[] getHeaders(){\n String[] headers={\"Owner Unit ID\",\"Origin Geoloc\",\"Origin Name\",\"Number of Assets\",};\n return headers;\n }", "public Map<String, String> readHeader() {\r\n\t\tMap<String, String> headers = null;\r\n\t\tif (advanceToTag(\"Document\")) {\r\n\t\t\tif (advanceToTag(\"Header\")) {\r\n\t\t\t\theaders = this.in.readPropertyBlock();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headers;\r\n\t}", "public String[] composeHeader() {\n\t\treturn null;\n\t}", "public String[] getHeaders()\n\t{\n\t\tString[] lines = this.header.split(\"\\\\r\\\\n\");\n\t\treturn lines;\n\t}", "protected byte[] readRecordData(RecordHeader header) throws IOException {\n byte[] buf = new byte[header.dataCount];\n file.seek(header.dataPointer);\n file.readFully(buf);\n return buf;\n }", "private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}", "com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();", "public byte[] getLsAckBodyAsByteArray() {\n List<Byte> bodyLst = new ArrayList<>();\n\n try {\n for (LsaHeader lsaHeader : linkStateHeaders) {\n if (lsaHeader.lsType() == OspfParameters.LINK_LOCAL_OPAQUE_LSA ||\n lsaHeader.lsType() == OspfParameters.AREA_LOCAL_OPAQUE_LSA ||\n lsaHeader.lsType() == OspfParameters.AS_OPAQUE_LSA) {\n OpaqueLsaHeader header = (OpaqueLsaHeader) lsaHeader;\n bodyLst.addAll(Bytes.asList(header.getOpaqueLsaHeaderAsByteArray()));\n } else {\n bodyLst.addAll(Bytes.asList(lsaHeader.getLsaHeaderAsByteArray()));\n }\n }\n } catch (Exception e) {\n log.debug(\"Error::getLsAckBodyAsByteArray {}\", e.getMessage());\n return Bytes.toArray(bodyLst);\n }\n\n return Bytes.toArray(bodyLst);\n }", "public static ArrayList<String> get_headers(String filename) {\n ArrayList<String> headers = new ArrayList();\n\n try {\n\n FileInputStream fstream = new FileInputStream(filename);\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String strLine;\n while ((strLine = br.readLine()) != null) {\n String[] str = strLine.split(\"\\t\");\n for (int i = 0; i < str.length; i++) {\n String string = str[i];\n headers.add(string);\n }\n\n break;\n\n }\n //Close the input stream\n in.close();\n } catch (Exception e) {//Catch exception if any\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Error interface reading file\");\n }\n\n\n\n return headers;\n }", "public String getHeaderNames(){return header.namesText;}", "private String soundConversion() {\n int reading = (record[18] & 255) + ((record[21] & 0x0C) << 6);\n return (reading * 100) / 1024 + \"\";\n }", "@Test\n public void serverReadsHeadersDataHeaders() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// DATA\n\n peer.acceptFrame();// HEADERS\n\n peer.sendFrame().headers(true, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.acceptFrame();// PING\n\n peer.sendFrame().ping(true, 1, 0);// PING\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n BufferedSink out = Okio.buffer(stream.getSink());\n out.writeUtf8(\"c3po\");\n out.close();\n stream.writeHeaders(TestUtil.headerEntries(\"e\", \"elephant\"), false, false);\n connection.writePingAndAwaitPong();\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n Assert.assertFalse(synStream.outFinished);\n Assert.assertEquals(3, synStream.streamId);\n Assert.assertEquals((-1), synStream.associatedStreamId);\n Assert.assertEquals(TestUtil.headerEntries(\"b\", \"banana\"), synStream.headerBlock);\n MockHttp2Peer.InFrame requestData = peer.takeFrame();\n Assert.assertArrayEquals(\"c3po\".getBytes(StandardCharsets.UTF_8), requestData.data);\n MockHttp2Peer.InFrame nextFrame = peer.takeFrame();\n Assert.assertEquals(TestUtil.headerEntries(\"e\", \"elephant\"), nextFrame.headerBlock);\n }", "public List<VCFFilterHeaderLine> headerLines();", "public String getFileHeaderInfo() {\n return this.fileHeaderInfo;\n }", "public interface Header {\n\n short getId();\n\n String getPhone();\n\n short getNo();\n\n short getLength();\n\n EncryptType getEncryptType();\n}", "public String getAudioCodec() {\n return audioCodec;\n }", "public VCFHeader getHeader();", "public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }", "default List<String> getinputfilehdrs(String filename){\n List<String> headerlist = new ArrayList<>();\r\n return headerlist;\r\n }", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "public java.util.List<ConnectionHeaderParameter> getHeaderParameters() {\n return headerParameters;\n }", "public void audio() throws MalformedURLException {\n\n \tfinal XuggleAudio xa = new XuggleAudio(\n \t\t\tnew URL(\"http://www.audiocheck.net/download.php?filename=Audio/audiocheck.net_sweep20-20klin.wav\"));\n \t\n \t/*\n \tAudioPlayer.createAudioPlayer(xa).run();\n \tfinal AudioWaveform vis = new AudioWaveform(400,400);\n \tvis.showWindow(\"Waveform\");\n \tSampleChunk sc = null;\n \t/*\n \twhile( (sc = xa.nextSampleChunk()) != null )\n \t\tvis.setData( sc.getSampleBuffer() );\n \t*/\n \t/*\n \tFourierTransform fft = new FourierTransform(xa);\n \tsc = fft.nextSampleChunk();\n \twhile( sc != null ) {\n \t\tfloat[][] fftData = fft.getMagnitudes();\n \t\tdouble[] fftDataDouble = new double[fftData[0].length];\n \t\tfor (int d = 0; d < fftData[0].length; d++) {\n \t\t\tfftDataDouble[d] = (double) fftData[0][d];\n \t\t}\n \t\t//vis.setData(fftData[0]);\n \t\tvis.setData(fftDataDouble);\n \t\tsc = fft.nextSampleChunk();\n \t}\n \t*/\n \t/*\n \tEQFilter eq = new EQFilter(xa, EQType.LPF, 5000);\n \tFourierTransform fft = new FourierTransform(eq);\n \twhile ((sc = fft.nextSampleChunk()) != null) {\n \t\t\n \t}\n \t*/\n \t//MFCC mfcc = new MFCC(xa);\n }", "public Enumeration getAllHeaderLines() throws MessagingException {\n/* 504 */ if (this.headers == null)\n/* 505 */ loadHeaders(); \n/* 506 */ return this.headers.getAllHeaderLines();\n/* */ }", "private void checkAudioFormat(InputStream s) throws JavaLayerException\r\n {\r\n try\r\n {\r\n /*String[][] sm_aEncodings =\r\n {\r\n {\r\n \"MpegEncoding.MPEG2L1\", \"MpegEncoding.MPEG2L2\", \"MpegEncoding.MPEG2L3\"}\r\n ,\r\n {\r\n \"MpegEncoding.MPEG1L1\", \"MpegEncoding.MPEG1L2\", \"MpegEncoding.MPEG1L3\"}\r\n ,\r\n {\r\n \"MpegEncoding.MPEG2DOT5L1\", \"MpegEncoding.MPEG2DOT5L2\", \"MpegEncoding.MPEG2DOT5L3\"}\r\n ,\r\n\r\n };*/\r\n\r\n Bitstream m_bitstream = new Bitstream(s);\r\n Header m_header = m_bitstream.readFrame();\r\n // nVersion = 0 => MPEG2-LSF (Including MPEG2.5), nVersion = 1 => MPEG1\r\n int nVersion = m_header.version();\r\n int nLayer = m_header.layer();\r\n nLayer = m_header.layer();\r\n //int nSFIndex = m_header.sample_frequency();\r\n //int nMode = m_header.mode();\r\n int FrameLength = m_header.calculate_framesize();\r\n if (FrameLength < 0) throw new JavaLayerException(\"not a MPEG stream: invalid framelength\");\r\n //int nFrequency = m_header.frequency();\r\n float FrameRate = (float) ( (1.0 / (m_header.ms_per_frame())) * 1000.0);\r\n if (FrameRate < 0) throw new JavaLayerException(\"not a MPEG stream: invalid framerate\");\r\n int BitRate = Header.bitrates[nVersion][nLayer - 1][m_header.bitrate_index()];\r\n if (BitRate <= 0) throw new JavaLayerException(\"not a MPEG stream: invalid bitrate\");\r\n int nHeader = m_header.getSyncHeader();\r\n //String encoding = sm_aEncodings[nVersion][nLayer - 1];\r\n int cVersion = (nHeader >> 19) & 0x3;\r\n if (cVersion == 1) throw new JavaLayerException(\"not a MPEG stream: wrong version\");\r\n int cSFIndex = (nHeader >> 10) & 0x3;\r\n if (cSFIndex == 3) throw new JavaLayerException(\"not a MPEG stream: wrong sampling rate\");\r\n } catch (Exception e)\r\n {\r\n throw new JavaLayerException(e.getMessage());\r\n }\r\n }", "@java.lang.Override\n public int getAudioChannelCount() {\n return audioChannelCount_;\n }", "public\t ContactList getContactHeaders()\n { return (ContactList) this.getSIPHeaderList(ContactHeader.NAME); }", "public static AudioData getAudioData(String filePath) {\r\n\t\treturn assetManager.loadAudio(filePath);\r\n\t}", "public int getAudioDscp();", "private String receiveHeaders (SelectionKey clientKey)\r\n {\r\n // Local Variable Declaration \r\n int bytesRead = 0; byte[] trimedHeader;\r\n String rawHeaders = null; SocketChannel clientSC; \r\n \r\n try \r\n {\r\n // Get the socket channel from the key passed \r\n clientSC = (SocketChannel)clientKey.channel();\r\n\r\n // Clear the buffer before each read\r\n headerBuff.clear();\r\n\r\n // Read the header in from the socket channel\r\n bytesRead = clientSC.read(headerBuff);\r\n\r\n // Initialize the header byte array to the amount of bytes read\r\n trimedHeader = new byte[bytesRead];\r\n\r\n // Trim off any white space \r\n System.arraycopy(headerBuff.array(), 0, trimedHeader, 0, bytesRead);\r\n\r\n // Convert bytes to String for parsing \r\n rawHeaders = new String(trimedHeader, Charset.forName(\"UTF-8\"));\r\n\r\n // Trim trailing whitespace \r\n rawHeaders = rawHeaders.trim();\r\n }\r\n catch(IOException ioe)\r\n {\r\n ioe.printStackTrace();\r\n }\r\n finally\r\n {\r\n return rawHeaders;\r\n }\r\n }", "public static ArrayList<String> getHeaderList(ArrayList<ArrayList<String>> allData) {\n\r\n ArrayList<String> myHeader = new ArrayList<>();\r\n for (int i = 0; i < allData.get(0).size(); i++) {\r\n if ((allData.get(0).get(i) != null) && (!\"\".equals(allData.get(0).get(i)))) {\r\n myHeader.add(allData.get(0).get(i).toLowerCase().trim());\r\n // Comtempla caso più spazi tra \"adj close\"\r\n }\r\n }\r\n return myHeader;\r\n }", "public void getPackByte(DataPacket packet) {\r\n \t\t//TODO this is getting called but not sure why only one time \r\n \t\t// or whether it is stalling in mid-exec??\r\n \t\r\n \t\t//TODO on firstPacket write bytes and start audioTrack\r\n\t\t\t// AMR-nb frames at 12.2 KB or format type 7 frames are handled . \r\n\t\t\t// after the normal header, the getDataArray contains extra 10 bytes of dynamic header that are bypassed by 'limit'\r\n\r\n\t\t\t\r\n\t\t\t// real value for the frame separator comes in the input stream at position 1 in the data array\r\n\t\t\t// returned by \r\n\r\n//\t\t\tint newFrameSep = 0x3c;\r\n\t\t\t// bytes avail = packet.getDataSize() - limit;\r\n\r\n//\t\t\tbyte[] lbuf = new byte[packet.getDataSize()];\r\n//\t\t\tif ( packet.getDataSize() > 0)\r\n//\t\t\t\tlbuf = packet.getDataAsArray();\r\n\t\t\t//first frame includes the 1 byte frame header whose value should be used \r\n\t\t\t// to write subsequent frame separators \r\n \t\tLog.d(TAG, \"getPackByt start and play\");\r\n \t\t\r\n \t\tif(!started){\r\n\t\t\t\tLog.d(TAG, \" PLAY audioTrak\");\r\n\t\t\t\ttrack.play();\r\n\t\t\t\tstarted = true;\r\n \t\t}\r\n\t\t\t\r\n//\t\t\ttrack.write(packet.getDataAsArray(), limit, (packet.getDataSize() - limit));\r\n \t\ttrack.write(packet.getDataAsArray(), 0, packet.getDataSize() );\r\n\t\t\tLog.d(TAG, \"getPackByt aft write\");\r\n\r\n//\t\t\tif(!started && nBytesRead > minBufferSize){\r\n\t//\t\t\tLog.d(TAG, \" PLAY audioTrak\");\r\n\t\t//\t\ttrack.play();\r\n\t\t//\tstarted = true;}\r\n\t\t\tnBytesRead += packet.getDataSize();\t\r\n\t\t\tif (nBytesRead % 500 < 375) Log.d(TAG, \" getPackByte plus 5K received\");\r\n\t\t}", "List<PurchaseOrderHeader> getAllPurchaseOrderHeaders();", "public String getSound();", "public AUID getSoundCompression()\r\n\t\tthrows PropertyNotPresentException;", "public IMAGE_FILE_HEADER getFileHeader() { return peHeader; }", "public Object getHeader() {\n return header;\n }", "public boolean isAudio()\n {return false ;\n }", "public LinkedList getMessageAsEncodedStrings() {\n LinkedList retval = new LinkedList();\n synchronized (headers) {\n ListIterator li = headers.listIterator();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n if (sipHeader instanceof SIPHeaderList) {\n SIPHeaderList shl = (SIPHeaderList) sipHeader;\n retval.addAll(shl.getHeadersAsEncodedStrings());\n } else {\n retval.add(sipHeader.encode());\n }\n }\n }\n return retval;\n }", "public ListIterator getHeaderNames() {\n ListIterator li = this.headers.listIterator();\n LinkedList retval = new LinkedList();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n String name = sipHeader.getName();\n retval.add(name);\n }\n return retval.listIterator();\n }", "private DefaultListModel<String> loadUncapturedHeaders(){\r\n\t\tif(FileData.getFileModel(FileType.UNCAPTURED_AUTH) != null) {\r\n\t\t\tfor(String header : FileData.getFileModel(FileType.UNCAPTURED_AUTH).getFileContents().getHeaderNames()) {\r\n\t\t\t\tthis.uncapturedHeaderModel.addElement(header);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tthis.uncapturedHeaderModel.clear();\r\n\t\t}\r\n\t\treturn this.uncapturedHeaderModel;\r\n\t}", "private void parseHeader()\n throws IOException {\n\n while (headerPending) {\n\n // check if we have a complete line\n int eol = -1;\n while (eol < 0) {\n for (int i = 0; (eol < 0) && (i < nEncoded); ++i) {\n if (encoded[i] == '\\n') {\n eol = i;\n }\n } \n if (eol < 0) {\n // we don't have enough characters\n if (readEncodedBytes() < 0) {\n throw new IOException(\"missing uuencode header\");\n }\n }\n }\n \n if (eol == 0) {\n eol = 1;\n System.arraycopy(encoded, eol, encoded, 0, nEncoded - eol);\n nEncoded -= 1;\n } else\n if ((eol < 4) || (encoded[0] != 'b') || (encoded[1] != 'e')\n || (encoded[2] != 'g') || (encoded[3] != 'i') || (encoded[4] != 'n')) {\n // this is not the header line, skip it\n \t//System.out.println(\"eol:\" + eol);\n \t//System.out.println(\"srcpos: \" + (eol + 1) + \" \" + (nEncoded - eol));\n System.arraycopy(encoded, eol + 1, encoded, 0,\n nEncoded - eol);\n nEncoded -= eol;\n } else {\n\n // skip the whitespace characters\n int i = 5;\n while ((i < eol) && Character.isWhitespace((char) encoded[i])) {\n ++i;\n }\n\n if (((i + 2) < eol)\n && (encoded[i] >= '0') && (encoded[i] <= '7')\n && (encoded[i+1] >= '0') && (encoded[i+1] <= '7')\n && (encoded[i+2] >= '0') && (encoded[i+2] <= '7')) {\n \n // store the permissions\n userPerms = encoded[i] - '0';\n groupPerms = encoded[i+1] - '0';\n othersPerms = encoded[i+2] - '0';\n\n // in order to allow space in file names, uudecode as provided in\n // version 4.3.x of the GNU sharutils package uses a single space\n // between permissions and file name\n if (encoded[i+3] == ' ') {\n i += 4;\n\n // store the file name (which may contain space characters)\n StringBuffer buffer = new StringBuffer();\n while (i < eol) {\n buffer.append((char) encoded[i++]);\n }\n name = buffer.toString();\n\n // set up state for data decoding\n headerPending = false;\n System.arraycopy(encoded, eol + 1, encoded, 0, nEncoded - eol);\n nEncoded -= eol;\n firstQuantum = 1;\n current = 0;\n return;\n\n }\n }\n\n throw new IOException(\"malformed uuencode header\");\n\n }\n\n }\n\n }", "Headers getHeaders();", "public short[] updateAudioTxBuf()\n\t{\n\t\taudioTxBufLength = sampleBit * (bitLength1+bitLength2+bitLength3)+352*2;\t\n\t\tshort[] audioTxBuf = new short[audioTxBufLength];\n\t\tcounter_k = 0;\n\n\t\tinitEncoderTxData();\n\n\t\tfor(counter_i=0;counter_i<bitLength1;counter_i++)\n\t\t{\n\t\t\t\tfor(counter_j=0;counter_j<sampleBit;counter_j++)\n\t\t\t\t{\n\t\t\t\t\taudioTxBuf[counter_k] = highLevel[counter_j];\t//Samsung, Xiaomi(MIUI)\n//\t\t\t\t\taudioTxBuf[counter_k] = lowLevel[counter_j];\t//else\n\t\t\t\t\tcounter_k++;\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < 352; i++) {\n\t\t\taudioTxBuf[counter_k+i]= (short)0;\t\n\t\t}\n\t\tcounter_k=counter_k+351;\n\t\tfor(counter_i=0;counter_i<bitLength2;counter_i++)\n\t\t{\n\t\t\t\tfor(counter_j=0;counter_j<sampleBit;counter_j++)\n\t\t\t\t{\n\t\t\t\t\taudioTxBuf[counter_k] = highLevel[counter_j];\t//Samsung, Xiaomi(MIUI)\n//\t\t\t\t\taudioTxBuf[counter_k] = lowLevel[counter_j];\t//else\n\t\t\t\t\tcounter_k++;\n\t\t\t\t}\t\t\t\n\t\t\t\n\t\t}\t\n\t\tfor (int i = 1; i < 352; i++) {\n\t\t\taudioTxBuf[counter_k+i]= (short) 0;\t\t\t\n\t\t}\n\t\tcounter_k=counter_k+351;\n\t\tfor(counter_i=0;counter_i<bitLength3;counter_i++)\n\t\t{\n\t\t\t\tfor(counter_j=0;counter_j<sampleBit;counter_j++)\n\t\t\t\t{\n\t\t\t\t\taudioTxBuf[counter_k] = highLevel[counter_j];\t//Samsung, Xiaomi(MIUI)\n//\t\t\t\t\taudioTxBuf[counter_k] = lowLevel[counter_j];\t//else\n\t\t\t\t\tcounter_k++;\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\tcounter_k=0;\n\t\treturn audioTxBuf;\n\t}" ]
[ "0.7214388", "0.6456711", "0.6080348", "0.5850496", "0.5828771", "0.5814992", "0.57077384", "0.56665444", "0.5576858", "0.55707", "0.55639184", "0.55524826", "0.5549945", "0.55460364", "0.5495114", "0.5491981", "0.54803896", "0.5474433", "0.5441748", "0.5427403", "0.5417518", "0.5408896", "0.5377431", "0.53635985", "0.53477645", "0.5336547", "0.5330601", "0.53191423", "0.531712", "0.53121376", "0.5304238", "0.52966666", "0.5290556", "0.52435493", "0.5240155", "0.523667", "0.52309555", "0.5228882", "0.52212787", "0.5206209", "0.51975465", "0.5194603", "0.51877785", "0.5187484", "0.51869273", "0.518204", "0.5181879", "0.51780045", "0.51769596", "0.5162906", "0.5141193", "0.5124943", "0.51152426", "0.5111582", "0.51063055", "0.50875235", "0.5086196", "0.508042", "0.50740427", "0.5073152", "0.5067481", "0.50596195", "0.5057631", "0.5048697", "0.5040566", "0.5040319", "0.5037619", "0.5036192", "0.5032177", "0.5023301", "0.5020258", "0.50126415", "0.5012606", "0.50099504", "0.50045186", "0.49989554", "0.4996885", "0.4995851", "0.4982629", "0.49738863", "0.49672937", "0.49666658", "0.49608028", "0.4960693", "0.49576524", "0.4955191", "0.49414206", "0.4939815", "0.49397573", "0.4936328", "0.49228695", "0.4917622", "0.49127164", "0.49093315", "0.4907243", "0.4900299", "0.4891048", "0.48906633", "0.48871535", "0.48841485", "0.48817483" ]
0.0
-1
Returns Audio Header data
IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AudioHeader\n{\n /**\n * @return the audio file type\n */\n public abstract String getEncodingType();\n\n /**\n * @return the ByteRate of the Audio, this is the total average amount of bytes of data sampled per second\n */\n public Integer getByteRate();\n\n\n\n /**\n * @return the BitRate of the Audio, this is the amount of kilobits of data sampled per second\n */\n public String getBitRate();\n\n /**\n * @return bitRate as a number, this is the amount of kilobits of data sampled per second\n */\n public long getBitRateAsNumber();\n\n\n /**\n *\n * @return length of the audio data in bytes, exactly what this means depends on the audio format\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataLength();\n\n\n /**\n *\n * @return the location in the file where the audio samples start\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataStartPosition();\n\n\n /**\n *\n * @return the location in the file where the audio samples end\n *\n * TODO currently only used by Wav/Aiff/Flac/Mp4\n */\n public Long getAudioDataEndPosition();\n\n\n /**\n * @return the Sampling rate, the number of samples taken per second\n */\n public String getSampleRate();\n\n /**\n * @return he Sampling rate, the number of samples taken per second\n */\n public int getSampleRateAsNumber();\n\n /**\n * @return the format\n */\n public String getFormat();\n\n /**\n * @return the number of channels (i.e 1 = Mono, 2 = Stereo)\n */\n public String getChannels();\n\n /**\n * @return if the sampling bitRate is variable or constant\n */\n public boolean isVariableBitRate();\n\n /**\n * @return track length in seconds\n */\n public int getTrackLength();\n\n /**\n *\n * @return track length as float\n */\n public double getPreciseTrackLength();\n\n /**\n * @return the number of bits in each sample\n */\n public int getBitsPerSample();\n\n /**\n *\n * @return if the audio codec is lossless or lossy\n */\n public boolean isLossless();\n\n /**\n *\n * @return the total number of samples, this can usually be used in conjunction with the\n * sample rate to determine the track duration\n */\n public Long getNoOfSamples();\n}", "public static byte[] createWavHeader(int dataSize, int samplingRate, int numChannels, int bytesPerSampleSlice) {\n byte header[] = {\n // [\"RIFF\" ] [total_len - 8 ]\n 0x52, 0x49, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00,\n\n // [\"WAVE\" ] [\"fmt \" ]\n 0x57, 0x41, 0x56, 0x45, 0x66, 0x6d, 0x74, 0x20,\n\n // [fmt len ] [Codec ] [# Chan ]\n 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,\n\n // [sampling rate ] [Avg. Bytes / Second ]\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\n // [B / smpl] [b / smpl] [\"data\" ]\n 0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61,\n\n // [data_len ]\n 0x00, 0x00, 0x00, 0x00\n };\n\n if (dataSize < 0) {\n throw new IllegalArgumentException(\"invalid file size : \" + dataSize);\n }\n if (samplingRate <= 0) {\n throw new IllegalArgumentException(\"invalid sampling rate : \" + samplingRate);\n }\n if (numChannels <= 0) {\n throw new IllegalArgumentException(\"invalid num Channels : \" + numChannels);\n }\n if (bytesPerSampleSlice <= 0) {\n throw new IllegalArgumentException(\"invalid bytes per sample slice : \" + bytesPerSampleSlice);\n }\n\n // dataSize must be a multiple of bytesPerSampleSlice\n // and bytesPerSampleSlice must be a multiple of numChannels.\n if (dataSize % bytesPerSampleSlice != 0) {\n throw new IllegalArgumentException(\"dataSize must be a multiple of bytesPerSampleSlice\");\n }\n if (bytesPerSampleSlice % numChannels != 0) {\n throw new IllegalArgumentException(\"bytesPerSampleSlice must be a multiple of numChannels\");\n }\n\n // Need byte of padding if data size not multiple of 2\n // (Can only happen if numChannels=1 and bytesPerSampleSlice=1)\n int padding = 0;\n if (dataSize % 2 != 0) {\n // 1 byte of padding\n padding = 1;\n }\n\n // Total length of file less first 8 bytes\n int riff_len = dataSize + padding + HEADER_SIZE - 8;\n\n // Total length of audio data; padding not included here.\n int data_len = dataSize;\n\n int riff_len_ptr = 4;\n int num_channels_ptr = 22;\n int sampling_rate_ptr = 24;\n int avg_bytes_per_second_ptr = 28;\n int bytes_per_sample_ptr = 32;\n int sig_bits_per_sample_ptr = 34;\n int data_len_ptr = 40;\n\n header[riff_len_ptr + 0] = (byte) ((riff_len) & 0xFF);\n header[riff_len_ptr + 1] = (byte) ((riff_len >> 8) & 0xFF);\n header[riff_len_ptr + 2] = (byte) ((riff_len >> 16) & 0xFF);\n header[riff_len_ptr + 3] = (byte) ((riff_len >> 24) & 0xFF);\n\n header[data_len_ptr + 0] = (byte) ((data_len) & 0xFF);\n header[data_len_ptr + 1] = (byte) ((data_len >> 8) & 0xFF);\n header[data_len_ptr + 2] = (byte) ((data_len >> 16) & 0xFF);\n header[data_len_ptr + 3] = (byte) ((data_len >> 24) & 0xFF);\n\n header[num_channels_ptr + 0] = (byte) ((numChannels) & 0xFF);\n header[num_channels_ptr + 1] = (byte) ((numChannels >> 8) & 0xFF);\n\n header[sampling_rate_ptr + 0] = (byte) ((samplingRate) & 0xFF);\n header[sampling_rate_ptr + 1] = (byte) ((samplingRate >> 8) & 0xFF);\n header[sampling_rate_ptr + 2] = (byte) ((samplingRate >> 16) & 0xFF);\n header[sampling_rate_ptr + 3] = (byte) ((samplingRate >> 24) & 0xFF);\n\n int abps = samplingRate * bytesPerSampleSlice;\n header[avg_bytes_per_second_ptr + 0] = (byte) ((abps) & 0xFF);\n header[avg_bytes_per_second_ptr + 1] = (byte) ((abps >> 8) & 0xFF);\n header[avg_bytes_per_second_ptr + 2] = (byte) ((abps >> 16) & 0xFF);\n header[avg_bytes_per_second_ptr + 3] = (byte) ((abps >> 24) & 0xFF);\n\n header[bytes_per_sample_ptr + 0] = (byte) ((bytesPerSampleSlice) & 0xFF);\n header[bytes_per_sample_ptr + 1] = (byte) ((bytesPerSampleSlice >> 8) & 0xFF);\n\n int sig_bits_per_sample = 8 * bytesPerSampleSlice / numChannels;\n header[sig_bits_per_sample_ptr + 0] = (byte) ((sig_bits_per_sample) & 0xFF);\n header[sig_bits_per_sample_ptr + 1] = (byte) ((sig_bits_per_sample >> 8) & 0xFF);\n\n return header;\n }", "public WaveData read() throws IOException {\n\t\tint res = inputStream.read(buf);\n\t\tif (res != headerSize) {\n\t\t\tthrow new IOException(\"Header reading failed\");\n\t\t}\n\t\theader.setChunkID(Arrays.copyOfRange(buf, 0, 4));\n\t\tif (new String(header.getChunkID()).compareTo(\"RIFF\") != 0) {\n\t\t\tthrow new IOException(\"Format failed\");\n\t\t}\n\n\t\theader.setChunkSize(toInt(4, false));\n\t\theader.setFormat(Arrays.copyOfRange(buf, 8, 12));\n\t\theader.setSubChunk1ID(Arrays.copyOfRange(buf, 12, 16));\n\t\theader.setSubChunk1Size(toInt(16, false));\n\t\theader.setAudioFormat(toShort(20, false));\n\t\theader.setNumChannels(toShort(22, false));\n\t\theader.setSampleRate(toInt(24, false));\n\t\theader.setByteRate(toInt(28, false));\n\t\theader.setBlockAlign(toShort(32, false));\n\t\theader.setBitsPerSample(toShort(34, false));\n\t\theader.setSubChunk2ID(Arrays.copyOfRange(buf, 36, 40));\n\t\theader.setSubChunk2Size(toInt(40, false));\n\t\treturn header;\n\t}", "public AudioDescriptor getAudioDescriptor();", "public byte[] getHeader() {\n\treturn header;\n }", "public String getAudioCode() {\n return audioCode;\n }", "public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }", "public String getAudioEncoding() {\n return audioEncoding;\n }", "private void readHeader() throws IOException, PlayerException {\n boolean finished = false;\n int packet = 1;\n\n while (!finished) {\n count = audioIn.read(buffer, index, BUFFER_SIZE);\n joggSyncState.wrote(count);\n\n int result = joggSyncState.pageout(joggPage);\n if (result == -1) {\n throw new HoleInDataException();\n } else if (result == 0) {\n // Read more\n } else if (result == 1) {\n if (packet == 1) {\n joggStreamState.init(joggPage.serialno());\n joggStreamState.reset();\n\n jorbisInfo.init();\n jorbisComment.init();\n }\n\n if (joggStreamState.pagein(joggPage) == -1)\n throw new PlayerException();\n\n if (joggStreamState.packetout(joggPacket) == -1)\n throw new HoleInDataException();\n\n if (jorbisInfo.synthesis_headerin(jorbisComment, joggPacket) < 0)\n throw new NotVorbisException();\n\n if (packet == 3) finished = true;\n else packet++;\n }\n\n index = joggSyncState.buffer(BUFFER_SIZE);\n buffer = joggSyncState.data;\n\n if (count == 0 && !finished)\n throw new PlayerException();\n }\n }", "public byte[] createHeader(int bytesLength) {\n\n int totalLength = bytesLength + 4 + 24 + 8;\n byte[] lengthData = intToBytes(totalLength);\n byte[] samplesLength = intToBytes(bytesLength);\n byte[] sampleRateBytes = intToBytes(this.sampleRate);\n byte[] bytesPerSecond = intToBytes(this.sampleRate * 2);\n\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n\n try {\n out.write(new byte[] {'R', 'I', 'F', 'F'});\n out.write(lengthData);\n out.write(new byte[] {'W', 'A', 'V', 'E'});\n\n out.write(new byte[] {'f', 'm', 't', ' '});\n out.write(new byte[] {0x10, 0x00, 0x00, 0x00}); // 16 bit chunks\n out.write(new byte[] {0x01, 0x00, 0x01, 0x00}); // mono\n out.write(sampleRateBytes); // sampling rate\n out.write(bytesPerSecond); // bytes per second\n out.write(new byte[] {0x02, 0x00, 0x10, 0x00}); // 2 bytes per sample\n out.write(new byte[] {'d', 'a', 't', 'a'});\n out.write(samplesLength);\n } catch (IOException e) {\n Log.e(\"Create WAV\", e.getMessage());\n }\n\n return out.toByteArray();\n }", "protected void parseFlvSequenceHeader(byte[] data) throws UnsupportedOperationException, IOException {\n // Sound format: first 4 bits\n final int soundFormatInt = (data[0] >>> 4) & 0x0f;\n try {\n audioFormat = AudioFormat.valueOf(soundFormatInt);\n } catch (IllegalArgumentException ex) {\n throw new UnsupportedOperationException(\"Sound format not supported: \" + soundFormatInt);\n }\n switch (audioFormat) {\n case AAC:\n delegateWriter = new AacWriter(out);\n break;\n case MP3:\n delegateWriter = new Mp3Writer(out);\n break;\n default:\n throw new UnsupportedOperationException(\"Sound format not supported: \" + audioFormat);\n }\n }", "public interface Audio {\r\n\r\n\t//******************************GETS*****************************\r\n//\tpublic FileOutputStream getAudioByBitRate(String bitrate);\r\n\t/**\r\n\t * If the file was uploaded in a rate of 128 kbits/s then streaming at 320 kbits/s provides no benefits.\r\n\t * This method allows the client to check what bitrates exist and choose the adequate one.\t\r\n\t * @return String with all the BitRates accessible.\r\n\t */\r\n\tpublic ArrayList<Integer> getAccessibleBitRates();\r\n\t/**\r\n\t * Returns a Stream with the Audio in the default BitRate.\r\n\t * @return Audio stream.\r\n\t */\r\n//\tpublic FileOutputStream getAudio();\r\n\t/**\r\n\t * Evaluates if the Bitrate \"bitrate\" is allowed for audio and returns a Stream if it is.\r\n\t * @param bitrate \r\n\t * @return FileOutputStream\r\n\t */\r\n//\tpublic FileOutputStream getAudioByBitRate(int bitrate);\r\n\tpublic String getDir();\r\n\tpublic String getFileName();\r\n\t//******************************ACTIONS*****************************\r\n\t/**\r\n\t * Sets the bitRate for the value that comes as parameter.\r\n\t * @return\r\n\t */\r\n\tpublic boolean setDefaultBitRate(String bitrate);\r\n\t/**\r\n\t * Converts the Audio to the default system type, mp3. \r\n\t * @return The type of the file. If it failed returns a null String.\r\n\t */\r\n\tpublic boolean convertAudioTypeToDefault();\r\n\tboolean convertAudioTypeToDefault(String dir, long size,\r\n\t\t\tint defaultBitRate, String type);\r\n\tpublic boolean setAudioType(String type);\r\n\tpublic void setMaxBitRate(String bitRate);\r\n\tpublic Response download(String appId, String audioId, String dir);\r\n\tpublic void setDir(String dir);\r\n\tpublic void setSize(long size);\r\n\tpublic void setCreationDate(String creationDate);\r\n\tpublic void setFileName(String fileName);\r\n\tpublic void setLocation(String location);\r\n}", "com.didiyun.base.v1.Header getHeader();", "public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}", "protected abstract AudioFormat getAudioFormat();", "private AudioFormat getAudioFormat() {\n float sampleRate = 16000.0F;\n int sampleSizeInBits = 16;\n int channels = 1;\n boolean signed = true;\n boolean bigEndian = false;\n return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);\n }", "public com.google.protobuf.ByteString getAudioIn() {\n if (converseRequestCase_ == 2) {\n return (com.google.protobuf.ByteString) converseRequest_;\n }\n return com.google.protobuf.ByteString.EMPTY;\n }", "private static byte[] createHeader() {\n Random r = new Random();\n\n byte[] output = new byte[12];\n\n // Create random message id\n short messageID = (short) r.nextInt(Short.MAX_VALUE + 1);\n\n // Create a buffer we can construct the header in.\n ByteBuffer buf = ByteBuffer.wrap(output);\n\n // Place the message into the buffer.\n buf.putShort(messageID);\n\n // Sets QR, OPCODE, AA, TC, RD, RA, and RCODE\n buf.put((byte)0x01);\n buf.put((byte)0x20);\n\n // QDCOUNT, we're making one request.\n buf.putShort((short) 1);\n\n // Rest are 0\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n\n return output;\n }", "private void write_adts_header(byte[] frame, int offset) {\n frame[offset] = (byte) 0xff;\n frame[offset + 1] = (byte) 0xf0;\n // versioin 0 for MPEG-4, 1 for MPEG-2 (1-bit)\n frame[offset + 1] |= 0 << 3;\n // layer 0 (2-bit)\n frame[offset + 1] |= 0 << 1;\n // protection absent: 1 (1-bit)\n frame[offset + 1] |= 1;\n // profile: audio_object_type - 1 (2-bit)\n frame[offset + 2] = (SrsAacObjectType.AacLC - 1) << 6;\n // sampling frequency index: 4 (4-bit)\n frame[offset + 2] |= (4 & 0xf) << 2;\n // channel configuration (3-bit)\n frame[offset + 2] |= (2 & (byte) 0x4) >> 2;\n frame[offset + 3] = (byte) ((2 & (byte) 0x03) << 6);\n // original: 0 (1-bit)\n frame[offset + 3] |= 0 << 5;\n // home: 0 (1-bit)\n frame[offset + 3] |= 0 << 4;\n // copyright id bit: 0 (1-bit)\n frame[offset + 3] |= 0 << 3;\n // copyright id start: 0 (1-bit)\n frame[offset + 3] |= 0 << 2;\n // frame size (13-bit)\n frame[offset + 3] |= ((frame.length - 2) & 0x1800) >> 11;\n frame[offset + 4] = (byte) (((frame.length - 2) & 0x7f8) >> 3);\n frame[offset + 5] = (byte) (((frame.length - 2) & 0x7) << 5);\n // buffer fullness (0x7ff for variable bitrate)\n frame[offset + 5] |= (byte) 0x1f;\n frame[offset + 6] = (byte) 0xfc;\n // number of data block (nb - 1)\n frame[offset + 6] |= 0x0;\n }", "public int getLength() { \r\n return audioLength; \r\n }", "public AudioFormat getClientAudioFormat() {\n\t\t\n\t\treturn clientAudioFormat;\n\t\n\t}", "public VCFHeader getHeader();", "public com.google.protobuf.ByteString getAudioIn() {\n if (converseRequestCase_ == 2) {\n return (com.google.protobuf.ByteString) converseRequest_;\n }\n return com.google.protobuf.ByteString.EMPTY;\n }", "java.lang.String getHeader();", "private AudioFormat getAudioFormat(String s)\n\t{\n float sampleRate = 16000.0F;\n int sampleSizeBits = 16;\n int channels = 1;\n boolean signed = true;\n boolean bigEndian = false;\n\n \n \n //examples:\n //swimwater1.wav: PCM_SIGNED 22050.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian\n //test.wav: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian\n \n //store different aspects in differents strings\n String lastValue=\"\";\n String sampleRateString=\"\";\n String sampleSizeBitsString=\"\";\n String channelsString=\"\";\n String signedString=\"\";\n String bigEndianString=\"\";\n \n for (char ch : s.toCharArray())\n {\n //System.out.print(ch);\n \n if(ch!=',')//komma= nächste wert\n {\n \tif(ch!=' ')\n \t\tlastValue+=ch;\n }\n else\n {\n \tif(sampleRateString.isEmpty()) sampleRateString=lastValue;\n \telse if(sampleSizeBitsString.isEmpty()) sampleSizeBitsString=lastValue;\n \telse if(channelsString.isEmpty()) channelsString=lastValue;\n \telse if(signedString.isEmpty()) signedString=lastValue;\n \t\n \tlastValue=\"\";\n }\n }\n if(bigEndianString.isEmpty()) bigEndianString=lastValue;\n\n //interpret those strings\n\n //sampleRate\n String temp=\"\";\n for (char ch : sampleRateString.toCharArray())\n {\n if((ch>='0' && ch<='9'))\n {\n \ttemp+=ch;\n }\n else if(ch=='.')\n \tbreak;\n }\n sampleRate=(float)Integer.parseInt(temp);\n\n //sampleSizeBits\n temp=\"\";\n for (char ch : sampleSizeBitsString.toCharArray())\n {\n if(ch>='0' && ch<='9')\n {\n \ttemp+=ch;\n }\n }\n sampleSizeBits=Integer.parseInt(temp);\n\n //channels\n if(channelsString.contains(\"mono\"))\n \tchannels=1;\n else if(channelsString.contains(\"stereo\"))\n \tchannels=2;\n \n //signed\n signed=true;\n \n //bigEndian\n if(bigEndianString.contains(\"little-endian\"))\n \tbigEndian=false;\n else bigEndian=true;\n \n \n /*System.out.println();\n System.out.println(sampleRate);\n System.out.println(sampleSizeBits);\n System.out.println(channels);\n System.out.println(signed);\n System.out.println(bigEndian);*/\n \n return new AudioFormat(sampleRate, sampleSizeBits, channels, signed, bigEndian);\n }", "public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}", "public AudioBuffer getAudioBuffer() {\n\t\treturn buffer;\n\t}", "public String getAudioCodec() {\n return audioCodec;\n }", "public DataSource getAudioSource();", "public Object getHeader() {\n return header;\n }", "public byte[] getBuffer() {\r\n return this.header;\r\n }", "public String getHeader();", "public int getAudioDscp();", "@Test\n public void voicesAndvarMeterHeaderTest(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invention.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getMeter(),\"4/4\");// this will test for M:C\n ArrayList<String> voice = new ArrayList<String>();\n voice.add(\"V:1\");\n voice.add(\"V:2\");\n assertEquals(h.getVoice(),voice);\n }", "private String soundConversion() {\n int reading = (record[18] & 255) + ((record[21] & 0x0C) << 6);\n return (reading * 100) / 1024 + \"\";\n }", "public synchronized VideoData popAudioData() {\r\n if (needBuffering || !hasAudio) //only has video ?\r\n return null;\r\n if (m_audioframePool.size() == 0) {\r\n Log.d(tag, \"audio size = 0,need buffer\");\r\n needBuffering = true;\r\n }\r\n return m_audioframePool.poll();\r\n }", "public static AudioData getAudioData(String filePath) {\r\n\t\treturn assetManager.loadAudio(filePath);\r\n\t}", "public String getAudioVideoCopyrightFlag() {\n return (String)getAttributeInternal(AUDIOVIDEOCOPYRIGHTFLAG);\n }", "private void parseHeader() throws IOException {\n\n\t\t// ////////////////////////////////////////////////////////////\n\t\t// Administrative header info\n\t\t// ////////////////////////////////////////////////////////////\n\n\t\t// First 10 bytes reserved for preamble\n\t\tbyte[] sixBytes = new byte[6];\n\t\tkeyBuffer.get(sixBytes, 0, 6);\n\t\tlogger.log(new String(sixBytes) + \"\\n\"); // says adac01\n\n\t\ttry {\n\n\t\t\tshort labels = keyBuffer.getShort();\n\t\t\tlogger.log(Integer.toString(labels)); // Number of labels in header\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Number of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sub-headers\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Unused byte\n\n\t\t\t// For each header field available.. get them\n\t\t\tfor (short i = 0; i < labels; i++) {\n\n\t\t\t\t// Attempt to find the next key...\n\t\t\t\t// ...the keynum (description)\n\t\t\t\t// ...the offset to the value\n\t\t\t\tADACKey key = getKeys();\n\t\t\t\tswitch (key.getDataType()) {\n\n\t\t\t\tcase ADACDictionary.BYTE:\n\n\t\t\t\t\tkeyList.add(new ByteKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.SHORT:\n\n\t\t\t\t\tkeyList.add(new ShortKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.INT:\n\n\t\t\t\t\tkeyList.add(new IntKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.FLOAT:\n\n\t\t\t\t\tkeyList.add(new FloatKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.EXTRAS:\n\n\t\t\t\t\tkeyList.add(new ExtrasKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"ADAC Decoder\", \"Failed to retrieve ADAC image file header. \" + \"Is this an ADAC image file?\");\n\t\t}\n\t}", "public String getFileHeaderInfo() {\n return this.fileHeaderInfo;\n }", "com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();", "public SAMFileHeader getFileHeader() {\n return dest.getFileHeader();\n }", "public void pushData() {\n\t\t\tFile file = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t\t.getAbsolutePath()\n\t\t\t\t\t+ \"/reverseme.pcm\");\n\t\t\t// Get the length of the audio stored in the file (16 bit so 2 bytes\n\t\t\t// per short)\n\t\t\t// and create a short array to store the recorded audio.\n\t\t\tint audioLength = (int) (file.length() / 2);\n\t\t\taudio = new short[audioLength];\n\n\t\t\ttry {\n\t\t\t\t// Create a DataInputStream to read the audio data back from the\n\t\t\t\t// saved file.\n\t\t\t\tInputStream is = new FileInputStream(file);\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\n\t\t\t\tDataInputStream dis = new DataInputStream(bis);\n\n\t\t\t\t// Read the file into the music array.\n\t\t\t\tint i = 0;\n\t\t\t\twhile (dis.available() > 0) {\n\t\t\t\t\taudio[i] = dis.readShort();\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\t// Close the input streams.\n\t\t\t\tdis.close();\n\n\t\t\t} catch (Throwable t) {\n\t\t\t\tLog.e(\"AudioTrack\", \"Playback Failed\");\n\t\t\t}\n\t\t}", "public interface Header {\n\n short getId();\n\n String getPhone();\n\n short getNo();\n\n short getLength();\n\n EncryptType getEncryptType();\n}", "public IMAGE_FILE_HEADER getFileHeader() { return peHeader; }", "String getHeader(String headerName);", "private void storeHeaderDataToByte() {\n\t\tString byteNumStr = String.format(\"%24s\",\n\t\t\t\tInteger.toBinaryString(encodedByte.length)).replace(' ',\n\t\t\t\t'0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(8, 16));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(16, 24));\n\n\t\t\n\t\tString widthStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(width)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(8, 16));\n\n\t\t\n\t\tString heightStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(height)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(8, 16));\n\n\t\tencodedByte[encodingIndex++] = (byte) numOfTableValue;\n\t\tencodedByte[encodingIndex++] = (byte) byteSizeForCode;\n\t\tencodedByte[encodingIndex++] = (byte) extraBits;\n\t}", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "public void writeHeader() throws IOException, FileNotFoundException {\n\n EndianCorrectOutputStream ecs;\n ByteArrayOutputStream baos;\n FileOutputStream fos;\n short s, ss[];\n byte b, bb[], ext_blob[];\n int hsize;\n int i, n;\n int extlist[][];\n\n\n // header is 348 except nii and anz/hdr w/ extensions is 352\n hsize = Nifti1.ANZ_HDR_SIZE;\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n hsize += 4;\n }\n\n try {\n\n baos = new ByteArrayOutputStream(hsize);\n fos = new FileOutputStream(header.getDs_hdrname());\n\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n\n\n ecs.writeIntCorrect(header.getSizeof_hdr());\n\n if (header.getData_type_string().length() >= 10) {\n ecs.writeBytes(header.getData_type_string().substring(0, 10));\n } else {\n ecs.writeBytes(header.getData_type_string().toString());\n for (i = 0; i < (10 - header.getData_type_string().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n if (header.getDb_name().length() >= 18) {\n ecs.writeBytes(header.getDb_name().substring(0, 18));\n } else {\n ecs.writeBytes(header.getDb_name().toString());\n for (i = 0; i < (18 - header.getDb_name().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n ecs.writeIntCorrect(header.getExtents());\n\n ecs.writeShortCorrect(header.getSession_error());\n\n ecs.writeByte((int) header.getRegular().charAt(0));\n\n b = packDimInfo(header.getFreq_dim(), header.getPhase_dim(), header.getSlice_dim());\n ecs.writeByte((int) b);\n\n for (i = 0; i < 8; i++) {\n ecs.writeShortCorrect(header.getDim()[i]);\n }\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getIntent()[i]);\n }\n\n ecs.writeShortCorrect(header.getIntent_code());\n\n ecs.writeShortCorrect(header.getDatatype());\n\n ecs.writeShortCorrect(header.getBitpix());\n\n ecs.writeShortCorrect(header.getSlice_start());\n\n for (i = 0; i < 8; i++) {\n ecs.writeFloatCorrect(header.getPixdim()[i]);\n }\n\n\n ecs.writeFloatCorrect(header.getVox_offset());\n\n ecs.writeFloatCorrect(header.getScl_slope());\n ecs.writeFloatCorrect(header.getScl_inter());\n\n ecs.writeShortCorrect(header.getSlice_end());\n\n ecs.writeByte((int) header.getSlice_code());\n\n ecs.writeByte((int) packUnits(header.getXyz_unit_code(), header.getT_unit_code()));\n\n\n ecs.writeFloatCorrect(header.getCal_max());\n ecs.writeFloatCorrect(header.getCal_min());\n\n ecs.writeFloatCorrect(header.getSlice_duration());\n\n ecs.writeFloatCorrect(header.getToffset());\n\n ecs.writeIntCorrect(header.getGlmax());\n ecs.writeIntCorrect(header.getGlmin());\n\n ecs.write(setStringSize(header.getDescrip(), 80), 0, 80);\n ecs.write(setStringSize(header.getAux_file(), 24), 0, 24);\n\n\n ecs.writeShortCorrect(header.getQform_code());\n ecs.writeShortCorrect(header.getSform_code());\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQuatern()[i]);\n }\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQoffset()[i]);\n }\n\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_x()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_y()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_z()[i]);\n }\n\n\n ecs.write(setStringSize(header.getIntent_name(), 16), 0, 16);\n ecs.write(setStringSize(header.getMagic(), 4), 0, 4);\n\n\n // nii or anz/hdr w/ ext. gets 4 more\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n for (i = 0; i < 4; i++) {\n ecs.writeByte((int) header.getExtension()[i]);\n }\n }\n\n /** write the header blob to disk */\n baos.writeTo(fos);\n\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n\n /** write the extension blobs **/\n try {\n\n ////// extensions\n if (header.getExtension()[0] != 0) {\n\n baos = new ByteArrayOutputStream(Nifti1.EXT_KEY_SIZE);\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n extlist = header.getExtensionsList();\n n = extlist.length;\n for (i = 0; i < n; i++) {\n // write size, code\n ecs.writeIntCorrect(extlist[i][0]);\n ecs.writeIntCorrect(extlist[i][1]);\n baos.writeTo(fos);\n baos.reset();\n\n // write data blob\n ext_blob = (byte[]) header.getExtension_blobs().get(i);\n fos.write(ext_blob, 0, extlist[i][0] - Nifti1.EXT_KEY_SIZE);\n }\n }\n\n fos.close();\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header extensions for file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n }", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "public String getSound();", "int[] getHeader(DataInputStream dataInputStream) throws IOException {\n dataInputStream.readShort();\t//Reads ID\r\n dataInputStream.readShort();\t//Reads flags\r\n dataInputStream.readShort();\t//Reads Questions\r\n short answers = dataInputStream.readShort();\r\n short authoritative = dataInputStream.readShort();\r\n short additional = dataInputStream.readShort();\r\n\r\n String hostName = getHostByName(dataInputStream);\r\n dataInputStream.readInt();\r\n\r\n int[] output = new int[3];\r\n output[0] = (int)answers;\r\n output[1] = (int)authoritative;\r\n output[2] = (int)additional;\r\n return output;\r\n }", "public AudioFormat getAudioFormat() {\n\t\tif (lastFormatChunk == null)\n\t\t\tthrow new NullPointerException();\n\n\t\treturn new AudioFormat((lastFormatChunk.sampleRate) / 1000f,\n\t\t\t\tlastFormatChunk.sigBitsPerSample, lastFormatChunk.numChannels,\n\t\t\t\tlastFormatChunk.sigBitsPerSample != 8, false);\n\t}", "public String getAudioCompressionType() {\n return audioCompressionType;\n }", "public AudioFormat getAudioFormat() {\n return currentFormat;\n }", "public VicarBinaryLabel getBinaryHeader() throws IOException;", "IAudio read(InputStream inputStream) throws AudioReaderException, InvalidFormatException;", "String sound();", "String[] getHeader(String key);", "public String getMessageHeaderAsString(){\n String header;\n switch(messageType){\n case DELETE:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case PUTCHUNK:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + replicationDegree + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_AWOKE:\n header = messageType + \" \" + version + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case ENH_DELETED:\n header = messageType + \" \" + fileId + \" \" + senderId + Utils.CRLF + Utils.CRLF;\n break;\n case GETCHUNK:\n if(version.equals(Utils.ENHANCEMENT_RESTORE) || version.equals(Utils.ENHANCEMENT_ALL))\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + sender_access + \" \"+ Utils.CRLF + Utils.CRLF;\n else header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n break;\n default:\n header = messageType + \" \" + version + \" \" + senderId + \" \" + fileId + \" \" + chunkNo + \" \" + Utils.CRLF + Utils.CRLF;\n }\n return header;\n }", "private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }", "public String getHeader() {\n\t\treturn _header;\n\t}", "public static void writeHeader(DataOutput dos,SpectrumHeader spectrumHeader) throws IOException {\n\n\t\tdos.write(fileSignature);\n\t\tdos.writeInt(spectrumHeader.k);\n\t\tdos.writeLong(spectrumHeader.nkmers);\n\t}", "public String getAudioId() {\n\t\tif (mPlayPos >= 0) {\n\t\t\treturn mPlayList[mPlayPos].getId();\n\t\t}\n\t\treturn null;\n\t}", "private void initAudioFormat() {\n\t\tfloat rate = 44100.0f;\n\t\t//float rate = 8000.0f;\n\t\t//int sampleSize = 8;\n\t\tint sampleSize = 16;\n\t\tint channels = 1;\n\t\tboolean bigEndian = true;\n\n\t\taudioFormat = new AudioFormat(rate, sampleSize, channels, bigEndian, bigEndian);\n\t\t// audioFormat = new AudioFormat(encoding, rate, sampleSize, channels, (sampleSize / 8)\n\t\t// * channels, rate, bigEndian);\n\n\t}", "public PHeader getHeader() {\n\t\treturn header;\n\t}", "private void checkAudioFormat(InputStream s) throws JavaLayerException\r\n {\r\n try\r\n {\r\n /*String[][] sm_aEncodings =\r\n {\r\n {\r\n \"MpegEncoding.MPEG2L1\", \"MpegEncoding.MPEG2L2\", \"MpegEncoding.MPEG2L3\"}\r\n ,\r\n {\r\n \"MpegEncoding.MPEG1L1\", \"MpegEncoding.MPEG1L2\", \"MpegEncoding.MPEG1L3\"}\r\n ,\r\n {\r\n \"MpegEncoding.MPEG2DOT5L1\", \"MpegEncoding.MPEG2DOT5L2\", \"MpegEncoding.MPEG2DOT5L3\"}\r\n ,\r\n\r\n };*/\r\n\r\n Bitstream m_bitstream = new Bitstream(s);\r\n Header m_header = m_bitstream.readFrame();\r\n // nVersion = 0 => MPEG2-LSF (Including MPEG2.5), nVersion = 1 => MPEG1\r\n int nVersion = m_header.version();\r\n int nLayer = m_header.layer();\r\n nLayer = m_header.layer();\r\n //int nSFIndex = m_header.sample_frequency();\r\n //int nMode = m_header.mode();\r\n int FrameLength = m_header.calculate_framesize();\r\n if (FrameLength < 0) throw new JavaLayerException(\"not a MPEG stream: invalid framelength\");\r\n //int nFrequency = m_header.frequency();\r\n float FrameRate = (float) ( (1.0 / (m_header.ms_per_frame())) * 1000.0);\r\n if (FrameRate < 0) throw new JavaLayerException(\"not a MPEG stream: invalid framerate\");\r\n int BitRate = Header.bitrates[nVersion][nLayer - 1][m_header.bitrate_index()];\r\n if (BitRate <= 0) throw new JavaLayerException(\"not a MPEG stream: invalid bitrate\");\r\n int nHeader = m_header.getSyncHeader();\r\n //String encoding = sm_aEncodings[nVersion][nLayer - 1];\r\n int cVersion = (nHeader >> 19) & 0x3;\r\n if (cVersion == 1) throw new JavaLayerException(\"not a MPEG stream: wrong version\");\r\n int cSFIndex = (nHeader >> 10) & 0x3;\r\n if (cSFIndex == 3) throw new JavaLayerException(\"not a MPEG stream: wrong sampling rate\");\r\n } catch (Exception e)\r\n {\r\n throw new JavaLayerException(e.getMessage());\r\n }\r\n }", "public AudioFormat genAudioFormat(){\n\t\treturn new AudioFormat(\n\t\t\t\tAudioFormat.Encoding.PCM_SIGNED, MicTest.SAMPLE_RATE, 8 *MicTest.FRAME, 1, MicTest.FRAME, MicTest.SAMPLE_RATE,\n\t\t\t\tfalse);\n\n\t}", "public final String getSound( ) {\n\t\treturn sound;\n\t}", "private void readHeader() throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n /*\n * Make sure we're at the beginning of the file\n */\n rafShp.seek(0); \n\n rafShp.read(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n\n int fileCode = ByteUtils.readBEInt(header, 0);\n\n if (fileCode != ShapeConst.SHAPE_FILE_CODE) {\n\n throw new IOException(\"Invalid file code, \" + \"probably not a shape file\");\n\n }\n\n fileVersion = ByteUtils.readLEInt(header, 28);\n\n if (fileVersion != ShapeConst.SHAPE_FILE_VERSION) {\n\n throw new IOException(\"Unable to read shape files with version \" +\n fileVersion);\n\n }\n\n fileLength = ByteUtils.readBEInt(header, 24);\n\n /* \n * convert from 16-bit words to 8-bit bytes\n */\n fileLength *= 2;\n\n fileShapeType = ByteUtils.readLEInt(header, 32);\n\n /*\n * read ESRIBoundingBox and convert to SHPEnvelope\n */\n fileMBR = new SHPEnvelope(ShapeUtils.readBox(header, 36));\n\n }", "public void getPackByte(DataPacket packet) {\r\n \t\t//TODO this is getting called but not sure why only one time \r\n \t\t// or whether it is stalling in mid-exec??\r\n \t\r\n \t\t//TODO on firstPacket write bytes and start audioTrack\r\n\t\t\t// AMR-nb frames at 12.2 KB or format type 7 frames are handled . \r\n\t\t\t// after the normal header, the getDataArray contains extra 10 bytes of dynamic header that are bypassed by 'limit'\r\n\r\n\t\t\t\r\n\t\t\t// real value for the frame separator comes in the input stream at position 1 in the data array\r\n\t\t\t// returned by \r\n\r\n//\t\t\tint newFrameSep = 0x3c;\r\n\t\t\t// bytes avail = packet.getDataSize() - limit;\r\n\r\n//\t\t\tbyte[] lbuf = new byte[packet.getDataSize()];\r\n//\t\t\tif ( packet.getDataSize() > 0)\r\n//\t\t\t\tlbuf = packet.getDataAsArray();\r\n\t\t\t//first frame includes the 1 byte frame header whose value should be used \r\n\t\t\t// to write subsequent frame separators \r\n \t\tLog.d(TAG, \"getPackByt start and play\");\r\n \t\t\r\n \t\tif(!started){\r\n\t\t\t\tLog.d(TAG, \" PLAY audioTrak\");\r\n\t\t\t\ttrack.play();\r\n\t\t\t\tstarted = true;\r\n \t\t}\r\n\t\t\t\r\n//\t\t\ttrack.write(packet.getDataAsArray(), limit, (packet.getDataSize() - limit));\r\n \t\ttrack.write(packet.getDataAsArray(), 0, packet.getDataSize() );\r\n\t\t\tLog.d(TAG, \"getPackByt aft write\");\r\n\r\n//\t\t\tif(!started && nBytesRead > minBufferSize){\r\n\t//\t\t\tLog.d(TAG, \" PLAY audioTrak\");\r\n\t\t//\t\ttrack.play();\r\n\t\t//\tstarted = true;}\r\n\t\t\tnBytesRead += packet.getDataSize();\t\r\n\t\t\tif (nBytesRead % 500 < 375) Log.d(TAG, \" getPackByte plus 5K received\");\r\n\t\t}", "@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }", "public static DataHeader readDataHeader(ArchiveFileBuffer buffer, CtrlInfoReader info) throws Exception\n {\n final File file = buffer.getFile();\n final long offset = buffer.offset();\n\n // first part of data file header:\n // 4 bytes directory_offset (skipped)\n // \" next_offset (offset of next entry in its file)\n // \" prev_offset (offset of previous entry in its file)\n // \" cur_offset (used by FileAllocator writing file)\n // \" num_samples (number of samples in the buffer)\n // \" ctrl_info_offset (offset in this file of control info header (units, limits, etc.))\n // \" buff_size (bytes allocated for this entry, including header)\n // \" buff_free (number of un-used, allocated bytes for this header)\n // 2 bytes DbrType (type of data stored in buffer)\n // 2 bytes DbrCount (count of values for each buffer element, i.e. 1 for scalar types, >1 for array types)\n // 4 bytes padding (used to align the period)\n // 8 bytes (double) period\n // 8 bytes (epicsTimeStamp) begin_time\n // \" next_file_time\n // \" end_time\n // char [40] prev_file\n // char [40] next_file\n // --> Total of 152 bytes in data header\n buffer.skip(4);\n final long nextOffset = buffer.getUnsignedInt();\n buffer.skip(4);\n buffer.skip(4);\n final long numSamples = buffer.getUnsignedInt();\n final long ctrlInfoOffset = buffer.getUnsignedInt();\n final long buff_size = buffer.getUnsignedInt();\n final long buff_free = buffer.getUnsignedInt();\n final short dbrTypeCode = buffer.getShort();\n final short dbrCount = buffer.getShort();\n buffer.skip(4);\n buffer.skip(8);\n final Instant beginTime = buffer.getEpicsTime();\n final Instant nextTime = buffer.getEpicsTime();\n final Instant endTime = buffer.getEpicsTime();\n\n buffer.skip(40);\n final byte nameBytes [] = new byte [40];\n buffer.get(nameBytes);\n\n if (!info.isOffset(ctrlInfoOffset))\n info = new CtrlInfoReader(ctrlInfoOffset);\n final DbrType dbrType = DbrType.forValue(dbrTypeCode);\n\n // compute amount of data in this data file entry: (bytes allocated) - (bytes free) - (bytes in header)\n final long buffDataSize = buff_size - buff_free - 152;\n System.out.println(buffDataSize);\n\n // Size of samples:\n // 12 bytes for status/severity/timestamp,\n // padding, value, padding\n final long dbr_size = 12 + dbrType.padding + dbrCount * dbrType.valueSize + dbrType.getValuePad(dbrCount);\n final long expected = dbr_size * numSamples;\n System.out.println(dbr_size);\n System.out.println(expected);\n\n if (expected != buffDataSize)\n throw new Exception(\"Expected \" + expected + \" byte buffer, got \" + buffDataSize);\n\n String nextFilename = nextOffset != 0 ? new String(nameBytes).split(\"\\0\", 2)[0] : \"*\";\n File nextFile = new File(buffer.getFile().getParentFile(), nextFilename);\n\n logger.log(Level.FINE, \"Datablock\\n\" +\n \"Buffer : '\" + file + \"' @ 0x\" + Long.toHexString(offset) + \"\\n\" +\n \"Time : \" + beginTime + \"\\n\" +\n \"... : \" + endTime);\n\n return new DataHeader(file, offset, nextFile, nextOffset, nextTime, info, dbrType, dbrCount, numSamples);\n }", "public boolean isAudio()\n {return false ;\n }", "public PayloadType[] getAudioPayloadTypes();", "public Audio getAudioFeatures(String uri, final VolleyCallBack callBack) {\n if (uri.equals(\"\") || !uri.contains(\":\"))\n throw new IllegalArgumentException(\"Invalid URI in AudioService\");\n\n int idStartIndex = uri.lastIndexOf(\":\")+1;\n\n String id = uri.substring(idStartIndex);\n\n String endpoint = \"https://api.spotify.com/v1/audio-features/\" + id;\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest\n (Request.Method.GET, endpoint, null, response -> {\n Gson gson = new Gson();\n audio = gson.fromJson(response.toString(), Audio.class); // Put our json info into an Audio class object\n callBack.onSuccess(); // use our volley callback\n }, error -> {\n // TODO: Handle error\n\n }) {\n\n // Add our authorization token to the jsonObjectRequst\n\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n String token = sharedPreferences.getString(\"token\", \"\");\n String auth = \"Bearer \" + token;\n headers.put(\"Authorization\", auth);\n return headers;\n }\n };\n queue.add(jsonObjectRequest);\n return audio;\n }", "public ByteBuffer getHeader() {\n ByteBuffer wrap;\n byte[] bArr;\n if (this.largeBox || getSize() >= 4294967296L) {\n bArr = new byte[16];\n bArr[3] = (byte) 1;\n bArr[4] = this.type.getBytes()[0];\n bArr[5] = this.type.getBytes()[1];\n bArr[6] = this.type.getBytes()[2];\n bArr[7] = this.type.getBytes()[3];\n wrap = ByteBuffer.wrap(bArr);\n wrap.position(8);\n IsoTypeWriter.writeUInt64(wrap, getSize());\n } else {\n bArr = new byte[8];\n bArr[4] = this.type.getBytes()[0];\n bArr[5] = this.type.getBytes()[1];\n bArr[6] = this.type.getBytes()[2];\n bArr[7] = this.type.getBytes()[3];\n wrap = ByteBuffer.wrap(bArr);\n IsoTypeWriter.writeUInt32(wrap, getSize());\n }\n wrap.rewind();\n return wrap;\n }", "Builder addAudio(String value);", "public String getHeader() {\n\t\treturn header.toString();\n\t}", "protected byte[] readRecordData(RecordHeader header) throws IOException {\n byte[] buf = new byte[header.dataCount];\n file.seek(header.dataPointer);\n file.readFully(buf);\n return buf;\n }", "public AudioFormat getFormat() {\n return format;\n }", "Builder addAudio(AudioObject value);", "public Integer getAudioResourceId(){\n return mAudioResourceid;\n }", "public boolean readHeader(final boolean loadTagBuffer) throws IOException {\r\n int[] extents;\r\n String type, // type of data; there are 7, see FileInfoDicom\r\n name; // string representing the tag\r\n\r\n boolean endianess = FileBase.LITTLE_ENDIAN; // all DICOM files start as little endian (tags 0002)\r\n boolean flag = true;\r\n\r\n if (loadTagBuffer == true) {\r\n loadTagBuffer();\r\n }\r\n\r\n String strValue = null;\r\n Object data = null;\r\n FileDicomSQ sq = null;\r\n\r\n try {\r\n extents = new int[2];\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n throw new IOException(\"Out of Memory in FileDicom.readHeader\");\r\n }\r\n\r\n metaGroupLength = 0;\r\n elementLength = 0;\r\n fileInfo.setEndianess(endianess);\r\n\r\n skipBytes(ID_OFFSET); // Find \"DICM\" tag\r\n\r\n // In v. 3.0, within the ID_OFFSET is general header information that\r\n // is not encoded into data elements and not present in DICOM v. 2.0.\r\n // However, it is optional.\r\n\r\n if ( !getString(4).equals(\"DICM\")) {\r\n fileInfo.containsDICM = false;\r\n seek(0); // set file pointer to zero\r\n }\r\n\r\n fileInfo.setDataType(ModelStorageBase.SHORT); // Default file type\r\n\r\n final FileDicomTagTable tagTable = fileInfo.getTagTable();\r\n\r\n while (flag == true) {\r\n\r\n int bPtrOld = bPtr;\r\n boolean isPrivate = false;\r\n if (fileInfo.containsDICM) {\r\n\r\n // endianess is defined in a tag and set here, after the transfer\r\n // syntax group has been read in\r\n if (getFilePointer() >= (ID_OFFSET + 4 + metaGroupLength)) {\r\n endianess = fileInfo.getEndianess();\r\n // Preferences.debug(\"endianess = \" + endianess + \"\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n } else {\r\n\r\n if (getFilePointer() >= metaGroupLength) {\r\n endianess = fileInfo.getEndianess();\r\n }\r\n }\r\n\r\n // ******* Gets the next element\r\n getNextElement(endianess); // gets group, element, length\r\n name = convertGroupElement(groupWord, elementWord);\r\n\r\n if (name.equals(\"2005,140F\")) {\r\n System.out.println(\"Begin debug analysis.\");\r\n }\r\n\r\n final FileDicomKey key = new FileDicomKey(name);\r\n int tagVM;\r\n\r\n // Preferences.debug(\"group = \" + groupWord + \" element = \" + elementWord + \" length = \" +\r\n // elementLength + \"\\n\", Preferences.DEBUG_FILEIO);\r\n\r\n if ( (fileInfo.vr_type == FileInfoDicom.IMPLICIT) || (groupWord == 2)) {\r\n\r\n // implicit VR means VR is based on tag as defined in dictionary\r\n type = DicomDictionary.getType(key);\r\n tagVM = DicomDictionary.getVM(key);\r\n\r\n // the tag was not found in the dictionary..\r\n if (type == null) {\r\n type = \"typeUnknown\";\r\n tagVM = 0;\r\n }\r\n } else { // Explicit VR\r\n // System.err.println(\"Working with explicit: \"+key);\r\n\r\n type = FileDicomTagInfo.getType(new String(vr));\r\n\r\n if ( !DicomDictionary.containsTag(key)) { // a private tag\r\n tagVM = 0;\r\n isPrivate = true;\r\n } else { // not a private tag\r\n\r\n final FileDicomTagInfo info = DicomDictionary.getInfo(key);\r\n // this is required if DicomDictionary contains wild card characters\r\n info.setKey(key);\r\n tagVM = info.getValueMultiplicity();\r\n }\r\n }\r\n\r\n if ( (elementWord == 0) && (elementLength == 0)) { // End of file\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Unexpected end of file: \" + fileName\r\n + \" Unable to load image.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n if ( (getFilePointer() & 1) != 0) { // The file location pointer is at an odd byte number\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Input file corrupted. Unable to load image.\");\r\n }\r\n\r\n // System.err.println(\"name: \"+ name + \" , len: \" + Integer.toString(elementLength, 0x10));\r\n System.err.println(\"ERROR CAUSED BY READING IMAGE ON ODD BYTE\");\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n try {\r\n bPtrOld = bPtr;\r\n if (type.equals(\"typeString\")) {\r\n strValue = getString(elementLength);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\") && !name.equals(\"0028,1202\")\r\n && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n data = getShort(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeInt\")) {\r\n data = getInteger(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeFloat\")) {\r\n data = getFloat(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeDouble\")) {\r\n data = getDouble(tagVM, elementLength, endianess);\r\n }\r\n // (type == \"typeUnknown\" && elementLength == -1) Implicit sequence tag if not in DICOM dictionary.\r\n else if (type.equals(\"typeSequence\") || ( (type == \"typeUnknown\") && (elementLength == -1))) {\r\n final int len = elementLength;\r\n\r\n // save these values because they'll change as the sequence is read in below.\r\n Preferences.debug(\"Sequence Tags: (\" + name + \"); length = \" + len + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n sq = (FileDicomSQ) getSequence(endianess, len, name);\r\n sequenceTags.put(key, sq);\r\n // System.err.print( \"SEQUENCE DONE: Sequence Tags: (\" + key + \")\"+\" \"+type);\r\n // Integer.toString(len, 0x10) + \"\\n\");\r\n\r\n try {\r\n\r\n } catch (final NullPointerException e) {\r\n System.err.println(\"Null pointer exception while setting value. Trying to put new tag.\");\r\n }\r\n Preferences.debug(\"Finished sequence tags.\\n\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n // check if private\r\n if (isPrivate) {\r\n if (type.equals(\"typeString\")) {\r\n privateTags.put(key, strValue);\r\n } else if ( !type.equals(\"typeSequence\")) {\r\n privateTags.put(key, data);\r\n } else {\r\n privateTags.put(key, sq);\r\n }\r\n }\r\n\r\n // check if should anonymize, note user can specify private tags to anonymize\r\n if (tagExistInAnonymizeTagIDs(key.toString())) {\r\n\r\n // System.out.print(\"Writing \"+key+\"\\t\");\r\n\r\n final long raPtrOld = raFile.getFilePointer();\r\n if (type.equals(\"typeString\")) {\r\n\r\n // System.out.println(strValue);\r\n anonymizeTags.put(key, strValue);\r\n String anonStr = \"\";\r\n if (key.equals(\"0008,0014\") || key.equals(\"0008,0018\") || key.equals(\"0020,000E\")\r\n || key.equals(\"0020,000D\") || key.equals(\"0020,0010\") || key.equals(\"0020,0052\")) {\r\n final Random r = new Random();\r\n\r\n for (int i = 0; i < strValue.length(); i++) {\r\n if (strValue.charAt(i) == '.') {\r\n anonStr = anonStr + \".\";\r\n } else if (key.equals(\"0008,0018\")) {\r\n anonStr = anonStr + r.nextInt(10);\r\n } else {\r\n anonStr = anonStr + \"1\";\r\n }\r\n }\r\n } else {\r\n for (int i = 0; i < strValue.length(); i++) {\r\n anonStr = anonStr + \"X\";\r\n }\r\n }\r\n\r\n raFile.seek(bPtrOld);\r\n raFile.writeBytes(anonStr); // non-anon would be strValue\r\n raFile.seek(raPtrOld);\r\n System.out.println(\"Writing \" + strValue + \" to \" + bPtrOld + \". Returned raPtr to \"\r\n + raPtrOld);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\")\r\n && !name.equals(\"0028,1202\") && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Short || data instanceof Integer) {\r\n writeShort((short) 0, endianess);\r\n } else if (data instanceof Short[] || data instanceof Integer[]) {\r\n if (data instanceof Integer[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Short[]) data).length; i++) {\r\n writeShort((short) 0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeInt\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Integer) {\r\n writeInt(0, endianess);\r\n } else if (data instanceof Integer[]) {\r\n for (int i = 0; i < ((Integer[]) data).length; i++) {\r\n writeInt(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeFloat\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Float) {\r\n writeFloat(0, endianess);\r\n } else if (data instanceof Float[] || data instanceof Double[]) {\r\n if (data instanceof Double[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Float[]) data).length; i++) {\r\n writeFloat(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeDouble\")) {\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Double) {\r\n writeDouble(0, endianess);\r\n } else if (data instanceof Double[]) {\r\n for (int i = 0; i < ((Double[]) data).length; i++) {\r\n writeDouble(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n }\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException();\r\n }\r\n\r\n if (name.equals(\"0002,0000\")) { // length of the transfer syntax group\r\n\r\n if (data != null) {\r\n metaGroupLength = ((Integer) (data)).intValue() + 12; // 12 is the length of 0002,0000 tag\r\n }\r\n\r\n Preferences.debug(\"metalength = \" + metaGroupLength + \" location \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else if (name.equals(\"0018,602C\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 0);\r\n } else if (name.equals(\"0018,602E\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 1);\r\n } else if (name.equals(\"0002,0010\")) {\r\n\r\n // Transfer Syntax UID: DICOM part 10 page 13, part 5 p. 42-48, Part 6 p. 53\r\n // 1.2.840.10008.1.2 Implicit VR Little Endian (Default)\r\n // 1.2.840.10008.1.2.1 Explicit VR Little Endian\r\n // 1.2.840.10008.1.2.2 Explicit VR Big Endian\r\n // 1.2.840.10008.1.2.4.50 8-bit Lossy JPEG (JPEG Coding Process 1)\r\n // 1.2.840.10008.1.2.4.51 12-bit Lossy JPEG (JPEG Coding Process 4)\r\n // 1.2.840.10008.1.2.4.57 Lossless JPEG Non-hierarchical (JPEG Coding Process 14)\r\n // we should bounce out if we don't support this transfer syntax\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.IMPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.1\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Big Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.BIG_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().startsWith(\"1.2.840.10008.1.2.4.\")) { // JPEG\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = true;\r\n\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2.4.57\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.58\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.65\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.66\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.70\")) {\r\n lossy = false;\r\n } else {\r\n lossy = true;\r\n }\r\n } else {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue + \" unknown!\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"MIPAV does not support transfer syntax:\\n\" + strValue);\r\n }\r\n\r\n flag = false; // break loop\r\n\r\n return false; // couldn't read it!\r\n }\r\n } else if (name.equals(FileDicomInner.IMAGE_TAG)) { // && elementLength!=0) { // The image.\r\n System.out.println(\"Reading \" + name + \" image data\");\r\n // This complicated code determines whether or not the offset is correct for the image.\r\n // For that to be true, (height * width * pixel spacing) + the present offset should equal\r\n // the length of the file. If not, 4 might need to be added (I don't know why). If not again,\r\n // the function returns false.\r\n\r\n final int imageLength = extents[0] * extents[1] * fileInfo.bitsAllocated / 8;\r\n\r\n Preferences.debug(\"File Dicom: readHeader - Data tag = \" + FileDicomInner.IMAGE_TAG + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - imageLength = \" + imageLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - getFilePointer = \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n } else {\r\n fileInfo.displayType = fileInfo.getDataType();\r\n }\r\n\r\n if ( !encapsulated) {\r\n // System.err.println( \"\\n\" +\r\n // Long.toString(getFilePointer()) + \" \" +\r\n // Long.toString(raFile.length()) +\r\n // \" image length = \" + imageLength );\r\n\r\n long fileEnd;\r\n\r\n if (loadTagBuffer == true) {\r\n fileEnd = raFile.length();\r\n } else {\r\n fileEnd = fLength;\r\n }\r\n\r\n if ( (imageLength + getFilePointer()) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer()); // Mark where the image is\r\n }\r\n // I think the extra 4 bytes is for explicit tags!!\r\n // see Part 5 page 27 1998\r\n else if ( (imageLength + getFilePointer() + 4) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer() + 4);\r\n } else {\r\n\r\n // Preferences.debug( \"File Dicom: readHeader: xDim = \" + extents[0] + \" yDim = \" +\r\n // extents[1] +\r\n // \" Bits allocated = \" + fileInfo.bitsAllocated, 2);\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Image not at expected offset.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n } else { // encapsulated\r\n fileInfo.setOffset( (getFilePointer() - 12));\r\n }\r\n\r\n fileInfo.setExtents(extents);\r\n flag = false; // break loop\r\n } else if (type.equals(\"typeUnknown\")) { // Private tag, may not be reading in correctly.\r\n\r\n try {\r\n\r\n // set the value if the tag is in the dictionary (which means it isn't private..) or has already\r\n // been put into the tag table without a value (private tag with explicit vr)\r\n if (DicomDictionary.containsTag(key) || tagTable.containsTag(key)) {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note unknown data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n } else {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note private data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n privateTags.put(key, obj);\r\n\r\n // tagTable\r\n // .putPrivateTagValue(new FileDicomTagInfo(key, null, tagVM, \"PrivateTag\", \"Private Tag\"));\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n\r\n Preferences.debug(\"Group = \" + groupWord + \" element = \" + elementWord + \" Type unknown\"\r\n + \"; value = \" + strValue + \"; element length = \" + elementLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory error while reading \\\"\" + fileName\r\n + \"\\\".\\nThis may not be a DICOM image.\");\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException(\"Out of memory storing unknown tags in FileDicom.readHeader\");\r\n } catch (final NullPointerException npe) {\r\n System.err.println(\"name: \" + name);\r\n System.err.print(\"no hashtable? \");\r\n System.err.println(tagTable == null);\r\n throw npe;\r\n }\r\n }\r\n }\r\n // Done reading tags\r\n\r\n String photometricInterp = null;\r\n\r\n if (tagTable.getValue(\"0028,0004\") != null) {\r\n fileInfo.photometricInterp = ((String) (tagTable.getValue(\"0028,0004\"))).trim();\r\n photometricInterp = fileInfo.photometricInterp.trim();\r\n }\r\n\r\n if (photometricInterp == null) { // Default to MONOCROME2 and hope for the best\r\n photometricInterp = new String(\"MONOCHROME2\");\r\n }\r\n\r\n if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.BYTE);\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.USHORT);\r\n fileInfo.displayType = ModelStorageBase.USHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP) && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.SHORT);\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n }\r\n // add something for RGB DICOM images - search on this !!!!\r\n else if (photometricInterp.equals(\"RGB\") && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"YBR_FULL_422\") && (fileInfo.bitsAllocated == 8) && encapsulated) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"PALETTE COLOR\")\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n\r\n final int[] dimExtents = new int[2];\r\n dimExtents[0] = 4;\r\n dimExtents[1] = 256;\r\n lut = new ModelLUT(ModelLUT.GRAY, 256, dimExtents);\r\n\r\n for (int q = 0; q < dimExtents[1]; q++) {\r\n lut.set(0, q, 1); // the alpha channel is preloaded.\r\n }\r\n // sets the LUT to exist; we wait for the pallete tags to\r\n // describe what the lut should actually look like.\r\n } else {\r\n Preferences.debug(\"File DICOM: readImage() - Unsupported pixel Representation\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (raFile != null) {\r\n raFile.close();\r\n }\r\n\r\n return false;\r\n }\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n // a bit of a hack - indicates Model image should be reallocated to float for PET image the data is\r\n // stored\r\n // as 2 bytes (short) but is \"normalized\" using the slope parameter required for PET images (intercept\r\n // always 0 for PET).\r\n }\r\n\r\n if ( ( (fileInfo.getDataType() == ModelStorageBase.UBYTE) || (fileInfo.getDataType() == ModelStorageBase.USHORT))\r\n && (fileInfo.getRescaleIntercept() < 0)) {\r\n // this performs a similar method as the pet adjustment for float images stored on disk as short to read\r\n // in\r\n // signed byte and signed short images stored on disk as unsigned byte or unsigned short with a negative\r\n // rescale intercept\r\n if (fileInfo.getDataType() == ModelStorageBase.UBYTE) {\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n } else if (fileInfo.getDataType() == ModelStorageBase.USHORT) {\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1201\") != null) {\r\n // red channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1201\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1202\") != null) {\r\n\r\n // green channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1202\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1203\") != null) {\r\n\r\n // blue channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1203\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n\r\n // here we make the lut indexed because we know that\r\n // all the LUT tags are in the LUT.\r\n lut.makeIndexedLUT(null);\r\n }\r\n\r\n hasHeaderBeenRead = true;\r\n\r\n if ( (loadTagBuffer == true) && (raFile != null)) {\r\n raFile.close();\r\n }\r\n\r\n return true;\r\n }", "public byte[] getLsAckAsByteArray() {\n List<Byte> headerLst = new ArrayList<>();\n try {\n headerLst.add((byte) this.ospfVersion());\n headerLst.add((byte) this.ospfType());\n headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.ospfPacLength())));\n headerLst.addAll(Bytes.asList(this.routerId().toOctets()));\n headerLst.addAll(Bytes.asList(this.areaId().toOctets()));\n headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.checksum())));\n headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.authType())));\n //Authentication is 0 always. Total 8 bytes consist of zero\n byte[] auth = new byte[OspfUtil.EIGHT_BYTES];\n headerLst.addAll(Bytes.asList(auth));\n } catch (Exception e) {\n log.debug(\"Error::LsAckPacket:: {}\", e.getMessage());\n return Bytes.toArray(headerLst);\n }\n\n return Bytes.toArray(headerLst);\n }", "public abstract String[] getMimeHeader(String name);", "public String getHeader() {\n\t\t\treturn header;\n\t\t}", "protected void loadMockData() {\n\n int ctr;\n InputStream inputStream = getResources().openRawResource(R.raw.song_list);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n\n try {\n ctr = inputStream.read();\n while (ctr != -1) {\n byteArrayOutputStream.write(ctr);\n ctr = inputStream.read();\n }\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Parse the data.\n try {\n JSONObject jObject = new JSONObject(byteArrayOutputStream.toString());\n\n String status_code = jObject.getString(\"statusCode\");\n\n if (status_code.equalsIgnoreCase(\"200\")) {\n JSONArray jArray = jObject.getJSONArray(\"data\");\n\n audioList = new ArrayList<>();\n\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject song = jArray.getJSONObject(i);\n\n String genre = song.getString(\"genre\");\n String album = song.getString(\"album\");\n String author = song.getString(\"author\");\n String title = song.getString(\"title\");\n String url = song.getString(\"url\");\n String imgUrl = song.getString(\"img\");\n\n Audio audio = new Audio(genre, album, author, title, url, imgUrl);\n\n // Save to audioList.\n audioList.add(audio);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public int decodeAudio(String url) {\n return 0;\n }", "abstract String getSound();", "public AUID getSoundCompression()\r\n\t\tthrows PropertyNotPresentException;", "public static byte[] getHeader(byte[] commandAPDU) {\n\tif (commandAPDU.length < 4) {\n\t throw new IllegalArgumentException(\"Malformed APDU\");\n\t}\n\n\treturn ByteUtils.copy(commandAPDU, 0, 4);\n }", "public String getHeaderType() { return \"modem\"; }", "public int getmAudioResourceId() {\n\n return mAudioResourceId;\n }", "public int getAudiobitrate() {\n return audiobitrate;\n }", "public String[] getHeader(String name) throws MessagingException {\n/* 363 */ if (this.headers == null)\n/* 364 */ loadHeaders(); \n/* 365 */ return this.headers.getHeader(name);\n/* */ }", "public String getHeader1() {\n return header1;\n }" ]
[ "0.7569159", "0.6316945", "0.6164939", "0.6133263", "0.60715824", "0.6058372", "0.5995128", "0.5981121", "0.59622616", "0.5876492", "0.5846341", "0.5740242", "0.5718057", "0.5655208", "0.5650394", "0.5648176", "0.5642845", "0.563615", "0.5634637", "0.56195635", "0.5610831", "0.5596465", "0.55939716", "0.55729145", "0.5560694", "0.5550542", "0.55439633", "0.5536498", "0.5507767", "0.5487938", "0.5469902", "0.5469299", "0.5463482", "0.5453662", "0.5438621", "0.5427833", "0.54252094", "0.5383043", "0.5378567", "0.53640044", "0.5350146", "0.5346322", "0.5342658", "0.53318286", "0.5322659", "0.53212017", "0.5310825", "0.530923", "0.5286008", "0.5282847", "0.5282847", "0.52751946", "0.5270531", "0.5267602", "0.5260799", "0.5240974", "0.52240825", "0.5218858", "0.521724", "0.5213933", "0.5210787", "0.51840883", "0.5182743", "0.5182043", "0.5175334", "0.5158122", "0.5156883", "0.5150218", "0.51449215", "0.51338834", "0.512886", "0.51071024", "0.5104655", "0.5102811", "0.510079", "0.5094109", "0.50914127", "0.5086463", "0.50815004", "0.50808", "0.5080302", "0.50779325", "0.5072753", "0.5060999", "0.5060367", "0.5044243", "0.5039833", "0.50281614", "0.5020024", "0.501828", "0.5010771", "0.50037646", "0.50028384", "0.4998756", "0.49939707", "0.49913654", "0.49899343", "0.49892443", "0.49828187", "0.4979938" ]
0.7120864
1
base case goes here make a random color here draw lines to make a triangle or use fillPolygon make some recursive calls
public void gasket(Graphics window, int x1, int y1, int x2, int y2, int x3, int y3) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void drawFill();", "private void init(Point[] points, int color) {\n // Set paint\n paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n paint.setColor(color);\n\n setPadding(50,50,50,50);\n setBackgroundColor(Color.TRANSPARENT);\n\n // Create path for triangle\n path = new Path();\n path.setFillType(Path.FillType.EVEN_ODD);\n // Draw triangle\n path.moveTo(points[0].x, points[0].y);\n path.lineTo(points[1].x,points[1].y);\n path.lineTo(points[2].x,points[2].y);\n path.lineTo(points[0].x,points[0].y);\n path.close();\n }", "public void drawGrid(Graphics g)\n {\n //g.setColor(Color.GREEN);\n \n \n if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor); \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n else\n { \n if(lastpowerUp.equals(\"BLUE\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray); \n } \n else if(difficult.equals(\"GHOST\"))\n g.setColor(Color.WHITE);\n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n }", "private void paint(int sideLength) {\n\n float fac = randomStart;\n while (sideLength >= 2) {\n\n for (int py = 0; py < _height; py += sideLength) {\n for (int px = 0; px < _width; px += sideLength) {\n // fetch corner colors\n float c1 = mono[repeat(px, py, _width, _height)];\n float c3 = mono[repeat(px + sideLength, py, _width, _height)];\n float c7 = mono[repeat(px, py + sideLength, _width, _height)];\n float c9 = mono[repeat(px + sideLength, py + sideLength, _width,\n _height)];\n\n int shortX = px / sideLength; \n int shortY = py / sideLength; \n \n \n float c2 = (c1 + c3) / 2 + calcFac(fac, shortX, shortY);\n float c4 = (c1 + c7) / 2 + calcFac(fac, shortX, shortY);\n float c5 = (c1 + c3 + c7 + c9) / 4 + calcFac(fac, shortX, shortY);\n\n mono[repeat(px + sideLength / 2, py, _width, _height)] = c2;\n mono[repeat(px, py + sideLength / 2, _width, _height)] = c4;\n mono[repeat(px + sideLength / 2, py + sideLength / 2, _width, _height)] = c5;\n }\n }\n\n fac = fac * randomFactor + randomSummand;\n\n sideLength /= 2;\n }\n }", "void lineTestPattern2()\n\t{\n\t float theta,d_theta,d_petal,petal,radius,p;\n\t int cx,cy;\n\t int i;\n\t int n_steps =( Nsteps == 18 )?64:4*Nsteps;\n\t Point2D v0 = new Point2D(),v1 = new Point2D();\n\n\t d_theta = (float)(2.0*Math.PI / n_steps);\n\t d_petal = (float)(12.0*Math.PI / n_steps);\n\n\t cx = buff.getWidth()/2;\n\t cy = buff.getHeight()/2;\n\n\t radius = (float) (0.75 * ((cx < cy) ? cx : cy));\n\t p = (float) (radius*0.25);\n\n\t /* draw the outer petals first */\n\n\t v0.x = cx;\n\t v0.y = (int)Math.floor(0.5 + radius + p) + cy;\n\t v0.c.r = 1;\n\t v0.c.g = (float) (128+Math.sin(2*Math.PI)*127.0)/255.0f;\n\t v0.c.b = (float) (128+Math.cos(2*Math.PI)*127.0)/255.0f;\n\n\t for(petal=d_petal,theta=d_theta,i=0;i<=n_steps;++i,theta+=d_theta,petal+=d_petal)\n\t {\n\t v1.x = (int)Math.floor(0.5 + radius*Math.sin(theta) + p*Math.sin(petal)) + cx;\n\t v1.y = (int)Math.floor(0.5 + radius*Math.cos(theta) + p*Math.cos(petal)) + cy;\n\n\t v1.c.r = 1;\n\t v1.c.g = (float) ((128+Math.sin(theta*5)*127.0)/255.0f);\n\t v1.c.b = (float) ((128+Math.cos(theta*5)*127.0)/255.0f);\n\t SketchBase.drawLine(buff,v0,v1);\n\n\t v0.x = v1.x;\n\t v0.y = v1.y;\n\t v0.c = v1.c;\n\t }\n\n\t /* draw circle at center */\n\t radius *= 0.5;\n\t v0.x = cx;\n\t v0.y = (int)Math.floor(0.5 + radius) + cy;\n\n\t /* color = orange */\n\t v1.c.r = v0.c.r = 1;\n\t v1.c.g = v0.c.g = 97.0f/255.0f;\n\t v1.c.b = v0.c.b = 0; \n\n\t for(theta=d_theta,i=0;i<=n_steps;++i,theta+=d_theta)\n\t {\n\t v1.x = (int)Math.floor(0.5 + radius*Math.sin(theta)) + cx;\n\t v1.y = (int)Math.floor(0.5 + radius*Math.cos(theta)) + cy;\n\n\t SketchBase.drawLine(buff,v0,v1);\n\n\t v0.x = v1.x;\n\t v0.y = v1.y;\n\t }\n\t}", "public void makeRandColor(){}", "public void generete() {\n int minQuantFig = 1,\r\n maxQuantFig = 10,\r\n minNum = 1,\r\n maxNum = 100,\r\n minColor = 0,\r\n maxColor = (int)colors.length - 1,\r\n\r\n // Initialize figures property for random calculations\r\n randomColor = 0,\r\n randomFigure = 0,\r\n\r\n // Squere property\r\n randomSideLength = 0,\r\n\r\n // Circle property\r\n randomRadius = 0,\r\n \r\n // IsoscelesRightTriangle property \r\n randomHypotenus = 0,\r\n \r\n // Trapizoid properties\r\n randomBaseA = 0,\r\n randomBaseB = 0,\r\n randomAltitude = 0;\r\n\r\n // Generate random number to set figueres's quantaty\r\n setFigureQuantaty( generateWholoeNumInRange(minQuantFig, maxQuantFig) );\r\n\r\n for( int i = 0; i < getFigureQuantaty(); i++ ) {\r\n\r\n // Convert double random value to int and close it in range from 1 to number of elements in array\r\n randomFigure = (int)( Math.random() * figures.length );\r\n \r\n randomColor = generateWholoeNumInRange( minColor, maxColor ); // Get random color's index from colors array\r\n\r\n // Create new figure depending on randomFigure \r\n switch (figures[randomFigure]) {\r\n\r\n case \"Circle\":\r\n\r\n randomRadius = generateWholoeNumInRange( minNum, maxNum ); // Get random value of circle's radius;\r\n\r\n Circle newCircle = new Circle( colors[randomColor], randomRadius ); // Initialize Circle with random parameters\r\n\r\n newCircle.drawFigure();\r\n \r\n break;\r\n\r\n case \"Squere\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n Squere newSquere = new Squere( colors[randomColor], randomSideLength ); // Initialize Circle with random parameters\r\n\r\n newSquere.drawFigure();\r\n\r\n break;\r\n\r\n case \"Triangle\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n randomHypotenus = generateWholoeNumInRange( minNum, maxNum ); // Get random value of hypotenus;\r\n\r\n IsoscelesRightTriangle newTriangle = new IsoscelesRightTriangle( colors[randomColor], randomSideLength, randomHypotenus ); // Initialize Circle with random parameters\r\n\r\n newTriangle.drawFigure();\r\n\r\n break;\r\n\r\n case \"Trapezoid\":\r\n\r\n randomBaseA = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side A;\r\n\r\n randomBaseB = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side B;\r\n\r\n randomAltitude = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's altitude;\r\n\r\n Trapezoid newTrapezoid = new Trapezoid( colors[randomColor], randomBaseA, randomBaseB, randomAltitude ); // Create new Trapezoid with random parameters\r\n\r\n newTrapezoid.drawFigure();\r\n\r\n break;\r\n\r\n };\r\n };\r\n }", "void drawShape() {\n System.out.println(\"Drawing Triangle\");\n this.color.addColor();\n }", "@Override\n\t\tpublic void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tsetBackground(Color.gray);\n\n\t\t\tif (points != null) {\n\t\t\t\tPoint lastPoint = null;\n\t\t\t\tint step = 0;\n\t\t\t\tfor (Point p : points) {\n\t\t\t\t\tint shade = 255 * step / points.length;\n\t\t\t\t\tstep++;\n\t\t\t\t\tg.setColor(new Color(shade, 0, 255 - shade));\n\n\t\t\t\t\t// Draw the point, and maybe connect to the previous point\n\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\tint jiggleX = (int) (jiggleFactor * Math.random() - jiggleFactor / 2);\n\t\t\t\t\t\tint jiggleY = (int) (jiggleFactor * Math.random() - jiggleFactor / 2);\n\n\t\t\t\t\t\tg.fillOval(p.x + jiggleX - diameter / 2, p.y + jiggleY\n\t\t\t\t\t\t\t\t- diameter / 2, diameter, diameter);\n\t\t\t\t\t\tif (connectTheDots) {\n\t\t\t\t\t\t\tif (lastPoint != null)\n\t\t\t\t\t\t\t\tg.drawLine(lastPoint.x, lastPoint.y, p.x, p.y);\n\t\t\t\t\t\t\tlastPoint = p;\n\t\t\t\t\t\t}\n\t\t\t\t\t} // end of drawing one point\n\t\t\t\t} // End of loop that draws all points\n\t\t\t} // end of non-null logic\n\t\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 }", "private void drawMiniTriangle(int[] xPoints, int[] yPoints, int rgbVal, int rgbColor) {\n\t\tif (rgbColor == RED) {\n\t\t\tthis.canvas.setPenColor(rgbVal, 255, 255);\n\t\t} else if (rgbColor == BLUE) {\n\t\t\tthis.canvas.setPenColor(255, rgbVal, 255);\n\t\t} else {\n\t\t\tthis.canvas.setPenColor(255, 255, rgbVal);\n\t\t}\n\t\tColor color = this.canvas.getPenColor();\n\t\t// System.out.println(color.getRed() + \" \" + color.getGreen() + \" \" + color.getBlue());\n\t\tthis.canvas.fillPoly(xPoints, yPoints, NUM_TRIANGLE_SIDES);\n\t}", "public void paint(Graphics g)\n {\n int X_x;\n int X_y;\n int Y_x;\n int Y_y;\n int Z_x;\n int Z_y;\n\n X_x = 0;\n X_y = 0;\n Y_x = 500;\n Y_y = 0;\n Z_x = 250;\n Z_y = 500;\n\n int currentX = X_x;\n int currentY = X_y;\n int targetX, targetY;\n int midwayX, midwayY;\n Random r = new Random();\n\n for(int i = 0; i < 10000; i++)\n {\n int random = r.nextInt(3);\n if(random == 0)\n {\n targetX = X_x;\n targetY = X_y;\n }\n else if(random == 1)\n {\n targetX = Y_x;\n targetY = Y_y;\n }\n else\n {\n targetX = Z_x;\n targetY = Z_y;\n }\n\n //halfway between\n currentX = (targetX + currentX) / 2;\n currentY = (targetY + currentY) / 2;\n g.drawLine(currentX, currentY, currentX, currentY);\n }\n }", "private void randomiseColors() {\n \t// Give the star a random color for normal circumstances...\n \tcolor.set((float) Random.nextDouble(),\n \t\t\t(float) Random.nextDouble(), (float) Random.nextDouble());\n \n // When the star is twinkling, we draw it twice, once in the color below \n // (not spinning) and then once in the main color defined above.\n twinkleColor.set((float) Random.nextDouble(),\n \t\t(float) Random.nextDouble(), (float) Random.nextDouble());\n }", "@Override\n public void render(Graphics2D g2) {\n g2.setColor(super.getColor());\n g2.fillPolygon(triangleFill);\n }", "@Override\n protected void paintComponent(Graphics g) \n {\n super.paintComponent(g); //calling paintComponent method\n g.clearRect(this.getX(),this.getY(),this.getWidth(),this.getHeight());\n g.fillRect(this.getX(),this.getY(),this.getWidth(),this.getHeight());\n g.setColor(Color.BLACK);\n this.repaint(); \n if(randInt==null) return; //check if array is null\n for(int i = 0;i <this.getWidth();i++) // drawing the lines using graphics\n {\n g.setColor(Color.RED);\n g.drawLine(i,randInt[i],i,this.getHeight() );\n }\n }", "private void drawT(int[] xPoints,int[] yPoints,boolean condition){\r\n if(condition)\r\n g.setColor(Color.red); \r\n else\r\n g.setColor(Color.gray); \r\n g.fillPolygon(xPoints,yPoints,3);\r\n g.setColor(Color.black);\r\n g.drawPolygon(xPoints,yPoints,3); \r\n }", "public void paintComponent(Graphics g){\n\r\n int x, y, w, h, clientWidth, clientHeight;\r\n double scale;\r\n float rC, gC, bC;\r\n Color c = new Color(0F, 0F, 0F);\r\n boolean clipped, tooSmall;\r\n\r\n Graphics2D g2 = (Graphics2D) g;\r\n\r\n clientWidth = getSize().width;\r\n clientHeight = getSize().height;\r\n\r\n\r\n for (int i = 1; i <= 200; i++){\r\n x = (int)(Math.floor(Math.random() * clientWidth));\r\n y = (int)(Math.floor(Math.random() * clientHeight));\r\n\r\n scale = 0.2;\r\n w = (int)(scale * Math.floor(Math.random() * getSize().width));\r\n h = (int)(scale * Math.floor(Math.random() * getSize().height));\r\n\r\n g2.setColor(colors[i % 7]);\r\n\r\n clipped = (x > clientWidth - w) || (y > clientHeight - h);\r\n tooSmall = (w < 0.2 * scale * clientWidth) || (h < 0.2 * scale * clientHeight);\r\n\r\n if (clipped || tooSmall) //prevent clipping\r\n i--; // dangerous hack\r\n else\r\n g2.fillOval(x, y, w, h);\r\n\r\n }\r\n\r\n\r\n\r\n //strokeWidth = (int)(Math.floor(Math.random() * 10));\r\n //g2.setStroke(new BasicStroke(strokeWidth));\r\n\r\n //g2.setColor(new Color(rC, gC, bC));\r\n\r\n //g2.drawLine(sx, sy, ex, ey);\r\n }", "public void drawSelector(int x) {\n int currentTime = millis() / 100;\n noStroke();\n if (currentTime % 13 == 0) {\n fill(200, 200, 100, 30);\n }\n else if (currentTime % 13 == 1) {\n fill(200, 200, 100, 40);\n }\n else if (currentTime % 13 == 2) {\n fill(200, 200, 100, 50);\n }\n else if (currentTime % 13 == 3) {\n fill(200, 200, 100, 60);\n }\n else if (currentTime % 13 == 4) {\n fill(200, 200, 100, 70);\n }\n else if (currentTime % 13 == 5) {\n fill(200, 200, 100, 80);\n }\n else if (currentTime % 13 == 6) {\n fill(200, 200, 100, 90);\n }\n else if (currentTime % 13 == 7) {\n fill(200, 200, 100, 100);\n }\n else if (currentTime % 13 == 8) {\n fill(200, 200, 100, 110);\n }\n else if (currentTime % 13 == 9) {\n fill(200, 200, 100, 120);\n }\n else if (currentTime % 13 == 10) {\n fill(200, 200, 100, 130);\n }\n else if (currentTime % 13 == 11) {\n fill(200, 200, 100, 140);\n }\n else if (currentTime % 13 == 12) {\n fill(200, 200, 100, 150);\n }\n else {\n fill(255, 200, 100);\n }\n switch(x){\n case 1:\n beginShape();\n vertex(80, 330);\n vertex(50, 360);\n vertex(80, 350);\n vertex(110, 360);\n endShape();\n break;\n case 2:\n beginShape();\n vertex(370, 330);\n vertex(340, 360);\n vertex(370, 350);\n vertex(400, 360);\n endShape();\n break;\n case 3:\n beginShape();\n vertex(80, 600);\n vertex(50, 630);\n vertex(80, 620);\n vertex(110, 630);\n endShape();\n break;\n case 4:\n beginShape();\n vertex(370, 600);\n vertex(340, 630);\n vertex(370, 620);\n vertex(400, 630);\n endShape();\n break;\n }\n\n}", "private void lineColor() {\n\n\t}", "public void fillTriangle(int px1, int py1, int px2, int py2, int px3, \n int py3, int color) {\n \n int[] ordered = new int[6];\n if (!orderByPointY(px1, py1, px2, py2, px3, py3, ordered)) {\n if (!orderByPointY(px2, py2, px1, py1, px3, py3, ordered)) {\n if (!orderByPointY(px3, py3, px2, py2, px1, py1, ordered)) {\n String errorMsg = \"could not order triangle points !\";\n throw new RuntimeException(errorMsg);\n }\n }\n }\n px1 = ordered[0]; py1 = ordered[1];\n px2 = ordered[2]; py2 = ordered[3];\n px3 = ordered[4]; py3 = ordered[5];\n fillHalfTriangle(px1, py1, px2, py2, px3, py3, color, 1); // top\n fillHalfTriangle(px3, py3, px2, py2, px1, py1, color, -1); // down\n }", "public void reset() {\n x = random(-2*width, 3*width); // set the x position\n y = random(-height, 2*height); // set the y position\n c[0] = color(random(150, 255), random(150, 255), random(150, 255)); // set the top color (a bit lighter)\n // randomly set the 4 colors in the base of the shape\n for (int i=1; i<5; i++) {\n c[i] = color(random(255), random(255), random(255)); // random RGB color\n }\n }", "static void fillWithRandomColors() {\n\n for ( int row = 0; row < ROWS; row++ ) {\n for ( int column = 0; column < COLUMNS; column++ ) {\n changeToRandomColor( row, column );\n }\n }\n }", "public void generateColor() {\n if (army < 0)\n color = Color.getHSBColor(0f, 1 - (float) Math.random() * 0.2f, 0.5f + (float) Math.random() * 0.5f);\n else if (army > 0)\n color = Color.getHSBColor(0.7f - (float) Math.random() * 0.2f, 1 - (float) Math.random() * 0.2f, 0.4f + (float) Math.random() * 0.25f);\n else color = Color.getHSBColor(0f, 0, 0.55f + (float) Math.random() * 0.25f);\n }", "public static /* varargs */ Object polygon(Complex initial, Object ... more$Mnpoints) {\n generalPath = new GeneralPath();\n n$Mnpoints = more$Mnpoints.length;\n path.moveTo(numbers.realPart(initial).doubleValue(), numbers.imagPart(initial).doubleValue());\n i = 0;\n do lbl-1000: // 2 sources:\n {\n if (i >= n$Mnpoints) {\n path.closePath();\n return path;\n }\n object2 = Promise.force(more$Mnpoints[i], Complex.class);\n pt = (Complex)object2;\n break;\n } while (true);\n catch (ClassCastException v0) {\n throw new WrongType(v0, \"pt\", -2, object2);\n }\n {\n path.lineTo(numbers.realPart(pt).doubleValue(), numbers.imagPart(pt).doubleValue());\n ++i;\n ** while (true)\n }\n }\n\n public static Composite compositeSrcOver() {\n return gui.compositeSrcOver(1.0f);\n }\n\n public static Composite compositeSrcOver(float alpha) {\n return AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);\n }\n\n public static Composite compositeSrc() {\n return gui.compositeSrc(1.0f);\n }\n\n public static Composite compositeSrc(float alpha) {\n return AlphaComposite.getInstance(AlphaComposite.SRC, alpha);\n }\n\n public static AffineTransform rotation(double theta) {\n return AffineTransform.getRotateInstance(theta);\n }\n\n public static Color asColor(Object value) {\n return value instanceof Color ? (Color)Promise.force(value, Color.class) : (value instanceof Integer ? new Color((Integer)Promise.force(value, Integer.class)) : (value instanceof IntNum ? new Color(IntNum.intValue(value)) : (Color)Promise.force(((Procedure)SlotGet.staticField).apply2(Lit0, value.toString()), Color.class)));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Button button(Object ... args) {\n String name;\n KAttr attr;\n Button button = new Button();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.buttonKeyword(button, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.buttonKeyword(button, name, value);\n ++i;\n continue;\n }\n gui.buttonNonKeyword(button, arg);\n ++i;\n }\n return button;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n static void buttonKeyword(Button button, String name, Object value) {\n if (name == \"foreground\") {\n button.setForeground(gui.asColor(value));\n return;\n }\n if (name == \"background\") {\n button.setBackground(gui.asColor(value));\n return;\n }\n if (name == \"action\") {\n button.setAction(value);\n return;\n }\n if (name == \"text\") {\n Object object2 = Promise.force(value, String.class);\n button.setText((String)(object2 == null ? null : object2.toString()));\n return;\n }\n if (name != \"disabled\") {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown button attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n Object object2 = Promise.force(value);\n try {\n button.setDisabled(KawaConvert.isTrue(object2));\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.kawa.models.Button.setDisabled(boolean)\", 2, object2);\n }\n }\n\n static boolean buttonNonKeyword(Button button, Object arg) {\n return true;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Button Button(Object ... args) {\n String name;\n KAttr attr;\n Button button = new Button();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.buttonKeyword(button, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.buttonKeyword(button, name, value);\n ++i;\n continue;\n }\n gui.buttonNonKeyword(button, arg);\n ++i;\n }\n return button;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Label Label(Object ... args) {\n String name;\n KAttr attr;\n Label instance = new Label();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.labelKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.labelKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.labelNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void labelKeyword(Label instance, String name, Object value) {\n if (name != Lit1) {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown label attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n Object object2 = Promise.force(value, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n static void labelNonKeyword(Label instance, Object arg) {\n Object object2 = Promise.force(arg, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Text Text(Object ... args) {\n String name;\n KAttr attr;\n Text instance = new Text();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.textKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.textKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.textNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void textKeyword(Text instance, String name, Object value) {\n if (name != Lit1) {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown text attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n Object object2 = Promise.force(value, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n static void textNonKeyword(Text instance, Object arg) {\n Object object2 = Promise.force(arg, String.class);\n instance.setText((String)(object2 == null ? null : object2.toString()));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Row Row(Object ... args) {\n String name;\n KAttr attr;\n Row instance = new Row();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.boxKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.boxKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.boxNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void boxKeyword(Box instance, String name, Object value) {\n if (name != Lit2) {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown box attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n instance.setCellSpacing(value);\n }\n\n static void boxNonKeyword(Box box, Object arg) {\n box.add(gui.asModel(arg));\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Column Column(Object ... args) {\n String name;\n KAttr attr;\n Column instance = new Column();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.boxKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.boxKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.boxNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n public static void setContent(Window window, Object pane) {\n window.setContent(pane);\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public static /* varargs */ Window Window(Object ... args) {\n String name;\n KAttr attr;\n Window instance = Display.getInstance().makeWindow();\n int num$Mnargs = args.length;\n int i = 0;\n while (i < num$Mnargs) {\n Object arg = args[i];\n if (arg instanceof Keyword) {\n Object object2 = Promise.force(arg, Keyword.class);\n gui.windowKeyword(instance, ((Keyword)object2).getName(), args[i + 1]);\n i += 2;\n continue;\n }\n if (arg instanceof KAttr) {\n Object object3 = Promise.force(arg, KAttr.class);\n attr = (KAttr)object3;\n name = attr.getName();\n Object value = attr.getObjectValue();\n gui.windowKeyword(instance, name, value);\n ++i;\n continue;\n }\n gui.windowNonKeyword(instance, arg);\n ++i;\n }\n return instance;\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"gnu.expr.Keyword.getName()\", 1, (Object)attr);\n }\n catch (ClassCastException classCastException) {\n throw new WrongType(classCastException, \"attr\", -2, (Object)name);\n }\n }\n\n static void windowKeyword(Window instance, String name, Object value) {\n if (name == \"title\") {\n Object object2 = Promise.force(value, String.class);\n instance.setTitle((String)(object2 == null ? null : object2.toString()));\n } else if (name == \"content\") {\n instance.setContent(value);\n } else if (name == \"menubar\") {\n instance.setMenuBar(value);\n } else {\n Type.NeverReturns neverReturns = exceptions.error(Format.formatToString(0, \"unknown window attribute ~s\", name));\n throw Special.reachedUnexpected;\n }\n }\n\n static void windowNonKeyword(Window instance, Object arg) {\n instance.setContent(arg);\n }\n\n static Model asModel(Object arg) {\n return Display.getInstance().coerceToModel(arg);\n }\n\n public static {\n Lit20 = new Object[0];\n Lit18 = Symbol.valueOf(\"run-application\");\n Lit19 = new SyntaxRules(Lit20, new SyntaxRule[]{new SyntaxRule(new SyntaxPattern(\"\\f\\u0018\\f\\u0007\\b\", Lit20, 1, \"gui.scm:193\"), \"\\u0001\", \"\\u0011\\u0018\\u0004\\b\\u0003\", new Object[]{PairWithPosition.make(Symbol.valueOf(\"$lookup$\"), Pair.make(Symbol.valueOf(\"gnu.kawa.models.Window\"), Pair.make(Pair.make(Symbol.valueOf(\"quasiquote\"), Pair.make(Symbol.valueOf(\"open\"), LList.Empty)), LList.Empty)), \"/mnt/hgfs/trunk/kawaForAndroid/kawa-2.4/gnu/kawa/slib/gui.scm\", 794631)}, 0)}, 1, Lit18);\n Lit17 = Symbol.valueOf(\"Window\");\n Lit16 = Symbol.valueOf(\"set-content\");\n Lit15 = Symbol.valueOf(\"Column\");\n Lit14 = Symbol.valueOf(\"Row\");\n Lit13 = Symbol.valueOf(\"Text\");\n Lit12 = Symbol.valueOf(\"Label\");\n Lit10 = Symbol.valueOf(\"Image\");\n Lit11 = new SyntaxRules(Lit20, new SyntaxRule[]{new SyntaxRule(new SyntaxPattern(\"\\f\\u0018\\u0003\", Lit20, 1, \"gui.scm:87\"), \"\\u0000\", \"\\u0011\\u0018\\u0004\\u0011\\u0018\\f\\u0002\", new Object[]{Symbol.valueOf(\"make\"), Symbol.valueOf(\"<gnu.kawa.models.DrawImage>\")}, 0)}, 1, Lit10);\n Lit9 = Symbol.valueOf(\"Button\");\n Lit8 = Symbol.valueOf(\"button\");\n Lit7 = Symbol.valueOf(\"as-color\");\n Lit6 = Symbol.valueOf(\"rotation\");\n Lit5 = Symbol.valueOf(\"composite-src\");\n Lit4 = Symbol.valueOf(\"composite-src-over\");\n Lit3 = Symbol.valueOf(\"polygon\");\n Lit2 = Symbol.valueOf(\"cell-spacing\");\n Lit1 = Symbol.valueOf(\"text\");\n Lit0 = Color.class;\n $instance = new gui();\n make$MnPoint = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"make$MnPoint\");\n P = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"P\");\n circle = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"circle\");\n fill = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"fill\");\n draw = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"draw\");\n image$Mnread = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"image$Mnread\");\n image$Mnwidth = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"image$Mnwidth\");\n image$Mnheight = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"image$Mnheight\");\n with$Mnpaint = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"with$Mnpaint\");\n with$Mntransform = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"with$Mntransform\");\n with$Mncomposite = StaticFieldLocation.make(\"kawa.lib.kawa.pictures\", \"with$Mncomposite\");\n process$Mnkeywords = StaticFieldLocation.make(\"kawa.lib.kawa.process-keywords\", \"process$Mnkeywords\");\n gui gui2 = $instance;\n polygon = new ModuleMethod(gui2, 1, Lit3, -4095);\n composite$Mnsrc$Mnover = new ModuleMethod(gui2, 2, Lit4, 4096);\n composite$Mnsrc = new ModuleMethod(gui2, 4, Lit5, 4096);\n rotation = new ModuleMethod(gui2, 6, Lit6, 4097);\n as$Mncolor = new ModuleMethod(gui2, 7, Lit7, 4097);\n button = new ModuleMethod(gui2, 8, Lit8, -4096);\n Button = new ModuleMethod(gui2, 9, Lit9, -4096);\n Image = Macro.make(Lit10, Lit11, \"gnu.kawa.slib.gui\");\n Label = new ModuleMethod(gui2, 10, Lit12, -4096);\n Text = new ModuleMethod(gui2, 11, Lit13, -4096);\n Row = new ModuleMethod(gui2, 12, Lit14, -4096);\n Column = new ModuleMethod(gui2, 13, Lit15, -4096);\n set$Mncontent = new ModuleMethod(gui2, 14, Lit16, 8194);\n Window = new ModuleMethod(gui2, 15, Lit17, -4096);\n run$Mnapplication = Macro.make(Lit18, Lit19, \"gnu.kawa.slib.gui\");\n gui.$runBody$();\n }\n\n public gui() {\n ModuleInfo.register(this);\n }", "public void paint( Graphics g )\n {\n\tint red;int green;int blue,p;\n\tred = 255; green = 255; blue = 255;\n\tg.setColor(new Color(red,green,blue));//change the bg color\n\tg.fillRect(0,0,720,520);\n\tred = 255; green = 255; blue = 255;\n\tg.setColor(new Color(0,0,255));\n\t//g.drawLine(0,0,200,200);\n\t\n\t//set up chaos\t\n\tTri ob = new Tri (g,20,20);\n\tint h1 = 220, k1 = 50;\n\tint h2 = 20, k2 = 320;\n\tint h3 = 420, k3 = 320;\n\t\n\t//g.setColor(new Color(0,0,255));\n\t\n\t//g.drawLine(h1,k1,h1,k1);\n\t//g.setColor(new Color(255,0,0));\n\t\n\t//g.drawLine(h2,k2,h2,k2);\n\t//g.setColor(new Color(0,0,255));\n\t\n\t//g.drawLine(h3,k3,h3,k3);\n\t\n\t//g.drawLine(sx,sy,sx,sy);\n\t\n\tg.setColor(new Color(255,0,0));\n\tint a,n,nx,ny;\n\t\n\n\t\tg.setColor(new Color(255,0,0));\n\t\tg.fillOval(h1-8,k1-15,5,5);\n\t\t\n\t\tg.setColor(new Color(0,255,0));\n\t\tg.fillOval(h2-7,k2+7,5,5);\n\t\t\n\t\tg.setColor(new Color(0,0,255));\n\t\tg.fillOval(h3-7,k3+7,5,5);\n\t\t\n\t\tg.setColor(new Color(0,255,255));\n\t\tint sx = 20, sy = 320;\n\t\t//int sx = 10, sy = 10;\n\t\t\n\t\t//g.fillOval(sx,sy,15,15);\n\tfor (a = 0;a <500000;a++){\n\t\tint z = 2;\n\t\tn = (int)( Math.random()*3);\n\tswitch(n) {\n\tcase 0:\n\t\tnx = (int) ((sx+h1)/z);\n\t\tny = (int) ((sy+k1)/z);\n\t\tg.setColor(new Color(255,0,0));\n\t\tg.drawLine(nx,ny,nx,ny);\n\t\tsx = nx;sy = ny;\n\t\tbreak;\n\tcase 1:\n\t\tnx = (int) ((sx + h2) / z);\n\t\tny = (int) ((sy+ k2)/z);\n\t\tg.setColor(new Color(0,150,10));\n\t\tg.drawLine(nx,ny,nx,ny);\n\t\tsx = nx;sy = ny;\n\t\tbreak;\n\tdefault:\n\t\tnx = (int) ((sx + h3) / z);\n\t\tny = (int) ((sy + k3)/z);\n\t\tg.setColor(new Color(0,0,255));\n\t\tg.drawLine(nx,ny,nx,ny);\n\t\tsx = nx;sy = ny;\n\t}\n\n\t//for (p = 0;p<100000;p++);\n\t}//for a\n\t\n}", "public void drawPolygon (int xC, int yC, int xP, int yP,int ribs, Graphics g){\r\n \r\n \tint n = ribs; \r\n \t//delta keep the the original delta , this size of delta will increase in delta size each time.\r\n \tdouble delta = (2* Math.PI)/ n;\r\n \tdouble deltaTemp = delta;\r\n \t//List of Points that I keep during n rotation.\r\n \tList <Point> points; \r\n \tfloat x,y,newX,newY;\r\n \t//First Sliding\r\n \tx = xP - xC;\r\n \ty = yP - yC;\r\n \tnewX = x; \t\r\n \tnewY = y; \t\r\n \tList <Point> vertexs = new ArrayList();\r\n \t//Follow delta angle rotation n times and write a list of vertices to vertexs list.\r\n \tfor (int i = 0; i < n ; i++)\r\n \t{\r\n \t\tnewX = (int) ((x*Math.cos(delta) - y*Math.sin(delta)));\r\n \t\tnewY = (int) ((x*Math.sin(delta) + y*Math.cos(delta))); \r\n \t\tvertexs.add(new Point(Math.round(newX),Math.round(newY))); \t\r\n \t\tSystem.out.println(vertexs.get(i).x+\",\"+vertexs.get(i).y);\r\n \t\tdelta = delta + deltaTemp;\r\n \t}\r\n \t//Sliding back\r\n \tfor (int i = 0; i < vertexs.size(); i++ ){\r\n \t\tvertexs.get(i).x = (int) (vertexs.get(i).getX() + xC);\r\n \t\tvertexs.get(i).y = (int) (vertexs.get(i).getY() + yC);\r\n \t\tg.drawRect(vertexs.get(i).x, vertexs.get(i).y ,1,1);\r\n \t}\r\n \t//draw line between the list of the points we got.\r\n \tfor (int z = 0 ; z < vertexs.size(); z++){\r\n \t\tif (z == vertexs.size()-1)\r\n \t\t\tdrawLine((int) Math.round(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(0).getX()), (int)(vertexs.get(0).getY()),g);\r\n \t\telse\r\n \t\t\tdrawLine((int)(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(z+1).getX()), (int)(vertexs.get(z+1).getY()),g);\r\n\r\n \t\t}\r\n \t\r\n }", "public static Polyline randomPolyline() {\r\n\t\t// Create an empty polyline and add vertices\r\n\t\tPolyline polyline = new Polyline();\r\n\t\tint nofVertices = 2 + rand.nextInt(7);\r\n\r\n\t\tint nofSelectedVertices = 0;\r\n\t\tboolean[] selectedNames = new boolean[26];\r\n\t\t// Two vertices can not have the same name\r\n\t\tPoint chosenPoint = null;\r\n\t\tchar chosenChar = 0;\r\n\r\n\t\t// first point will always be ok\r\n\r\n\t\twhile (nofSelectedVertices < nofVertices) {\r\n\t\t\tchosenPoint = randomPoint();\r\n\t\t\tchosenChar = chosenPoint.getName().charAt(0);\r\n\t\t\tif (selectedNames[((int) chosenChar) - 65] != true) {\r\n\t\t\t\tpolyline.addLast(chosenPoint);\r\n\t\t\t\tnofSelectedVertices += 1;\r\n\t\t\t\tselectedNames[((int) chosenChar) - 65] = true;\r\n\t\t\t} else\r\n\t\t\t\tcontinue;\r\n\r\n\t\t}\r\n\t\t// Assign a colour\r\n\t\tint selectColour = rand.nextInt(3);\r\n\t\tString colour = \"\";\r\n\t\tswitch (selectColour) {\r\n\t\tcase 0:\r\n\t\t\tcolour = \"blue\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase 1:\r\n\t\t\tcolour = \"red\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcolour = \"yellow\";\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\r\n\t\tpolyline.setColour(colour);\r\n\t\treturn polyline;\r\n\t}", "public void drawSegment(Graphics g, int a, int b)\n { \n //Draws the outline of the snake based on the selected color\n \n if(lastpowerUp.equals(\"BLACK\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray);\n //g.setColor(Color.BLACK);\n }\n else if(!lastpowerUp.equals(\"RAINBOW\"))\n {\n if(difficult.equals(\"GHOST\"))\n g.setColor(new Color(55,55,55));\n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n }\n else if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor);\n }\n \n g.drawLine(a,b,a,b+15);\n g.drawLine(a,b,a+15,b);\n g.drawLine(a+15,b,a+15,b+15);\n g.drawLine(a,b+15,a+15,b+15); \n }", "@FXML\r\n private void CambiarColor(ActionEvent event){\r\n \r\n \r\n \r\n g.setFill(Color.rgb((int) (Math.random()*255),(int) (Math.random()*255),(int) (Math.random()*255)));\r\n g.fillPolygon(x, y, 3); // Triangulo //\r\n g.fillOval(150, 70, 90, 90); // Circulo //\r\n g.strokeRect(10, 45, 45, 45); // Cuadrado todavia no funciona //\r\n \r\n \r\n }", "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark blue\n rect(0,110,600,215);\n rect(0,380,600,215);\n}", "private void drawBackground(Graphics2D g2d, int wid, int hei) {\n g2d.setColor(Light_Gray);\n Triangle triangle1 = new Triangle(new Point(0, 0), new Point(0, hei), new Point(wid, 0));\n triangle1.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle2 = new Triangle(new Point(wid, hei), new Point(0, hei), new Point(wid, 0));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid, 0), new Point(wid, 15), new Point(wid - 15, 15));\n triangle3.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle4 = new Triangle(new Point(0, hei), new Point(0, hei - 15), new Point(15, hei - 15));\n triangle4.fill(g2d);\n g2d.setColor(Gray);\n g2d.fillRect(6, 6, wid - 12, hei - 12);\n }", "@Override\r\n public final void draw(final Polygon p, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(p.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(p.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(p.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(p.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(p.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(p.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(p.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(p.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(p.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n int[] xCoordinates = p.getxCoordinates();\r\n int[] yCoordinates = p.getyCoordinates();\r\n\r\n for (int i = 0; i < (p.getNumberOfPints() - 1); i++) {\r\n draw(new Line((String.valueOf(xCoordinates[i])), String.valueOf(yCoordinates[i]),\r\n String.valueOf(xCoordinates[i + 1]), String.valueOf(yCoordinates[i + 1]), color,\r\n String.valueOf(p.getBorderColor().getAlpha()), paper), paper);\r\n }\r\n\r\n draw(new Line((String.valueOf(xCoordinates[p.getNumberOfPints() - 1])),\r\n String.valueOf(yCoordinates[p.getNumberOfPints() - 1]),\r\n String.valueOf(xCoordinates[0]), String.valueOf(yCoordinates[0]), color,\r\n String.valueOf(p.getBorderColor().getAlpha()), paper), paper);\r\n\r\n int xc = 0;\r\n int yc = 0;\r\n for (int i = 0; i < p.getNumberOfPints(); i++) {\r\n xc += xCoordinates[i];\r\n yc += yCoordinates[i];\r\n }\r\n xc = xc / p.getNumberOfPints();\r\n yc = yc / p.getNumberOfPints();\r\n floodFill(xc, yc, p.getFillColor(), p.getBorderColor(), paper);\r\n }", "private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}", "public void render() {\n // Every cell is an individual quad\n for (int x = 0; x < z.length-1; x++)\n {\n beginShape(QUAD_STRIP);\n for (int y = 0; y < z[x].length; y++)\n {\n // one quad at a time\n // each quad's color is determined by the height value at each vertex\n // (clean this part up)\n stroke(0xffff69b4);\n stroke(0xffbbbbbb);\n float currentElevation = z[x][y];\n float currentShade = map(currentElevation, -120, 120, 0, 255);\n // fill(currentShade, 255);\n noFill();\n float xCoordinate = x*scl-w/2;\n float yCoordinate = y*scl-h/2;\n vertex(xCoordinate, yCoordinate, z[x][y]);\n vertex(xCoordinate + scl, yCoordinate, z[x+1][y]);\n }\n endShape();\n }\n }", "public void draw( DrawingCanvas canvas, Color c, boolean fill ) { \n myTriLine1= new Line((double)getP1().getX(), (double)getP1().getY(), \n (double)getP2().getX(),(double)getP2().getY(), canvas); \n myTriLine2= new Line((double)getP2().getX(), (double)getP2().getY(), \n (double)getP3().getX(),(double)getP3().getY(), canvas); \n myTriLine3= new Line((double)getP3().getX(), (double)getP3().getY(), \n (double)getP1().getX(),(double)getP1().getY(), canvas);\n //filled\n if (fill){\n if (c==null){\n myTriLine1.setColor(Color.black);\n myTriLine2.setColor(Color.black);\n myTriLine3.setColor(Color.black);\n }\n else{\n myTriLine1.setColor(c);\n myTriLine2.setColor(c);\n myTriLine3.setColor(c);\n }\n }\n //empty\n else{\n if (c==null){\n myTriLine1.setColor(Color.black);\n myTriLine2.setColor(Color.black);\n myTriLine3.setColor(Color.black);\n }\n else{\n myTriLine1.setColor(c);\n myTriLine2.setColor(c);\n myTriLine3.setColor(c);\n }\n }\n }", "protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }", "private void createMiniTriangles(int[] xPoints, int[] yPoints, int[] color) {\n\t\tint[] xMidpoints = new int[NUM_TRIANGLE_SIDES];\n\t\tint[] yMidpoints = new int[NUM_TRIANGLE_SIDES];\n\n\t\tfor (int i = 0; i < NUM_TRIANGLE_SIDES; i++) {\n\t\t\txMidpoints[i] = avg(xPoints[i], xPoints[(i + 1) % NUM_TRIANGLE_SIDES]);\n\t\t\tyMidpoints[i] = avg(yPoints[i], yPoints[(i + 1) % NUM_TRIANGLE_SIDES]);\n\t\t}\n\n\t\t// midpoint i, midpoint i+1, point i\n\t\tfor (int i = 0; i < NUM_TRIANGLE_SIDES; i++) {\n\t\t\tint[] xMini = {xMidpoints[i], xMidpoints[(i + TRI_TYPE) % NUM_TRIANGLE_SIDES], xPoints[i]};\n\t\t\tint[] yMini = {yMidpoints[i], yMidpoints[(i + TRI_TYPE) % NUM_TRIANGLE_SIDES], yPoints[i]};\n\t\t\tint colorVal = (i + this.rotateOffset) % NUM_TRIANGLE_SIDES;\n\t\t\tthis.drawMiniTriangle(xMini, yMini, color[colorVal], colorVal);\n\t\t}\n\t\tif (IS_ROT_ON) {\n\t\t\tthis.rotateOffset += ROT_OFFSET_BY;\n\t\t}\n\t}", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "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 }", "public void drawHead(Graphics g, int a, int b)\n {\n //draws the outline of the head of the snake based on the selected color\n \n if(lastpowerUp.equals(\"BLACK\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray);\n }\n else if(!lastpowerUp.equals(\"RAINBOW\"))\n { \n if(difficult.equals(\"GHOST\"))\n g.setColor(Color.BLACK);\n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n }\n else if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor);\n }\n \n \n if((lastpowerUp.equals(\"YELLOW\") && powerupTimer > 0 && !modeT) || (modeT && lastpowerUp.equals(\"TROLL\") && powerupTimer >0))\n {\n if(up || down)\n {\n g.drawLine(a-37,b,a+52,b);\n g.drawLine(a-37,b,a-37,b+15);\n g.drawLine(a+52,b,a+52,b+15);\n g.drawLine(a-37,b+15,a+52,b+15);\n }\n else if(left || right)\n {\n g.drawLine(a,b-37,a+15,b-37);\n g.drawLine(a,b-37,a,b+52);\n g.drawLine(a+15,b-37,a+15,b+52);\n g.drawLine(a,b+52,a+15,b+52);\n }\n }\n else\n {\n g.drawLine(a,b,a,b+15);\n g.drawLine(a,b,a+15,b);\n g.drawLine(a+15,b,a+15,b+15);\n g.drawLine(a,b+15,a+15,b+15);\n } \n \n }", "@Override\r\n public void generateDisplayList(GL2 gl, GLU glu) {\r\n ArrayList<double[]> triangle = null;\r\n\r\n /*\r\n * List of all vertices describing the contour of the border, as well as the\r\n * vertices color and texture coordinates.\r\n */\r\n ArrayList<double[]> borderTriangle = null;\r\n\r\n // Get a denominator for the display list\r\n displayList = gl.glGenLists(1);\r\n\r\n // Create the display list\r\n gl.glNewList(displayList, GL2.GL_COMPILE);\r\n // Store the current OpenGL attribute states\r\n gl.glPushAttrib(GL2.GL_ALL_ATTRIB_BITS);\r\n\r\n /*\r\n * Set the alpha value of the colors. The opacity of the whole object\r\n * (opacity) always has a higher priority.\r\n */\r\n if (opacity < 1) {\r\n fillColor.setAlpha(opacity);\r\n borderColor.setAlpha(opacity);\r\n } else {\r\n fillColor.setAlpha(fillOpacity);\r\n borderColor.setAlpha(1);\r\n }\r\n\r\n // Don't draw if the dimensions are too small\r\n if (sideLength > 0) {\r\n\r\n // Create a list storing the triangles vertices\r\n triangle = new ArrayList<double[]>();\r\n\r\n // Check if the triangle will be rendered with a texture applied on it\r\n if (texture != null) {\r\n\r\n // Calculate the triangles contour\r\n calculateContour(triangle, null);\r\n\r\n // Set the triangles color to white (because of texture)\r\n applyColor(triangle, new Color(Color.WHITE));\r\n\r\n // Map the texture to the triangle\r\n applyTexture(triangle, texture.getImageTexCoords());\r\n\r\n // Enable texture support\r\n texture.enable();\r\n\r\n // Draw the textured triangle\r\n TessellatedPolygon poly = new TessellatedPolygon();\r\n poly.init(gl, glu);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(triangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n poly = null;\r\n\r\n // Disable texture support\r\n texture.disable();\r\n } else {\r\n\r\n // Check if the triangle will be rendered with a border\r\n if (borderWidth > 0) {\r\n\r\n // Create a list storing the borders vertices\r\n borderTriangle = new ArrayList<double[]>(1);\r\n\r\n // Calculate the triangles contour and the contour of the border\r\n calculateContour(triangle, null);\r\n calculateContour(triangle, borderTriangle);\r\n\r\n // Apply the border color\r\n applyColor(triangle, borderColor);\r\n applyColor(borderTriangle, borderColor);\r\n\r\n // Don't apply any texture\r\n applyTexture(triangle, null);\r\n applyTexture(borderTriangle, null);\r\n\r\n // Draw the border\r\n TessellatedPolygon poly = new TessellatedPolygon();\r\n poly.init(gl, glu);\r\n poly.setWindingRule(GLU.GLU_TESS_WINDING_ODD);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(triangle);\r\n poly.endContour();\r\n poly.beginContour();\r\n poly.renderContour(borderTriangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n\r\n // Apply the fill color\r\n applyColor(borderTriangle, fillColor);\r\n\r\n // Draw the inner triangle\r\n poly.init(gl, glu);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(borderTriangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n poly = null;\r\n } else {\r\n\r\n // Calculate the contour of the triangle\r\n calculateContour(triangle, null);\r\n\r\n // Apply the fill color to the triangle\r\n applyColor(triangle, fillColor);\r\n\r\n // Don't apply any texture\r\n applyTexture(triangle, null);\r\n\r\n // Draw the triangle without border\r\n TessellatedPolygon poly = new TessellatedPolygon();\r\n poly.init(gl, glu);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(triangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n poly = null;\r\n }\r\n }\r\n }\r\n\r\n // Restore the OpenGL attribute states\r\n gl.glPopAttrib();\r\n gl.glEndList();\r\n }", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "private primitives.Color AdaptiveDiffusedAndGlossyRec(Point3D centerP, double WidthAndHeight, double minCubeSize, Point3D pIntersection,Vector Vright,Vector Vup , Vector normal, int direction, int level , double k, double ktr, List<Point3D> prePoints) throws Exception {\r\n List<Point3D> nextCenterPList = new LinkedList<Point3D>();\r\n List<Point3D> cornersList = new LinkedList<Point3D>();\r\n List<primitives.Color> colorList = new LinkedList<primitives.Color>();\r\n Point3D tempCorner;\r\n GeoPoint gp;\r\n Ray tempRay;\r\n for (int i = -1; i <= 1; i += 2)\r\n for (int j = -1; j <= 1; j += 2) {\r\n tempCorner = centerP.add(Vright.scale(i * WidthAndHeight / 2)).add(Vup.scale(j * WidthAndHeight / 2));\r\n cornersList.add(tempCorner);\r\n if (prePoints == null || !isInList(prePoints, tempCorner)) {\r\n tempRay = new Ray(pIntersection, tempCorner.subtract(pIntersection), normal);\r\n if ((normal.dotProduct(tempRay.getDir()) < 0 && direction == 1) || (normal.dotProduct(tempRay.getDir()) > 0 && direction == -1)) {\r\n nextCenterPList.add(centerP.add(Vright.scale(i * WidthAndHeight / 4)).add(Vup.scale(j * WidthAndHeight / 4)));\r\n gp = findClosestIntersection(tempRay);\r\n if (gp == null)\r\n colorList.add(scene.background);\r\n else {\r\n colorList.add(calcColor(gp, tempRay, level - 1, k));\r\n } \r\n }\r\n \r\n }\r\n }\r\n\r\n if (nextCenterPList == null || nextCenterPList.size() == 0) {\r\n return primitives.Color.BLACK;\r\n }\r\n\r\n\r\n if (WidthAndHeight < minCubeSize * 2) {\r\n primitives.Color sumColor = primitives.Color.BLACK;\r\n for (primitives.Color color : colorList) {\r\n sumColor = sumColor.add(color);\r\n }\r\n return sumColor.reduce(colorList.size());\r\n }\r\n\r\n\r\n boolean isAllEquals = true;\r\n primitives.Color tempColor = colorList.get(0);\r\n for (primitives.Color color : colorList) {\r\n if (!tempColor.isAlmostEquals(color))\r\n isAllEquals = false;\r\n }\r\n if (isAllEquals && colorList.size() > 1)\r\n return tempColor;\r\n\r\n\r\n tempColor = primitives.Color.BLACK;\r\n for (Point3D center : nextCenterPList) {\r\n tempColor = tempColor.add(AdaptiveDiffusedAndGlossyRec(center, WidthAndHeight / 2, minCubeSize, pIntersection, Vright, Vup, normal, direction, level, k, ktr, cornersList));\r\n }\r\n return tempColor.reduce(nextCenterPList.size());\r\n }", "public static void main(String[] args) {\n\tString anyColors =\tJOptionPane.showInputDialog(\"What color would you like?\");\n\tString anyShape= JOptionPane.showInputDialog(\"What Shape would you like?\"); \n\t\t//4. use an if/else statement to set the pen color that the user requested\nif (anyColors.equalsIgnoreCase(\"Red\")) \n{\n\tTortoise.setPenColor(Color.red);\n}\nif (anyColors.equalsIgnoreCase(\"Blue\")) \n{\n\tTortoise.setPenColor(Color.blue);\n}\nif (anyColors.equalsIgnoreCase(\"Green\")) \n{\n\tTortoise.setPenColor(Color.green);\n}if (anyColors.equalsIgnoreCase(\"Gray\")) \n{\n\tTortoise.setPenColor(Color.GRAY);\n}if (anyColors.equalsIgnoreCase(\"orange\")) \n{\n\tTortoise.setPenColor(Color.orange);\n}if (anyColors.equalsIgnoreCase(\"yellow\")) \n{\n\tTortoise.setPenColor(Color.yellow);\n}\nif (anyColors.equalsIgnoreCase(\"\")) \n{\n\tTortoise.setPenColor(Color.MAGENTA);\t\n} \n\n//if(anyShape.equalsIgnoreCase(\"Triangle\"))\n//{\n//Tortoise.turn(40);\n//Tortoise.move(50);\n//Tortoise.turn(40);\n//Tortoise.move(40);\n//Tortoise.turn(40);\n//}\n\n\n//5. if the user doesn’t enter anything, choose a random color\n\n//6. put a loop around your code so that you keep asking the user for more colors & drawing them\n\t\t\n\t\t//2. set the pen width to 10\n\t\tTortoise.setPenWidth(5);\n\t//1. make the tortoise draw a shape (this will take more than one line of code)\n\t\tTortoise.getBackgroundWindow();\n\t\tTortoise.setSpeed(10);\n\t\tfor (int i = 0; i < 20; i++) \n\t\t{\n\t\tTortoise.move(50);\n\t\tTortoise.turn(60);\n\t\tTortoise.move(100);\n\t\tTortoise.turn(+120);\n\t\t\n\t\t}\n\n\t}", "@Override\r\n public final void draw(final Triangle t, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(t.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(t.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(t.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(t.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(t.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(t.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(t.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(t.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(t.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n draw(new Line((String.valueOf(t.getX1())), String.valueOf(t.getY1()),\r\n String.valueOf(t.getX2()), String.valueOf(t.getY2()), color,\r\n String.valueOf(t.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(t.getX2())), String.valueOf(t.getY2()),\r\n String.valueOf(t.getX3()), String.valueOf(t.getY3()), color,\r\n String.valueOf(t.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(t.getX3())), String.valueOf(t.getY3()),\r\n String.valueOf(t.getX1()), String.valueOf(t.getY1()), color,\r\n String.valueOf(t.getBorderColor().getAlpha()), paper), paper);\r\n final int trei = 3;\r\n int xc = (t.getX1() + t.getX2() + t.getX3()) / trei;\r\n int yc = (t.getY1() + t.getY2() + t.getY3()) / trei;\r\n floodFill(xc, yc, t.getFillColor(), t.getBorderColor(), paper);\r\n\r\n }", "public void paintRoute(Graphics g, String[] ruteData, int begin, int end, int color) {\n //System.out.println(\"painting rute\");\n end += RUTE_FLOOR + 1;\n begin += RUTE_FLOOR + 1;\n if (begin > end || end > ruteData.length || begin < 0 || g == null || ruteData == null) {\n return;\n }\n g.setColor(color);\n //paint the rute\n int x = 0, y = 0, lastx = 0, lasty = 0, i = begin;\n int floor = Integer.parseInt(ruteData[RUTE_FLOOR]);\n for (; i < end; i++) {\n //System.out.println(ruteData[i]);\n point = getPoint(ruteData[i]);\n x = point[0] + currMatrixX + transformCoordenate(floor, X_COORD);\n y = point[1] + currMatrixY + transformCoordenate(floor, Y_COORD);\n //dot\n g.fillRoundRect(x - 5, y - 5, 10, 10, 5, 5);\n //line\n if (!(lastx == 0 && lasty == 0)) {\n g.drawLine(x - 1, y - 1, lastx - 1, lasty - 1);\n g.drawLine(x, y - 1, lastx, lasty - 1);\n g.drawLine(x - 1, y, lastx - 1, lasty);\n g.drawLine(x, y, lastx, lasty);\n g.drawLine(x, y + 1, lastx, lasty + 1);\n g.drawLine(x + 1, y, lastx + 1, lasty);\n g.drawLine(x + 1, y + 1, lastx + 1, lasty + 1);\n }\n lastx = x;\n lasty = y;\n //System.out.println(\"point \" + (i-begin) + \": \" + x + \",\" + y + \" floor \" + floor);\n }\n }", "private Group drawSemiRing() {\n Group root = new Group();\r\n\r\n List<CaseWheel> arcs = new ArrayList<>();\r\n double rayon = 100;\r\n double nbAngle = (360 / 24)-1;\r\n\r\n double startAngle = 8;\r\n\r\n Polygon polygon = new Polygon();\r\n polygon.getPoints().addAll(390.0, 150.0,\r\n 420.0, 160.0,\r\n 420.0, 140.0);\r\n\r\n int cpt=0;\r\n for(int i = 0; i <24; i++){\r\n CaseWheel c = new CaseWheel(cpt,300,150,100,startAngle,nbAngle);\r\n startAngle += nbAngle+1;\r\n c.addTo(root);\r\n arcs.add(c);\r\n cpt++;\r\n }\r\n\r\n root.getChildren().add(polygon);\r\n ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);\r\n\r\n time = System.currentTimeMillis();\r\n int nbMilliRandom = new Random().nextInt(7000 - 3000 + 1) + 3000;\r\n Runnable task1 = new Runnable() {\r\n @Override\r\n public void run() {\r\n Platform.runLater(()->{\r\n\r\n for(CaseWheel n : arcs) {\r\n n.rotateAngle(angle);\r\n if(n.isCurrent()){\r\n System.out.println(n.arc.getStartAngle()+\" \"+n.valueAngle);\r\n System.out.print(\"Case current id : \"+n.id+\"\\n\");\r\n }\r\n }\r\n if(System.currentTimeMillis()-time>nbMilliRandom){\r\n angle-=0.01;\r\n }\r\n if(angle<=0) executor.shutdownNow();\r\n });\r\n }\r\n };\r\n\r\n executor.scheduleAtFixedRate(task1, 0, 16, TimeUnit.MILLISECONDS);\r\n\r\n return root;\r\n }", "public void randomPaint(Paint paint, Random random) {\n randomGradient(mRandom);\n paint.setStrokeWidth(mBrushSize);\n if(mRainbow != null) {\n paint.setShader(mRainbow);\n }\n }", "public static void mainDraw(Graphics graphics) {\n int x1 = 50;\r\n int x2 = 180;\r\n int y1 = 180;\r\n int y2 = 50;\r\n Color[] colors = {Color.blue, Color.cyan, Color.green, Color.magenta};\r\n graphics.setColor(colors[1]);\r\n graphics.drawLine(x1, y2, x2, y2);\r\n graphics.setColor(colors[2]);\r\n graphics.drawLine(x2, y2, x2, y1);\r\n graphics.setColor(colors[3]);\r\n graphics.drawLine(x2, y1, x1, y1);\r\n graphics.setColor(colors[0]);\r\n graphics.drawLine(x1, y1, x1, y2);\r\n }", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}", "void drawRectangle(int index,int[] color){\n Rect r;\n background(255);\n for(int i=0;i<arr.length;i++){\n if(i!=index) {\n noStroke();\n r=new Rect(40 + i * 80, 400, 75, -arr[i] * 20, color1);\n createRectangle(r, color1);\n }else{\n noStroke();\n r=new Rect(40 + i* 80, 400, 75, -arr[i] * 20, color);\n createRectangle(r, color);\n }\n }\n }", "Color generateColor(Vertex v) {\n if (v.x == width - 1 && v.y == height - 1) {\n return Color.magenta;\n }\n else if (v.path) {\n return Color.blue;\n }\n else if (v.x == 0 && v.y == 0) {\n return Color.green;\n }\n else if (v.visited) {\n return Color.cyan;\n }\n else {\n return Color.gray;\n }\n }", "private void drawFill(Graphics2D g2, boolean pressed, int x, int y, int w, int h)\r\n/* 114: */ {\r\n/* 115: */ Color lowerRight;\r\n/* 116: */ Color upperLeft;\r\n/* 117: */ Color lowerRight;\r\n/* 118:158 */ if (pressed)\r\n/* 119: */ {\r\n/* 120:159 */ Color upperLeft = MetalLookAndFeel.getControlShadow();\r\n/* 121:160 */ lowerRight = PlasticLookAndFeel.getControlHighlight();\r\n/* 122: */ }\r\n/* 123: */ else\r\n/* 124: */ {\r\n/* 125:162 */ upperLeft = PlasticLookAndFeel.getControl();\r\n/* 126:163 */ lowerRight = PlasticLookAndFeel.getControlHighlight().brighter();\r\n/* 127: */ }\r\n/* 128:165 */ g2.setPaint(new GradientPaint(x, y, upperLeft, x + w, y + h, lowerRight));\r\n/* 129:166 */ g2.fillRect(x, y, w, h);\r\n/* 130: */ }", "public void drawBorder(boolean blue)\n\t{\n\t\t// copied most of the following from http://forums.inside3d.com/viewtopic.php?t=1326\n\t\tif (blue)\n\t\t\tglColor3f(0, 0, 1); // blue\n\t\telse\n\t\t\tglColor3f(1, 0, 0); // red\n\n\t\tglLineWidth(2); // Set line width to 2\n\t\tglLineStipple(1, (short) 0xf0f0); // Repeat count, repeat pattern\n\t\tglEnable(GL_LINE_STIPPLE); // Turn stipple on\n\n\t\tglBegin(GL_LINE_LOOP);\n\t\tglVertex2d(x - BORDER, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y + BORDER + height);\n\t\tglVertex2d(x - BORDER, y + BORDER + height);\n\t\tglEnd();\n\t\tif (action == 3)\n\t\t{\n\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\tdouble endPoint = endPos;\n\t\t\tif (!downRight)\n\t\t\t\tendPoint = startPos;\n\t\t\t//System.out.println(\"StartPos, EndPos, endPoint: \" + startPos + \", \" + endPos + \", \" + endPoint);\n\t\t\tif (upDown)\n\t\t\t{\n\t\t\t\tglVertex2d(x - BORDER, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint + BORDER + height);\n\t\t\t\tglVertex2d(x - BORDER, endPoint + BORDER + height);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglVertex2d(endPoint - BORDER, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y + BORDER + height);\n\t\t\t\tglVertex2d(endPoint - BORDER, y + BORDER + height);\n\t\t\t}\n\t\t\tglEnd();\n\t\t}\n\n\t\tglDisable(GL_LINE_LOOP); // Turn it back off\n\t\tglDisable(GL_LINE_STIPPLE); // Turn it back off\n\t\tglEnd();\n\t}", "public void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\tthis.setBackground(Color.ORANGE);\r\n\t\t\r\n\t\t//-------------------------------------------------------------------------------\r\n\t\t\r\n\t\tclass SquareColours {\r\n\t\t\t\r\n\t\t\tprivate int x,y,z;\r\n\t\t\t\r\n\t\t\t//---------------------------------------------------------------------------\r\n\t\t\t\r\n\t\t\tSquareColours(int x, int y, int z) {\r\n\t\t\t\tthis.x = x;\r\n\t\t\t\tthis.y = y;\r\n\t\t\t\tthis.z = z;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//---------------------------------------------------------------------------\r\n\t\t\t\r\n\t\t\tpublic void chooseSquareColours() {\r\n\t\t\t\tint k = this.z;\r\n\t\t\t\t\r\n\t\t\t\tswitch(k) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\tg.setColor(new Color(0,0,255)); //draws unvisited squares as blue\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tg.setColor(new Color(0,255,0)); //draws squares on the mouse's path as green\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2: \r\n\t\t\t\t\t\tg.setColor(new Color(255,0,0)); //draws the mouse trap squares as red\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3: \r\n\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault: g.setColor(new Color(100,100,100));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//---------------------------------------------------------------------------\r\n\t\t\t\r\n\t\t\tpublic void drawSquares(int i, int j) {\r\n\t\t\t\t\tg.fillRect(i*50,j*50,49,49);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//-------------------------------------------------------------------------------\r\n\t\t\r\n\t\tfor (int i = 0;i < 11;i++) {\r\n\t\t\tfor (int j = 0;j < 11; j++) {\r\n\t\t\t\tSquareColours A = new SquareColours(i,j,getVal(i,j));\r\n\t\t\t\tA.chooseSquareColours();\r\n\t\t\t\tA.drawSquares(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*SquareColours A = new SquareColours(0,0,getVal(0,0));\r\n\t\tA.chooseSquareColours();\r\n\t\tA.drawSquares(0,0);\r\n\t\t\r\n\t\tSquareColours B = new SquareColours(1,2,getVal(1,2));\r\n\t\tB.chooseSquareColours();\r\n\t\tB.drawSquares(1,2);*/\r\n\t\t\r\n\t}", "public void draw(Graphics g) {\n\t\tGraphics2D graphic2d = (Graphics2D) g;\n\t\t//loop through and create circles\n\t\tint bool = 0;\n\t\t//makes 36 squares\n\t\tfor (int x=1; x < 37; x++) {\t\t\t\n\t\t\tRectangle2D shape = new Rectangle2D.Double(super.getX(), super.getY(), super.width/2, super.height/2);\n\t\t\tfinal AffineTransform saved = graphic2d.getTransform();\n\t\t\t//converts 10 to radians and rotates shape by 10 degrees\n\t\t\tfinal AffineTransform rotate = AffineTransform.getRotateInstance(Math.toRadians(x*10), super.getX(), super.getY());\n\t\t\tgraphic2d.transform(rotate);\n\t\t\t//paints a different square colour every 9 squares\n\t\t\tif (x%9 == 0) {\n\t\t\t\tif (bool == 0) {\n\t\t\t\t\tgraphic2d.setPaint(super.borderColor);\n\t\t\t\t\tbool = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgraphic2d.setPaint(super.fillColor);\n\t\t\t\t\tbool = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgraphic2d.setPaint(super.fillColor);\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\tgraphic2d.fill(shape);\n\t\t\tgraphic2d.setTransform(saved);\n\t\t}\n\t\tdrawHandles(g);\n\t\t\n\t}", "@Override\n public void paint(Graphics g) {\n AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER,\n .8f);\n Color old = g.getColor();\n Graphics2D g2d = (Graphics2D) g;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n Composite composite = g2d.getComposite();\n g2d.setColor(new Color(0, 0, 0, 0));\n g2d.fillRect(0, 0, getWidth(), getHeight());\n g2d.setColor(Color.blue);\n g2d.setComposite(ac);\n g2d.fillPolygon(new int[]{3, 3, 7, 7}, new int[]{0, 8, 8, 0}, 4);\n g2d.fillPolygon(new int[]{0, 10, 5}, new int[]{8, 8, 12}, 3);\n g2d.setComposite(composite);\n g2d.setColor(old);\n\n }", "@Override\r\n\tprotected void generateAreas() {\n\t\tPerlinNoise noise = new PerlinNoise(new Random().nextInt(), xmasTemplate.getScale(), xmasTemplate.getOctaves(), xmasTemplate.getPersistence());\r\n\t\tfor (int y = 0; y < getHeight(); y ++) {\r\n\t\t\tfor (int x = 0; x < getWidth(); x ++) {\r\n\t\t\t\tif (getValue(x, y) != BASE) {\r\n\t\t\t\t\tif (noise.perlinNoise(x, y) > xmasTemplate.getThreshold()) {\r\n\t\t\t\t\t\tsetValue(x, y, WALL);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsetValue(x, y, FLOOR);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fill east, west and south\r\n\t\tfor (int x = 0; x < getWidth(); x ++) {\r\n\t\t\tdrawArea(x, 0, CosineInterpolator.instance.interpolate(2.0f, 6.0f, (float) Math.random()), WALL);\r\n\t\t}\r\n\t\tfor (int y = 0; y < getHeight(); y ++) {\r\n\t\t\tdrawArea(0, y, CosineInterpolator.instance.interpolate(2.0f, 6.0f, (float) Math.random()), WALL);\r\n\t\t\tdrawArea(getWidth() - 1, y, CosineInterpolator.instance.interpolate(2.0f, 6.0f, (float) Math.random()), WALL);\r\n\t\t}\r\n\r\n\t\t// Draw random blotch lines between each base first\r\n\t\tArrayList<Point> basesCopy = new ArrayList<Point>(getBases());\r\n\t\tfor (int i = 0; i < basesCopy.size(); i ++) {\r\n\t\t\tPoint p1 = basesCopy.get(i);\r\n\t\t\tint j = Util.random(0, basesCopy.size() - 1);\r\n\t\t\tPoint p2 = basesCopy.get(j);\r\n\t\t\tbasesCopy.set(i, p2);\r\n\t\t\tbasesCopy.set(j, p1);\r\n\t\t}\r\n\r\n\t\tPoint s = basesCopy.get(0), t;\r\n\t\tdrawArea(s.getX(), s.getY(), (xmasTemplate.getMinMainTunnelWidth() + xmasTemplate.getMaxMainTunnelWidth()) / 2.0f, FLOOR);\r\n\t\tfor (int i = 0; i < basesCopy.size() - 1; i ++) {\r\n\t\t\ts = basesCopy.get(i);\r\n\t\t\tt = basesCopy.get(i + 1);\r\n\t\t\tdrawLine(s.getX(), s.getY(), t.getX(), t.getY(), xmasTemplate.getMinMainTunnelWidth(), xmasTemplate.getMaxMainTunnelWidth(), FLOOR);\r\n\t\t}\r\n\r\n\t}", "private void drawSquare(Graphics g, int x, int y, \n Tetrominoe shape) {\n Color colors[] = {\n new Color(0, 0, 0), new Color(204, 102, 102),\n new Color(102, 204, 102), new Color(102, 102, 204),\n new Color(204, 204, 102), new Color(204, 102, 204),\n new Color(102, 204, 204), new Color(218, 170, 0)\n };\n//left and top sides are brighter, bottom and right sides to look 3d\n Color color = colors[shape.ordinal()];\n\n g.setColor(color);\n g.fillRect(x + 1, y + 1, squareWidth() - 2, squareHeight() - 2);\n\n g.setColor(color.brighter());\n g.drawLine(x, y + squareHeight() - 1, x, y);\n g.drawLine(x, y, x + squareWidth() - 1, y);\n\n g.setColor(color.darker());\n g.drawLine(x + 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + squareHeight() - 1);\n g.drawLine(x + squareWidth() - 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + 1);\n\n }", "public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}", "private void DrawOval(GL gl, float x, float y, float size, float r, float g, float b) {\n\t\t// Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\t\tgl.glPushMatrix();\n\t\tfloat theta = (float) Math.toRadians(m_slope);\n\t\t// Draw our line:\n\t\tgl.glLineWidth(2.0f);\n\n\t\tif (Iteration != 0) {\n\t\t\tfor (int i = 0; i < Iteration; i++) {\n\n\n\t\t\t\tif ((m_slope >= 0 && m_slope <= 45) || (m_slope >= 315 && m_slope <= 360)) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), 100 + y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), 100 + y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + -20 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 20 + (40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t} else if ((m_slope >= 135 && m_slope < 225)) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 - 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 - 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t} else if (m_slope > 45 && m_slope < 135) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 20 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -20 + (40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t} else {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 20 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 20 + (-40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t}\n\n\t\t\t\tgl.glPopMatrix();\n\t\t\t}\n\t\t}\n\t}", "private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }", "protected Patch generatePatch(Point2D[] points, float[][] color) {\n/* 52 */ return new TensorPatch(points, color);\n/* */ }", "private void _drawTriangle(Graphics2D g, Triangle t, TriangleMesh tMesh) {\r\n // Get triangle data\r\n Vector3f a = tMesh.getVertex(t.getA()).getPosition();\r\n Vector3f b = tMesh.getVertex(t.getB()).getPosition();\r\n Vector3f c = tMesh.getVertex(t.getC()).getPosition();\r\n // Draw edges of the triangle with provided algorithm\r\n String algorithm = RenderApplication.properties.getProperty(\"draw.algorithm\");\r\n if(algorithm.equals(\"Bresenham\")) {\r\n drawRasterLine(g, new Vector2f(a.x, a.y), new Vector2f(b.x, b.y));\r\n drawRasterLine(g, new Vector2f(b.x, b.y), new Vector2f(c.x, c.y));\r\n drawRasterLine(g, new Vector2f(c.x, c.y), new Vector2f(a.x, a.y));\r\n } else if (algorithm.equals(\"Scanline\")) {\r\n ArrayList<Vector2f> vertices = new ArrayList<>();\r\n // This drawing algorithm also draws lines between vertices with Bresenham\r\n vertices.addAll(drawRasterLine(g, new Vector2f(a.x, a.y), new Vector2f(b.x, b.y)));\r\n vertices.addAll(drawRasterLine(g, new Vector2f(b.x, b.y), new Vector2f(c.x, c.y)));\r\n vertices.addAll(drawRasterLine(g, new Vector2f(c.x, c.y), new Vector2f(a.x, a.y)));\r\n // Actual Scanline algorithm\r\n drawScanlines(g, vertices);\r\n // Clear vertices for next iteration\r\n vertices.clear();\r\n } else {\r\n // Draw the 'standard' way with drawLine from framework\r\n drawLine(g, new Vector2f(a.x, a.y), new Vector2f(b.x, b.y), Color.RED);\r\n drawLine(g, new Vector2f(b.x, b.y), new Vector2f(c.x, c.y), Color.RED);\r\n drawLine(g, new Vector2f(c.x, c.y), new Vector2f(a.x, a.y), Color.RED);\r\n }\r\n\r\n }", "public void Draw(Graphics g)\n/* */ {\n/* 55 */ g.setColor(this.m_color);\n/* */ \n/* 57 */ Point prevPt = new Point(0, 0);Point currPt = new Point(0, 0);\n/* */ \n/* 59 */ for (double t = 0.0D; t < 1.01D; t += this.m_tValue) {\n/* 60 */ ptFromTVal(t, currPt);\n/* */ \n/* 62 */ if (t == 0.0D) {\n/* 63 */ prevPt.x = currPt.x;\n/* 64 */ prevPt.y = currPt.y;\n/* */ }\n/* */ \n/* 67 */ g.drawLine(prevPt.x, prevPt.y, currPt.x, currPt.y);\n/* */ \n/* 69 */ if (this.m_showTPoints) {\n/* 70 */ g.fillOval(currPt.x - this.PT_RADIUS, currPt.y - this.PT_RADIUS, this.PT_DIAMETER, this.PT_DIAMETER);\n/* */ }\n/* */ \n/* 73 */ prevPt.x = currPt.x;\n/* 74 */ prevPt.y = currPt.y;\n/* */ }\n/* */ }", "public static void drawAll(Vector<Shape> v, Graphics g)\r\n\t{\r\n\t\tint i; \r\n\r\n\t\tfor(i=0 ; i<v.size() ; i++)\r\n\t\t{\r\n\t\t\tdouble random = Math.random()*(v.size());\r\n\t\t\tint num = (int)random;\t\t\t\r\n\t\t\tif(i==0)\r\n\t\t\t\tg.setColor(Color.GREEN);\r\n\t\t\telse if(num%5==0)\r\n\t\t\t\tg.setColor(Color.ORANGE);\r\n\t\t\telse if(num%8==0)\r\n\t\t\t\tg.setColor(Color.BLUE);\r\n\t\t\telse if(num%7==0)\r\n\t\t\t\tg.setColor(Color.RED);\r\n\t\t\telse if(num%9==0)\r\n\t\t\t\tg.setColor(Color.GRAY);\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(i%3==0)\r\n\t\t\t\t\tg.setColor(Color.CYAN);\r\n\t\t\t\telse if(i%4 == 0)\r\n\t\t\t\t\tg.setColor(Color.magenta);\r\n\t\t\t\telse\r\n\t\t\t\t\tg.setColor(Color.LIGHT_GRAY);\r\n\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t(v.get(i)).draw(g);\r\n\t\t}\r\n\r\n\t}", "void renderShape(ArrayList<PVector> vertices, int fillColor) {\n processing.fill(fillColor);\n processing.noStroke();\n\n // draw a polygon\n processing.beginShape();\n for (PVector v : vertices) {\n processing.vertex(v.x, v.y);\n }\n processing.endShape(processing.CLOSE);\n }", "public static void main(String[] args){\n AbstractFactory s = FactoryProducer.getFactory(\"shape\");\n AbstractFactory c = FactoryProducer.getFactory(\"color\");\n s.getShape(\"circular\").draw();\n\n c.getColor(\"red\").fill();\n }", "public void tree(Graphics bbg, int n, int length, int x, int y, double angle){\n double r1 = angle + Math.toRadians(-30);\n double r2 = angle + Math.toRadians(30);\n double r3 = angle + Math.toRadians(0);\n\n //length modifications of the different branches\n double l1 = length/1.3 + (l1I*5);\n double l2 = length/1.3 + (l2I*5);\n double l3 = length/1.3 + (l3I*5);\n\n //x and y points of the end of the different branches\n int ax = (int)(x - Math.sin(r1)*l1)+(int)(l1I);\n int ay = (int)(y - Math.cos(r1)*l1)+(int)(l1I);\n int bx = (int)(x - Math.sin(r2)*l2)+(int)(l2I);\n int by = (int)(y - Math.cos(r2)*l2)+(int)(l2I);\n int cx = (int)(x - Math.sin(r3)*l3)+(int)(l3I);\n int cy = (int)(y - Math.cos(r3)*l3)+(int)(l3I);\n\n if(n == 0){\n return;\n }\n\n\n increment();\n Color fluidC = new Color(colorR,colorG,colorB);\n //bbg.setColor(new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random()*255)));\n bbg.setColor(fluidC);\n\n\n //draw different branches\n bbg.drawLine(x,y,ax,ay);\n bbg.drawLine(x,y,bx,by);\n bbg.drawLine(x,y,cx,cy);\n\n //call recursively to draw fractal\n tree(bbg,n-1,(int)l1, ax,ay,r1);\n tree(bbg, n - 1, (int)l2, bx,by,r2);\n tree(bbg, n - 1, (int)l3, cx,cy,r3);\n\n\n }", "@Override\n\t\t\tvoid drawCurve(Point2D.Double[] p, Graphics2D g) {\n\t\t\t\t\n\t\t\t\tdouble minx = p[0].x;\n\t\t\t\tdouble maxx = p[0].x;\n\t\t\t\tdouble miny = p[0].y;\n\t\t\t\tdouble maxy = p[0].y;\n\t\t\t\tfor (int i = 1; i < p.length ; i++) {\n\t\t\t\t\tminx = Math.min(minx, p[i].x);\n\t\t\t\t\tmaxx = Math.max(maxx, p[i].x);\n\t\t\t\t\tminy = Math.min(miny, p[i].y);\n\t\t\t\t\tmaxy = Math.max(maxy, p[i].y);\n\t\t\t\t}\n\t\t\t Color c = g.getColor();\n\t\t\t\tg.setColor(new Color(1.0f,0.0f,0.0f,0.3f));\n\t\t\t\tfor (int x = (int) minx; x< maxx; x++) {\n\t\t\t\t\tfor (int y = (int) miny; y< maxy; y++) {\n\t\t\t\t\t\tif (inPolygonTurningCount(p, (double)x, (double)y)) g.fillRect(x, y, 1, 1);\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\tg.setColor(c);\n\t\t\t\tg.draw(new Rectangle2D.Double(minx,miny,maxx-minx,maxy-miny));\t\n\t\t\t\t// \n\t\t\t\tfor (int i = 0; i < p.length ; i++) {\n\t\t\t\t\tg.draw(new Line2D.Double(p[i].x, p[i].y,p[(i+1)%p.length].x, p[(i+1)%p.length].y));\n\t\t\t\t}\n\t\t\t}", "public abstract void draw(Graphics g, Color color);", "private void drawFill(Graphics2D g2, boolean pressed, int x, int y, int w, int h)\r\n/* 218: */ {\r\n/* 219: */ Color lowerRight;\r\n/* 220: */ Color upperLeft;\r\n/* 221: */ Color lowerRight;\r\n/* 222:250 */ if (pressed)\r\n/* 223: */ {\r\n/* 224:251 */ Color upperLeft = MetalLookAndFeel.getControlShadow();\r\n/* 225:252 */ lowerRight = PlasticLookAndFeel.getControlHighlight();\r\n/* 226: */ }\r\n/* 227: */ else\r\n/* 228: */ {\r\n/* 229:254 */ upperLeft = PlasticLookAndFeel.getControl();\r\n/* 230:255 */ lowerRight = PlasticLookAndFeel.getControlHighlight().brighter();\r\n/* 231: */ }\r\n/* 232:257 */ g2.setPaint(new GradientPaint(x, y, upperLeft, x + w, y + h, lowerRight));\r\n/* 233:258 */ g2.fillOval(x, y, w, h);\r\n/* 234: */ }", "private void fillTriangle(BufferedImage img, Polygon p, double illumination, double[][] zBuffer) {\n\t\t\tif (illumination<0)\r\n\t\t\t\tillumination = 0;\r\n\t\t\tif (illumination>1)\r\n\t\t\t\tillumination = 1;\r\n\r\n\t\t\tfloat tone = (float)illumination;\r\n\r\n\t\t\tint color = new Color(0,0,tone).getRGB();\r\n\r\n\t\t\tif (p.getFirst().getY()==p.getSecond().getY() && p.getSecond().getY()==p.getThird().getY())\r\n\t\t\t\treturn;\r\n\t\t\tPoint[] points = new Point[3];\r\n\t\t\tpoints[0] = new Point(p.getFirst());\r\n\t\t\tpoints[1] = new Point(p.getSecond());\r\n\t\t\tpoints[2] = new Point(p.getThird());\r\n\r\n\t\t\tArrays.sort(points,(e1,e2)->e1.y-e2.y);\r\n\t\t\t//System.out.println(Arrays.toString(points));\r\n\r\n\t\t\tint totalHeight = points[2].y-points[0].y;\r\n\t\t\tfor (int i = 0;i<totalHeight;i++) {\r\n\t\t\t\tint firstHalfHeight = points[1].y-points[0].y;\r\n\t\t\t\tboolean secondHalf = i>firstHalfHeight || firstHalfHeight==0;\r\n\t\t\t\tint segmentHeight = secondHalf?points[2].y-points[1].y:points[1].y-points[0].y;\r\n\r\n\t\t\t\tdouble alpha = (double)i/totalHeight;\r\n\t\t\t\tdouble beta = (double)(i-(secondHalf ? points[1].y-points[0].y : 0))/segmentHeight;\r\n\t\t\t\tPoint3D a = points[0].add(points[2].subtract(points[0]).multiply(alpha));\r\n\t\t\t\tPoint3D b = secondHalf ?\r\n\t\t\t\t\tpoints[1].add(points[2].subtract(points[1]).multiply(beta)) :\r\n\t\t\t\t\tpoints[0].add(points[1].subtract(points[0]).multiply(beta));\r\n\t\t\t\tif (a.getX()>b.getX()) {\r\n\t\t\t\t\tPoint3D temp = a;\r\n\t\t\t\t\ta = b;\r\n\t\t\t\t\tb = temp;\r\n\t\t\t\t}\r\n\t\t\t\tPoint aInt = new Point(a);\r\n\t\t\t\tPoint bInt = new Point(b);\r\n\t\t\t\tfor (int j = aInt.x; j<bInt.x;j++) {\r\n\t\t\t\t\tif (j<0 || j>=img.getWidth() || points[0].y+i<0 || points[0].y+i>=img.getHeight())\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tdouble phi = aInt.x==bInt.x ? 1 : (double)(j-aInt.x) / (double)(bInt.x-aInt.x);\r\n\t\t\t\t\tPoint P = new Point(a.add(b.subtract(a).multiply(phi)));\r\n\r\n\t\t\t\t\tif (P.z<minZ)\r\n\t\t\t\t\t\tminZ = P.z;\r\n\t\t\t\t\tif (P.z>maxZ)\r\n\t\t\t\t\t\tmaxZ = P.z;\r\n\r\n\t\t\t\t\tif (zBuffer[P.x][P.y]<P.z) {\r\n\t\t\t\t\t\timg.setRGB(P.x,P.y,color);\r\n\t\t\t\t\t\tzBuffer[P.x][P.y] = P.z;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "@Override\n public void draw(GL2 gl) {\n super.fill(gl);\n }", "@Override\n public void draw(GL2 gl) {\n super.fill(gl);\n }", "public void randomize()\n {\n a = (int)(Math.random()*(1110/15))*15 + 150; \n b = (int)(Math.random()*(480/15))*15 + 150; \n \n if(!specials || difficult.equals(\"GHOST\"))\n {\n dotColor = \"RED\";\n }\n else\n { \n double c = Math.random(); \n if(c < .65 || powerupTimer > 0 || hasItem)\n {\n dotColor = \"RED\";\n }\n else if(c>=.65 && c<.70 )\n \n {\n //dotColor = \"RED SHELL\";\n dotColor = \"RED\";\n }\n else if(c>=.70 && c<.75)\n {\n dotColor = \"TROLL\";\n }\n else if(c>=.75 && c <=.8)\n {\n dotColor = \"DOUBLE\";\n }\n else if(c>.8 && c<=.85 && powerupTimer <= 0)\n {\n dotColor = \"BLUE\"; \n }\n else if(c>.85 && c<=.90 && powerupTimer <= 0)\n {\n if(!difficult.equalsIgnoreCase(\"YOU WILL NOT SURVIVE\"))\n { \n if(modeT)\n dotColor = \"CRYSTAL\";\n else\n dotColor = \"BLACK\";\n }\n else\n dotColor = \"RED\";\n }\n else if(c>.90 && c<=.93 && powerupTimer <= 0)\n {\n dotColor = \"RAINBOW\"; \n }\n else if(c>.93 && c<=.97 && powerupTimer <= 0)\n {\n dotColor = \"YELLOW\"; \n }\n else if(c>.97 && c<=1.0 && powerupTimer <= 0)\n {\n dotColor = \"WHITE\"; \n } \n else if(c>1.0 && c<=1.0 && powerupTimer <= 0)\n {\n dotColor = \"PURPLE\";\n } \n }\n }", "public void paintComponent(Graphics g){ \r\n Graphics2D g2 = (Graphics2D)g;\r\n \r\n if(rev == true){\r\n int[] xCord = new int[]{x, x-25, x-50, x-100, x-50, x-25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n \r\n \r\n }\r\n else{\r\n int[] xCord = new int[]{x, x+25, x+50, x+100, x+50, x+25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n } \r\n }", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tgc.setFill(this.color.getColor());\n\t\tgc.fillRect(MyPoint.point[0], MyPoint.point[1], this.width, this.height);\n\t}", "@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}", "private void\trender(GLAutoDrawable drawable)\n\t{\n\t\tGL2\t\tgl = drawable.getGL().getGL2();\n\n\t\tgl.glClear(GL.GL_COLOR_BUFFER_BIT);\t// Clear the buffer\n\t\tgl.glEnable(GL.GL_BLEND);\n\t\tgl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);\n\t\tsetScreenProjection(gl);\n\n\t\t\n\t\t//changes what to render and what animation is going to happen based off what shape is selected\n\t\tif(shape1)\n\t\t{\n\t\t\tsetColor(gl, red, green, blue);\n\t\t\t//gives us the points for the shape\n\t\t\trectangle = fillRect(gl, (int)(getWidth() / 2) - (int)(rectWidth / 2), \n\t\t\t\t\t(int)(getHeight() / 2) - (int)(rectHeight / 2), rectWidth , rectHeight);\n\t\t\t//need to add the first point so we can loop around for collision detection\n\t\t\trectangle.add(rectangle.get(0));\n\t\t\tcreateBall(gl);\n\t\t\tmovePoint(rectangle);\n\n\t\t}\n\t\telse if(shape2)\n\t\t{\t\n\t\t\tsetColor(gl, red, green, blue);\n\t\t\t//gives us the points for the shape\n\t\t\thexagon = drawGon(gl, 6, getWidth() / 2, getHeight() / 2, (int)(rectHeight / 2));\n\t\t\tcreateBall(gl);\n\t\t\tmovePoint(hexagon);\n\n\t\t}\n\t\telse if(shape3)\n\t\t{\n\t\t\tsetColor(gl, red, green, blue);\n\t\t\t//gives us the points for the shape\n\t\t\tcircle = drawGon(gl, 32, getWidth() / 2, getHeight() / 2, (int)(rectHeight / 2));\n\t\t\tcreateBall(gl);\n\t\t\tmovePoint(circle);\n\t\t}\n\t\telse if(shape4)\n\t\t{\t\n\t\t\tsetColor(gl, red, green, blue);\n\t\t\t//gives us the points for the shape\n\t\t\tweirdPoly = fillPoly(gl,(int)(getWidth() / 2) , (int)(getHeight() / 2), pointArray);\n\t\t\t//need to add the first point so we can loop around for collision detection\n\t\t\tweirdPoly.add(weirdPoly.get(0));\n\t\t\tcreateBall(gl);\n\t\t\tmovePoint(weirdPoly);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Do Nothing??\n\t\t}\n\n\t}", "@Override\n public void fill(GL2 gl) {\n super.draw(gl);\n }", "protected abstract void draw();", "void drawInterior(DrawContext dc, Object shape);", "@Override\n public void onDrawFrame(GL10 glUnused) {\n // Clear the rendering surface.\n glClear(GL_COLOR_BUFFER_BIT);\n\n\n\t\tglUniform4f(uColorLocation, 1.0f, 1.0f, 1.0f, 0.0f);\n\t\tglDrawArrays(GL_LINES, 0, 108);\n\n\t\tglUniform4f(uColorLocation, 1.0f, 1.0f, 1.0f, 0.0f);\n\t\tglDrawArrays(GL_LINES, 108, 40);\n\t\t\n\t\tglUniform4f(uColorLocation, 1.0f, 1.0f, 0.0f, 0.0f);\n\t\tglDrawArrays(GL_TRIANGLES, 148, 988);\n\t\t\n\t\tglUniform4f(uColorLocation, 1.0f, 1.0f, 1.0f, 0.0f);\n\t\tglDrawArrays(GL_TRIANGLES, 988, 997);\n\t\t\n\t\tglUniform4f(uColorLocation, 1.0f, 1.0f, 1.0f, 0.0f);\n\t\tglDrawArrays(GL_TRIANGLES, 997, 6);\n\t\n\t\tglUniform4f(uColorLocation, 0.0f, 0.0f, 1.0f, 0.0f);\n\t\tglDrawArrays(GL_TRIANGLES, 1003, 6);\n\t\t\n\t\tglUniform4f(uColorLocation, 0.5f, 0.5f, 0.5f, 0.5f);\n\t\tglDrawArrays(GL_TRIANGLES, 1009, 9);\n }", "protected abstract void updateShapeColor(Color color);", "@Override\n public void fill(GL2 gl) {\n draw(gl);\n }", "@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT);\n\t\tgl.glLineWidth(3);\n\t\t// gl.glPointSize(10);\n\t\tgl.glEnable(GL10.GL_POINT_SMOOTH);\n\t\tray.dibuja(gl);\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (m[i][j] != 0) {\n\t\t\t\t\tif (m[i][j]==1) {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,8);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,8);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t/*if(sw){\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcruz.dibuja(gl);\n\t\t\t\t\t}*/\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t}", "public void bolita2() {\n fill(colores[f]); // Color random seg\\u00fan array anteriormente mencionado.\n noStroke();\n ellipse(y, x, a, b);\n }", "@FXML\r\n private void crearTriangulo(ActionEvent event) {\n \r\n double x[] = {100, 150, 50};\r\n double y[] = {100, 210, 210, 50};\r\n \r\n g.setFill(Color.GOLD);\r\n g.fillPolygon(x, y, 3);\r\n }", "@Override\r\n public void draw(final BufferedImage image) {\r\n for (int i = xStart; i < xStart + length; i++) {\r\n for (int j = yStart; j < yStart + height; j++) {\r\n if (i >= image.getWidth()) {\r\n break;\r\n } else if (j >= image.getHeight()) {\r\n break;\r\n }\r\n if (i == xStart) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n } else if (j == yStart) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n } else if (i == xStart + length - 1) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n } else if (j == yStart + height - 1) {\r\n image.setRGB(i, j, rgbaLat.getRGB());\r\n continue;\r\n }\r\n image.setRGB(i, j, rgbaInt.getRGB());\r\n }\r\n }\r\n }", "public void randBalloonColor(Graphics art)\n\t{\n\t\tart.setColor(Color.white);\n\t\tart.fillRect(0, 0, 900, 150);\n\t\tcount++;\n\t\tif(count % 100 == 0)\n\t\t{\n\t\t\trandomColor = colors[gen.nextInt(colors.length)];\n\t\t}\n\t\tart.setColor(Color.red);\n\t\tart.setColor(randomColor);\n\t\tart.fillOval(750, 47, 55, 70);\n\t\t\n\t}", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public static void test1() {\n int n1 = 100, n2 = 100, n3 = 100;\n float v = 1.0f, d = 20.0f;\n float[][][] paint = new float[n3][n2][n1];\n /*\n for (int i3=0; i3<n3; ++i3) {\n for (int i2=0; i2<n2; ++i2) {\n for (int i1=0; i1<n1; ++i1) {\n if (i3<n3/2) cae.paint[i3][i2][i1] = 1.0f;\n }\n }\n }\n */\n Painting3Group p3g = new Painting3Group(paint);\n SphereBrush pb = new SphereBrush();\n Painting3 p3 = p3g.getPainting3();\n// p3.paintAt(50,60,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n p3.paintAt(50,50,50,v,d,pb);\n Contour c = p3.getContour(v);\n\n SimpleFrame sf = new SimpleFrame();\n sf.setTitle(\"Formation\");\n World world = sf.getWorld();\n TriangleGroup tg = new TriangleGroup(c.i,c.x);\n world.addChild(tg);\n sf.setSize(1250,900);\n }", "private void generateColors(){\n\t\tRandom r = new Random();\n\t\tcurrentIndex = 0;\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tcolors[i] = COLORS_DEFAULT[r.nextInt(COLORS_DEFAULT.length)];\n\t\t}\n\t}", "@Override\n public void init() {\n glEnable( GL_BLEND );\n glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );\n glEnable( GL_LINE_SMOOTH );\n glEnable( GL_POINT_SMOOTH );\n }", "private ArrayList<Vector2f> drawRasterLine(Graphics g, Vector2f p0, Vector2f p1) {\r\n g.setColor(Color.BLUE);\r\n // Storage for drawn points\r\n ArrayList<Vector2f> vertices = new ArrayList<>();\r\n // Get pixels on the canvas\r\n int x0 = (int) world2Pixel(p0).x;\r\n int y0 = (int) world2Pixel(p0).y;\r\n int x1 = (int) world2Pixel(p1).x;\r\n int y1 = (int) world2Pixel(p1).y;\r\n // Delta x\r\n float dx = Math.abs(x1 - x0);\r\n // Step for x-value\r\n int sx = x0 < x1 ? 1 : -1;\r\n // Delta y\r\n float dy = -Math.abs(y1 - y0);\r\n // Step for y-value\r\n int sy = y0 < y1 ? 1 : -1;\r\n // Error values to determine with step to take\r\n float err = dx + dy, e2;\r\n // Loop until algorithm has finished\r\n while(true) {\r\n // Draw point on current coordinates\r\n g.drawArc(x0, y0, 1, 1, 0, 360);\r\n // Add point to drawn points list\r\n vertices.add(new Vector2f(x0, y0));\r\n // Loop condition\r\n if (x0==x1 && y0==y1) break;\r\n // Check which step to take for next point to draw\r\n e2 = 2 * err;\r\n if (e2 > dy) {\r\n err += dy;\r\n x0 += sx;\r\n }\r\n if (e2 < dx) {\r\n err += dx;\r\n y0 += sy;\r\n }\r\n }\r\n // Return all drawn points\r\n return vertices;\r\n }", "@Override\r\n public final void draw(final Rectangle r, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(r.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(r.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(r.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(r.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(r.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(r.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(r.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n\r\n draw(new Line((String.valueOf(r.getxSus())), String.valueOf(r.getySus()),\r\n String.valueOf(r.getxSus() + r.getLungime() - 1), String.valueOf(r.getySus()),\r\n color, String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus()), String.valueOf(r.getxSus() + r.getLungime() - 1),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus())),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus()), color, String.valueOf(r.getBorderColor().getAlpha()),\r\n paper), paper);\r\n\r\n for (int i = r.getxSus() + 1; i < r.getxSus() + r.getLungime() - 1; i++) {\r\n for (int j = r.getySus() + 1; j < r.getySus() + r.getInaltime() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, r.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n }", "abstract void draw();", "abstract void draw();" ]
[ "0.67537814", "0.6673197", "0.6528442", "0.63967705", "0.6369414", "0.62828034", "0.62218523", "0.619657", "0.614921", "0.61287314", "0.6110629", "0.60931474", "0.6092945", "0.60579103", "0.6050559", "0.60449", "0.6038101", "0.6031941", "0.59985787", "0.5998514", "0.5991604", "0.59813654", "0.5957287", "0.5931845", "0.5905053", "0.59047055", "0.58797115", "0.58741003", "0.5846024", "0.581798", "0.5792783", "0.57908946", "0.5789684", "0.57833815", "0.57711667", "0.5770905", "0.5751601", "0.5744226", "0.57385904", "0.57385004", "0.57251376", "0.5713143", "0.5707062", "0.5702121", "0.569697", "0.56955355", "0.56906146", "0.56894064", "0.568414", "0.56817585", "0.5671025", "0.56622237", "0.5653332", "0.56532556", "0.56471825", "0.5640707", "0.56369084", "0.5628238", "0.56268203", "0.5613272", "0.5610381", "0.56054366", "0.5599957", "0.5592604", "0.559186", "0.5590586", "0.55869013", "0.55772704", "0.5571237", "0.5553372", "0.5553117", "0.55252445", "0.5520391", "0.551451", "0.55138695", "0.5511094", "0.5511094", "0.55093753", "0.5504692", "0.5490141", "0.5486085", "0.5476569", "0.54687965", "0.5468586", "0.5466118", "0.54647905", "0.54510516", "0.5446623", "0.54443276", "0.54419154", "0.5440304", "0.5439969", "0.54345256", "0.54236454", "0.54179525", "0.54145604", "0.5412268", "0.54109347", "0.540781", "0.54041266", "0.54041266" ]
0.0
-1
Referenced classes of package com.google.android.gms.tagmanager: cj, ck
interface cm { public abstract void f(com.google.android.gms.internal.d.a a); public abstract cj lS(); public abstract cj lT(); public abstract ck lU(); public abstract ck lV(); public abstract ck lW(); public abstract ck lX(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}", "String getCTag();", "private Map<String, C0148k> m471c() {\n HashMap hashMap = new HashMap();\n try {\n Class.forName(\"com.google.android.gms.ads.AdView\");\n C0148k kVar = new C0148k(\"com.google.firebase.firebase-ads\", \"0.0.0\", \"binary\");\n hashMap.put(kVar.mo326a(), kVar);\n C0135c.m449h().mo273b(\"Fabric\", \"Found kit: com.google.firebase.firebase-ads\");\n } catch (Exception unused) {\n }\n return hashMap;\n }", "private static com.google.android.gms.dynamite.zzj zzaT(android.content.Context r4) {\n /*\n java.lang.Class<com.google.android.gms.dynamite.DynamiteModule> r0 = com.google.android.gms.dynamite.DynamiteModule.class\n monitor-enter(r0)\n com.google.android.gms.dynamite.zzj r1 = zzaSG // Catch:{ all -> 0x0069 }\n if (r1 == 0) goto L_0x000b\n com.google.android.gms.dynamite.zzj r4 = zzaSG // Catch:{ all -> 0x0069 }\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r4\n L_0x000b:\n com.google.android.gms.common.zze r1 = com.google.android.gms.common.zze.zzoW() // Catch:{ all -> 0x0069 }\n int r1 = r1.isGooglePlayServicesAvailable(r4) // Catch:{ all -> 0x0069 }\n r2 = 0\n if (r1 == 0) goto L_0x0018\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r2\n L_0x0018:\n java.lang.String r1 = \"com.google.android.gms\"\n r3 = 3\n android.content.Context r4 = r4.createPackageContext(r1, r3) // Catch:{ Exception -> 0x004d }\n java.lang.ClassLoader r4 = r4.getClassLoader() // Catch:{ Exception -> 0x004d }\n java.lang.String r1 = \"com.google.android.gms.chimera.container.DynamiteLoaderImpl\"\n java.lang.Class r4 = r4.loadClass(r1) // Catch:{ Exception -> 0x004d }\n java.lang.Object r4 = r4.newInstance() // Catch:{ Exception -> 0x004d }\n android.os.IBinder r4 = (android.os.IBinder) r4 // Catch:{ Exception -> 0x004d }\n if (r4 != 0) goto L_0x0033\n r4 = r2\n goto L_0x0047\n L_0x0033:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoader\"\n android.os.IInterface r1 = r4.queryLocalInterface(r1) // Catch:{ Exception -> 0x004d }\n boolean r3 = r1 instanceof com.google.android.gms.dynamite.zzj // Catch:{ Exception -> 0x004d }\n if (r3 == 0) goto L_0x0041\n r4 = r1\n com.google.android.gms.dynamite.zzj r4 = (com.google.android.gms.dynamite.zzj) r4 // Catch:{ Exception -> 0x004d }\n goto L_0x0047\n L_0x0041:\n com.google.android.gms.dynamite.zzk r1 = new com.google.android.gms.dynamite.zzk // Catch:{ Exception -> 0x004d }\n r1.<init>(r4) // Catch:{ Exception -> 0x004d }\n r4 = r1\n L_0x0047:\n if (r4 == 0) goto L_0x0067\n zzaSG = r4 // Catch:{ Exception -> 0x004d }\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r4\n L_0x004d:\n r4 = move-exception\n java.lang.String r1 = \"Failed to load IDynamiteLoader from GmsCore: \"\n java.lang.String r4 = r4.getMessage() // Catch:{ all -> 0x0069 }\n java.lang.String r4 = java.lang.String.valueOf(r4) // Catch:{ all -> 0x0069 }\n int r3 = r4.length() // Catch:{ all -> 0x0069 }\n if (r3 == 0) goto L_0x0062\n r1.concat(r4) // Catch:{ all -> 0x0069 }\n goto L_0x0067\n L_0x0062:\n java.lang.String r4 = new java.lang.String // Catch:{ all -> 0x0069 }\n r4.<init>(r1) // Catch:{ all -> 0x0069 }\n L_0x0067:\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r2\n L_0x0069:\n r4 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zzaT(android.content.Context):com.google.android.gms.dynamite.zzj\");\n }", "int getTagClass();", "public interface TAG_JAVA_CODEBASE\n{\n\n /**\n * Class downloading is supported for stubs, ties, values, and \n * value helpers. The specification allows transmission of codebase \n * information on the wire for stubs and ties, and enables usage of \n * pre-existing ClassLoaders when relevant. \n * <p>\n * For values and value helpers, the codebase is transmitted after the \n * value tag. For stubs and ties, the codebase is transmitted as \n * the TaggedComponent <code>TAG_JAVA_CODEBASE</code> in the IOR \n * profile, where the <code>component_data</code> is a CDR encapsulation \n * of the codebase written as an IDL string. The codebase is a \n * space-separated list of one or more URLs.\n */\n public static final int value = (int)(25L);\n}", "private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }", "ReferencesPackage getReferencesPackage();", "void registerReferencing (ClassType c) {\r\n if (referencing_classes == null) \r\n referencing_classes = new ClassList ();\r\n else if (referencing_classes.contains (c)) \r\n return;\r\n\r\n referencing_classes.add (c);\r\n }", "public void buildClassTagInfo() {\n\t\twriter.writeClassTagInfo();\n\t}", "public final /* synthetic */ Object zzpq() {\n \n /* JADX ERROR: Method code generation error\n jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x0004: INVOKE (wrap: android.content.Context\n 0x0000: IGET (r0v0 android.content.Context) = (r2v0 'this' com.google.android.gms.internal.ads.zzwo A[THIS]) com.google.android.gms.internal.ads.zzwo.val$context android.content.Context), (wrap: java.lang.String\n 0x0002: CONST_STR (r1v0 java.lang.String) = \"native_ad\") com.google.android.gms.internal.ads.zzwj.zzb(android.content.Context, java.lang.String):void type: STATIC in method: com.google.android.gms.internal.ads.zzwo.zzpq():java.lang.Object, dex: classes2.dex\n \tat jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:245)\n \tat jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:213)\n \tat jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:109)\n \tat jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:55)\n \tat jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)\n \tat jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)\n \tat jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:210)\n \tat jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:203)\n \tat jadx.core.codegen.ClassGen.addMethod(ClassGen.java:316)\n \tat jadx.core.codegen.ClassGen.addMethods(ClassGen.java:262)\n \tat jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:225)\n \tat jadx.core.codegen.ClassGen.addClassCode(ClassGen.java:110)\n \tat jadx.core.codegen.ClassGen.makeClass(ClassGen.java:76)\n \tat jadx.core.codegen.CodeGen.wrapCodeGen(CodeGen.java:44)\n \tat jadx.core.codegen.CodeGen.generateJavaCode(CodeGen.java:32)\n \tat jadx.core.codegen.CodeGen.generate(CodeGen.java:20)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:36)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217)\n Caused by: java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -2 is negative\n \tat java.base/java.util.ArrayList.shiftTailOverGap(Unknown Source)\n \tat java.base/java.util.ArrayList.removeIf(Unknown Source)\n \tat java.base/java.util.ArrayList.removeIf(Unknown Source)\n \tat jadx.core.dex.instructions.args.SSAVar.removeUse(SSAVar.java:86)\n \tat jadx.core.utils.InsnRemover.unbindArgUsage(InsnRemover.java:90)\n \tat jadx.core.dex.nodes.InsnNode.replaceArg(InsnNode.java:130)\n \tat jadx.core.codegen.InsnGen.inlineMethod(InsnGen.java:892)\n \tat jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:669)\n \tat jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:357)\n \tat jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:239)\n \t... 19 more\n */\n /*\n this = this;\n android.content.Context r0 = r2.val$context\n java.lang.String r1 = \"native_ad\"\n com.google.android.gms.internal.ads.zzwj.zza(r0, r1)\n com.google.android.gms.internal.ads.zzzh r0 = new com.google.android.gms.internal.ads.zzzh\n r0.<init>()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzwo.zzpq():java.lang.Object\");\n }", "private void buildReferencedClassSet() throws CheckedAnalysisException, InterruptedException {\n\n if (PROGRESS) {\n System.out.println(\"Adding referenced classes\");\n }\n Set<String> referencedPackageSet = new HashSet<String>();\n\n LinkedList<ClassDescriptor> workList = new LinkedList<ClassDescriptor>();\n workList.addAll(appClassList);\n\n Set<ClassDescriptor> seen = new HashSet<ClassDescriptor>();\n Set<ClassDescriptor> appClassSet = new HashSet<ClassDescriptor>(appClassList);\n\n Set<ClassDescriptor> badAppClassSet = new HashSet<ClassDescriptor>();\n HashSet<ClassDescriptor> knownDescriptors = new HashSet<ClassDescriptor>(DescriptorFactory.instance()\n .getAllClassDescriptors());\n int count = 0;\n Set<ClassDescriptor> addedToWorkList = new HashSet<ClassDescriptor>(appClassList);\n\n // add fields\n //noinspection ConstantIfStatement\n if (false)\n for (ClassDescriptor classDesc : appClassList) {\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n for (XField f : classNameAndInfo.getXFields()) {\n String sig = f.getSignature();\n ClassDescriptor d = DescriptorFactory.createClassDescriptorFromFieldSignature(sig);\n if (d != null && addedToWorkList.add(d))\n workList.addLast(d);\n }\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n\n while (!workList.isEmpty()) {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n ClassDescriptor classDesc = workList.removeFirst();\n\n if (seen.contains(classDesc)) {\n continue;\n }\n seen.add(classDesc);\n\n if (!knownDescriptors.contains(classDesc)) {\n count++;\n if (PROGRESS && count % 5000 == 0) {\n System.out.println(\"Adding referenced class \" + classDesc);\n }\n }\n\n referencedPackageSet.add(classDesc.getPackageName());\n\n // Get list of referenced classes and add them to set.\n // Add superclasses and superinterfaces to worklist.\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n\n ClassDescriptor superclassDescriptor = classNameAndInfo.getSuperclassDescriptor();\n if (superclassDescriptor != null && addedToWorkList.add(superclassDescriptor)) {\n workList.addLast(superclassDescriptor);\n }\n\n for (ClassDescriptor ifaceDesc : classNameAndInfo.getInterfaceDescriptorList()) {\n if (addedToWorkList.add(ifaceDesc))\n workList.addLast(ifaceDesc);\n }\n\n ClassDescriptor enclosingClass = classNameAndInfo.getImmediateEnclosingClass();\n if (enclosingClass != null && addedToWorkList.add(enclosingClass))\n workList.addLast(enclosingClass);\n\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (CheckedAnalysisException e) {\n // Failed to scan a referenced class --- just log the error and\n // continue\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n // Delete any application classes that could not be read\n appClassList.removeAll(badAppClassSet);\n DescriptorFactory.instance().purge(badAppClassSet);\n\n for (ClassDescriptor d : DescriptorFactory.instance().getAllClassDescriptors()) {\n referencedPackageSet.add(d.getPackageName());\n }\n referencedClassSet = new ArrayList<ClassDescriptor>(DescriptorFactory.instance().getAllClassDescriptors());\n\n // Based on referenced packages, add any resolvable package-info classes\n // to the set of referenced classes.\n if (PROGRESS) {\n referencedPackageSet.remove(\"\");\n System.out.println(\"Added \" + count + \" referenced classes\");\n System.out.println(\"Total of \" + referencedPackageSet.size() + \" packages\");\n for (ClassDescriptor d : referencedClassSet)\n System.out.println(\" \" + d);\n\n }\n\n }", "Report.LocationOuterClass.GCJ02OrBuilder getGcj02OrBuilder();", "void registerAsUsed (ClassType c, int pos) {\r\n if (used_classes == null) {\r\n used_classes = new java.util.Vector ();\r\n used_class_offsets = new java.util.Vector ();\r\n }\r\n used_classes.addElement (c);\r\n used_class_offsets.addElement (new Integer (pos));\r\n }", "protected String xCB() { return WhiteStilettoAliasRefCB.class.getName(); }", "public String mo27383j() {\n return \"com.google.android.gms.location.internal.IGoogleLocationManagerService\";\n }", "public String getPKCClass();", "public static com.google.android.gms.internal.zzpc zza(android.support.p000v4.app.FragmentActivity r3) {\n /*\n r0 = zzaoq;\n r0 = r0.get(r3);\n r0 = (java.lang.ref.WeakReference) r0;\n if (r0 == 0) goto L_0x0013;\n L_0x000a:\n r0 = r0.get();\n r0 = (com.google.android.gms.internal.zzpc) r0;\n if (r0 == 0) goto L_0x0013;\n L_0x0012:\n return r0;\n L_0x0013:\n r0 = r3.getSupportFragmentManager();\t Catch:{ ClassCastException -> 0x0048 }\n r1 = \"SupportLifecycleFragmentImpl\";\n r0 = r0.findFragmentByTag(r1);\t Catch:{ ClassCastException -> 0x0048 }\n r0 = (com.google.android.gms.internal.zzpc) r0;\t Catch:{ ClassCastException -> 0x0048 }\n if (r0 == 0) goto L_0x0027;\n L_0x0021:\n r1 = r0.isRemoving();\n if (r1 == 0) goto L_0x003d;\n L_0x0027:\n r0 = new com.google.android.gms.internal.zzpc;\n r0.<init>();\n r1 = r3.getSupportFragmentManager();\n r1 = r1.beginTransaction();\n r2 = \"SupportLifecycleFragmentImpl\";\n r1 = r1.add(r0, r2);\n r1.commitAllowingStateLoss();\n L_0x003d:\n r1 = zzaoq;\n r2 = new java.lang.ref.WeakReference;\n r2.<init>(r0);\n r1.put(r3, r2);\n goto L_0x0012;\n L_0x0048:\n r0 = move-exception;\n r1 = new java.lang.IllegalStateException;\n r2 = \"Fragment with tag SupportLifecycleFragmentImpl is not a SupportLifecycleFragmentImpl\";\n r1.<init>(r2, r0);\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzpc.zza(android.support.v4.app.FragmentActivity):com.google.android.gms.internal.zzpc\");\n }", "public interface C15428f {\n\n /* renamed from: com.ss.android.ugc.asve.context.f$a */\n public static final class C15429a {\n /* renamed from: a */\n public static String m45146a(C15428f fVar) {\n return \"\";\n }\n\n /* renamed from: b */\n public static String m45147b(C15428f fVar) {\n return \"\";\n }\n }\n\n /* renamed from: a */\n boolean mo38970a();\n\n /* renamed from: b */\n String mo38971b();\n\n /* renamed from: c */\n String mo38972c();\n\n /* renamed from: d */\n int mo38973d();\n\n /* renamed from: e */\n int mo38974e();\n}", "public interface C0190d extends IInterface {\n\n /* renamed from: com.google.android.gms.dynamic.d$a */\n public static abstract class C0575a extends Binder implements C0190d {\n\n /* renamed from: com.google.android.gms.dynamic.d$a$a */\n private static class C0574a implements C0190d {\n private IBinder kn;\n\n C0574a(IBinder iBinder) {\n this.kn = iBinder;\n }\n\n public IBinder asBinder() {\n return this.kn;\n }\n }\n\n public C0575a() {\n attachInterface(this, \"com.google.android.gms.dynamic.IObjectWrapper\");\n }\n\n /* renamed from: K */\n public static C0190d m1749K(IBinder iBinder) {\n if (iBinder == null) {\n return null;\n }\n IInterface queryLocalInterface = iBinder.queryLocalInterface(\"com.google.android.gms.dynamic.IObjectWrapper\");\n return (queryLocalInterface == null || !(queryLocalInterface instanceof C0190d)) ? new C0574a(iBinder) : (C0190d) queryLocalInterface;\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {\n switch (code) {\n case 1598968902:\n reply.writeString(\"com.google.android.gms.dynamic.IObjectWrapper\");\n return true;\n default:\n return super.onTransact(code, data, reply, flags);\n }\n }\n }\n}", "public interface ClassifierClass extends javax.jmi.reflect.RefClass {\n}", "public interface C1326d extends IInterface {\n\n /* renamed from: com.google.android.gms.plus.internal.d$a */\n public static abstract class C1327a extends Binder implements C1326d {\n\n /* renamed from: com.google.android.gms.plus.internal.d$a$a */\n private static class C1328a implements C1326d {\n\n /* renamed from: ky */\n private IBinder f3425ky;\n\n C1328a(IBinder iBinder) {\n this.f3425ky = iBinder;\n }\n\n /* renamed from: a */\n public void mo7372a(C0802fh fhVar) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n if (fhVar != null) {\n obtain.writeInt(1);\n fhVar.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.f3425ky.transact(4, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7373a(C1320b bVar) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n this.f3425ky.transact(8, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7374a(C1320b bVar, int i, int i2, int i3, String str) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeInt(i);\n obtain.writeInt(i2);\n obtain.writeInt(i3);\n obtain.writeString(str);\n this.f3425ky.transact(16, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7375a(C1320b bVar, int i, String str, Uri uri, String str2, String str3) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeInt(i);\n obtain.writeString(str);\n if (uri != null) {\n obtain.writeInt(1);\n uri.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n obtain.writeString(str2);\n obtain.writeString(str3);\n this.f3425ky.transact(14, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7376a(C1320b bVar, Uri uri, Bundle bundle) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n if (uri != null) {\n obtain.writeInt(1);\n uri.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n if (bundle != null) {\n obtain.writeInt(1);\n bundle.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.f3425ky.transact(9, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7377a(C1320b bVar, C0802fh fhVar) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n if (fhVar != null) {\n obtain.writeInt(1);\n fhVar.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.f3425ky.transact(45, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7378a(C1320b bVar, String str) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeString(str);\n this.f3425ky.transact(1, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7379a(C1320b bVar, String str, String str2) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeString(str);\n obtain.writeString(str2);\n this.f3425ky.transact(2, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: a */\n public void mo7380a(C1320b bVar, List<String> list) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeStringList(list);\n this.f3425ky.transact(34, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n public IBinder asBinder() {\n return this.f3425ky;\n }\n\n /* renamed from: b */\n public void mo7381b(C1320b bVar) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n this.f3425ky.transact(19, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: b */\n public void mo7382b(C1320b bVar, String str) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeString(str);\n this.f3425ky.transact(3, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: c */\n public void mo7383c(C1320b bVar, String str) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeString(str);\n this.f3425ky.transact(18, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n public void clearDefaultAccount() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n this.f3425ky.transact(6, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: d */\n public void mo7385d(C1320b bVar, String str) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeString(str);\n this.f3425ky.transact(40, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: e */\n public void mo7386e(C1320b bVar, String str) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeString(str);\n this.f3425ky.transact(44, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n public String getAccountName() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n this.f3425ky.transact(5, obtain, obtain2, 0);\n obtain2.readException();\n return obtain2.readString();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: hl */\n public String mo7388hl() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n this.f3425ky.transact(41, obtain, obtain2, 0);\n obtain2.readException();\n return obtain2.readString();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: hm */\n public boolean mo7389hm() throws RemoteException {\n boolean z = false;\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n this.f3425ky.transact(42, obtain, obtain2, 0);\n obtain2.readException();\n if (obtain2.readInt() != 0) {\n z = true;\n }\n return z;\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n /* renamed from: hn */\n public String mo7390hn() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n this.f3425ky.transact(43, obtain, obtain2, 0);\n obtain2.readException();\n return obtain2.readString();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n\n public void removeMoment(String momentId) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeString(momentId);\n this.f3425ky.transact(17, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }\n }\n\n /* renamed from: aA */\n public static C1326d m3858aA(IBinder iBinder) {\n if (iBinder == null) {\n return null;\n }\n IInterface queryLocalInterface = iBinder.queryLocalInterface(\"com.google.android.gms.plus.internal.IPlusService\");\n return (queryLocalInterface == null || !(queryLocalInterface instanceof C1326d)) ? new C1328a(iBinder) : (C1326d) queryLocalInterface;\n }\n\n /* JADX WARNING: type inference failed for: r4v0 */\n /* JADX WARNING: type inference failed for: r4v1, types: [com.google.android.gms.internal.fh] */\n /* JADX WARNING: type inference failed for: r4v2, types: [com.google.android.gms.internal.fh] */\n /* JADX WARNING: type inference failed for: r4v4, types: [android.net.Uri] */\n /* JADX WARNING: type inference failed for: r0v38, types: [android.net.Uri] */\n /* JADX WARNING: type inference failed for: r4v5 */\n /* JADX WARNING: type inference failed for: r4v6 */\n /* JADX WARNING: Multi-variable type inference failed. Error: jadx.core.utils.exceptions.JadxRuntimeException: No candidate types for var: r4v0\n assigns: [?[int, float, boolean, short, byte, char, OBJECT, ARRAY], ?[OBJECT, ARRAY], com.google.android.gms.internal.fh]\n uses: [com.google.android.gms.internal.fh, android.net.Uri]\n mth insns count: 188\n \tat jadx.core.dex.visitors.typeinference.TypeSearch.fillTypeCandidates(TypeSearch.java:237)\n \tat java.base/java.util.ArrayList.forEach(ArrayList.java:1540)\n \tat jadx.core.dex.visitors.typeinference.TypeSearch.run(TypeSearch.java:53)\n \tat jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runMultiVariableSearch(TypeInferenceVisitor.java:99)\n \tat jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:92)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27)\n \tat jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14)\n \tat java.base/java.util.ArrayList.forEach(ArrayList.java:1540)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n \tat jadx.core.dex.visitors.DepthTraversal.lambda$visit$0(DepthTraversal.java:13)\n \tat java.base/java.util.ArrayList.forEach(ArrayList.java:1540)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:13)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:30)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217)\n */\n /* JADX WARNING: Unknown variable types count: 3 */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public boolean onTransact(int r9, android.os.Parcel r10, android.os.Parcel r11, int r12) throws android.os.RemoteException {\n /*\n r8 = this;\n r4 = 0\n r7 = 1\n switch(r9) {\n case 1: goto L_0x0010;\n case 2: goto L_0x0028;\n case 3: goto L_0x0044;\n case 4: goto L_0x005c;\n case 5: goto L_0x0076;\n case 6: goto L_0x0086;\n case 8: goto L_0x0093;\n case 9: goto L_0x00a8;\n case 14: goto L_0x00de;\n case 16: goto L_0x0113;\n case 17: goto L_0x0139;\n case 18: goto L_0x014a;\n case 19: goto L_0x0163;\n case 34: goto L_0x0178;\n case 40: goto L_0x0191;\n case 41: goto L_0x01aa;\n case 42: goto L_0x01bb;\n case 43: goto L_0x01d1;\n case 44: goto L_0x01e2;\n case 45: goto L_0x01fb;\n case 1598968902: goto L_0x000a;\n default: goto L_0x0005;\n }\n L_0x0005:\n boolean r7 = super.onTransact(r9, r10, r11, r12)\n L_0x0009:\n return r7\n L_0x000a:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r11.writeString(r0)\n goto L_0x0009\n L_0x0010:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n java.lang.String r1 = r10.readString()\n r8.mo7378a(r0, r1)\n r11.writeNoException()\n goto L_0x0009\n L_0x0028:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n java.lang.String r1 = r10.readString()\n java.lang.String r2 = r10.readString()\n r8.mo7379a(r0, r1, r2)\n r11.writeNoException()\n goto L_0x0009\n L_0x0044:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n java.lang.String r1 = r10.readString()\n r8.mo7382b(r0, r1)\n r11.writeNoException()\n goto L_0x0009\n L_0x005c:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n int r0 = r10.readInt()\n if (r0 == 0) goto L_0x0074\n com.google.android.gms.internal.fi r0 = com.google.android.gms.internal.C0802fh.CREATOR\n com.google.android.gms.internal.fh r0 = r0.createFromParcel(r10)\n L_0x006d:\n r8.mo7372a(r0)\n r11.writeNoException()\n goto L_0x0009\n L_0x0074:\n r0 = r4\n goto L_0x006d\n L_0x0076:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n java.lang.String r0 = r8.getAccountName()\n r11.writeNoException()\n r11.writeString(r0)\n goto L_0x0009\n L_0x0086:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n r8.clearDefaultAccount()\n r11.writeNoException()\n goto L_0x0009\n L_0x0093:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n r8.mo7373a(r0)\n r11.writeNoException()\n goto L_0x0009\n L_0x00a8:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r2 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n int r0 = r10.readInt()\n if (r0 == 0) goto L_0x00da\n android.os.Parcelable$Creator r0 = android.net.Uri.CREATOR\n java.lang.Object r0 = r0.createFromParcel(r10)\n android.net.Uri r0 = (android.net.Uri) r0\n r1 = r0\n L_0x00c4:\n int r0 = r10.readInt()\n if (r0 == 0) goto L_0x00dc\n android.os.Parcelable$Creator r0 = android.os.Bundle.CREATOR\n java.lang.Object r0 = r0.createFromParcel(r10)\n android.os.Bundle r0 = (android.os.Bundle) r0\n L_0x00d2:\n r8.mo7376a(r2, r1, r0)\n r11.writeNoException()\n goto L_0x0009\n L_0x00da:\n r1 = r4\n goto L_0x00c4\n L_0x00dc:\n r0 = r4\n goto L_0x00d2\n L_0x00de:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r1 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n int r2 = r10.readInt()\n java.lang.String r3 = r10.readString()\n int r0 = r10.readInt()\n if (r0 == 0) goto L_0x0102\n android.os.Parcelable$Creator r0 = android.net.Uri.CREATOR\n java.lang.Object r0 = r0.createFromParcel(r10)\n android.net.Uri r0 = (android.net.Uri) r0\n r4 = r0\n L_0x0102:\n java.lang.String r5 = r10.readString()\n java.lang.String r6 = r10.readString()\n r0 = r8\n r0.mo7375a(r1, r2, r3, r4, r5, r6)\n r11.writeNoException()\n goto L_0x0009\n L_0x0113:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r1 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n int r2 = r10.readInt()\n int r3 = r10.readInt()\n int r4 = r10.readInt()\n java.lang.String r5 = r10.readString()\n r0 = r8\n r0.mo7374a(r1, r2, r3, r4, r5)\n r11.writeNoException()\n goto L_0x0009\n L_0x0139:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n java.lang.String r0 = r10.readString()\n r8.removeMoment(r0)\n r11.writeNoException()\n goto L_0x0009\n L_0x014a:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n java.lang.String r1 = r10.readString()\n r8.mo7383c(r0, r1)\n r11.writeNoException()\n goto L_0x0009\n L_0x0163:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n r8.mo7381b(r0)\n r11.writeNoException()\n goto L_0x0009\n L_0x0178:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n java.util.ArrayList r1 = r10.createStringArrayList()\n r8.mo7380a(r0, r1)\n r11.writeNoException()\n goto L_0x0009\n L_0x0191:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n java.lang.String r1 = r10.readString()\n r8.mo7385d(r0, r1)\n r11.writeNoException()\n goto L_0x0009\n L_0x01aa:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n java.lang.String r0 = r8.mo7388hl()\n r11.writeNoException()\n r11.writeString(r0)\n goto L_0x0009\n L_0x01bb:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n boolean r0 = r8.mo7389hm()\n r11.writeNoException()\n if (r0 == 0) goto L_0x01cf\n r0 = r7\n L_0x01ca:\n r11.writeInt(r0)\n goto L_0x0009\n L_0x01cf:\n r0 = 0\n goto L_0x01ca\n L_0x01d1:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n java.lang.String r0 = r8.mo7390hn()\n r11.writeNoException()\n r11.writeString(r0)\n goto L_0x0009\n L_0x01e2:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n java.lang.String r1 = r10.readString()\n r8.mo7386e(r0, r1)\n r11.writeNoException()\n goto L_0x0009\n L_0x01fb:\n java.lang.String r0 = \"com.google.android.gms.plus.internal.IPlusService\"\n r10.enforceInterface(r0)\n android.os.IBinder r0 = r10.readStrongBinder()\n com.google.android.gms.plus.internal.b r0 = com.google.android.gms.plus.internal.C1320b.C1321a.m3825ay(r0)\n int r1 = r10.readInt()\n if (r1 == 0) goto L_0x0214\n com.google.android.gms.internal.fi r1 = com.google.android.gms.internal.C0802fh.CREATOR\n com.google.android.gms.internal.fh r4 = r1.createFromParcel(r10)\n L_0x0214:\n r8.mo7377a(r0, r4)\n r11.writeNoException()\n goto L_0x0009\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.plus.internal.C1326d.C1327a.onTransact(int, android.os.Parcel, android.os.Parcel, int):boolean\");\n }\n }\n\n /* renamed from: a */\n void mo7372a(C0802fh fhVar) throws RemoteException;\n\n /* renamed from: a */\n void mo7373a(C1320b bVar) throws RemoteException;\n\n /* renamed from: a */\n void mo7374a(C1320b bVar, int i, int i2, int i3, String str) throws RemoteException;\n\n /* renamed from: a */\n void mo7375a(C1320b bVar, int i, String str, Uri uri, String str2, String str3) throws RemoteException;\n\n /* renamed from: a */\n void mo7376a(C1320b bVar, Uri uri, Bundle bundle) throws RemoteException;\n\n /* renamed from: a */\n void mo7377a(C1320b bVar, C0802fh fhVar) throws RemoteException;\n\n /* renamed from: a */\n void mo7378a(C1320b bVar, String str) throws RemoteException;\n\n /* renamed from: a */\n void mo7379a(C1320b bVar, String str, String str2) throws RemoteException;\n\n /* renamed from: a */\n void mo7380a(C1320b bVar, List<String> list) throws RemoteException;\n\n /* renamed from: b */\n void mo7381b(C1320b bVar) throws RemoteException;\n\n /* renamed from: b */\n void mo7382b(C1320b bVar, String str) throws RemoteException;\n\n /* renamed from: c */\n void mo7383c(C1320b bVar, String str) throws RemoteException;\n\n void clearDefaultAccount() throws RemoteException;\n\n /* renamed from: d */\n void mo7385d(C1320b bVar, String str) throws RemoteException;\n\n /* renamed from: e */\n void mo7386e(C1320b bVar, String str) throws RemoteException;\n\n String getAccountName() throws RemoteException;\n\n /* renamed from: hl */\n String mo7388hl() throws RemoteException;\n\n /* renamed from: hm */\n boolean mo7389hm() throws RemoteException;\n\n /* renamed from: hn */\n String mo7390hn() throws RemoteException;\n\n void removeMoment(String str) throws RemoteException;\n}", "private void onClassesFound(List<UMDClass> classes) {\n\t}", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "@objid (\"f3f8fb41-47e8-4136-9889-fc34aac3d3f9\")\n String getReferencedClassName();", "public interface PackageStatusNotifier {\n\n /* loaded from: classes.dex */\n public interface Listener {\n void onPackageChanged(String str, int i);\n }\n}", "public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }", "private static void m3301e(Context context) throws C1108a {\n try {\n byte[] d = f3068kj.mo6439d(C1159r.getKey());\n byte[] c = f3068kj.mo6438c(d, C1159r.m3507A());\n File cacheDir = context.getCacheDir();\n if (cacheDir == null) {\n cacheDir = context.getDir(\"dex\", 0);\n if (cacheDir == null) {\n throw new C1108a();\n }\n }\n File createTempFile = File.createTempFile(\"ads\", \".jar\", cacheDir);\n FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);\n fileOutputStream.write(c, 0, c.length);\n fileOutputStream.close();\n DexClassLoader dexClassLoader = new DexClassLoader(createTempFile.getAbsolutePath(), cacheDir.getAbsolutePath(), null, context.getClassLoader());\n Class loadClass = dexClassLoader.loadClass(m3299b(d, C1159r.m3508B()));\n Class loadClass2 = dexClassLoader.loadClass(m3299b(d, C1159r.m3514H()));\n Class loadClass3 = dexClassLoader.loadClass(m3299b(d, C1159r.m3512F()));\n Class loadClass4 = dexClassLoader.loadClass(m3299b(d, C1159r.m3518L()));\n Class loadClass5 = dexClassLoader.loadClass(m3299b(d, C1159r.m3510D()));\n Class loadClass6 = dexClassLoader.loadClass(m3299b(d, C1159r.m3516J()));\n f3061kc = loadClass.getMethod(m3299b(d, C1159r.m3509C()), new Class[0]);\n f3062kd = loadClass2.getMethod(m3299b(d, C1159r.m3515I()), new Class[0]);\n f3063ke = loadClass3.getMethod(m3299b(d, C1159r.m3513G()), new Class[]{Context.class});\n f3064kf = loadClass4.getMethod(m3299b(d, C1159r.m3519M()), new Class[]{MotionEvent.class, DisplayMetrics.class});\n f3065kg = loadClass5.getMethod(m3299b(d, C1159r.m3511E()), new Class[]{Context.class});\n f3066kh = loadClass6.getMethod(m3299b(d, C1159r.m3517K()), new Class[]{Context.class});\n String name = createTempFile.getName();\n createTempFile.delete();\n new File(cacheDir, name.replace(\".jar\", \".dex\")).delete();\n } catch (FileNotFoundException e) {\n throw new C1108a(e);\n } catch (IOException e2) {\n throw new C1108a(e2);\n } catch (ClassNotFoundException e3) {\n throw new C1108a(e3);\n } catch (C1157a e4) {\n throw new C1108a(e4);\n } catch (NoSuchMethodException e5) {\n throw new C1108a(e5);\n } catch (NullPointerException e6) {\n throw new C1108a(e6);\n }\n }", "zzcv(zzcr zzcr, GoogleApiClient googleApiClient, BleDevice bleDevice) {\n super(googleApiClient);\n this.zznb = bleDevice;\n }", "private Map<String, Integer> getTagClassesEnrichment(PersonActivity in) {\n\t\tList<String> tags = in.getCategoryKeys(CategoryType.FORUM);\n\n\t\tMap<String, Integer> tagClasses = tags.stream()\n\t\t\t\t.map(tag -> tagClassRelation.get(tag))\n\t\t\t\t.filter(x -> x != null)\n\t\t\t\t.flatMap(List::stream)\n\t\t\t\t.collect(Collectors.groupingBy(Function.identity(), Collectors.reducing(0, e -> 1, Integer::sum)));\n\n\t\treturn tagClasses;\n\t}", "@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }", "public interface C1255b {\n /* renamed from: a */\n public static final C1255b f3973a = new C34771();\n /* renamed from: b */\n public static final C1255b f3974b = new C34782();\n /* renamed from: c */\n public static final C1255b f3975c = new C34793();\n /* renamed from: d */\n public static final C1255b f3976d = f3974b;\n\n /* renamed from: com.bumptech.glide.load.engine.c.a$b$1 */\n class C34771 implements C1255b {\n /* renamed from: a */\n public void mo1031a(Throwable th) {\n }\n\n C34771() {\n }\n }\n\n /* renamed from: com.bumptech.glide.load.engine.c.a$b$2 */\n class C34782 implements C1255b {\n C34782() {\n }\n\n /* renamed from: a */\n public void mo1031a(Throwable th) {\n if (th != null && Log.isLoggable(\"GlideExecutor\", 6)) {\n Log.e(\"GlideExecutor\", \"Request threw uncaught throwable\", th);\n }\n }\n }\n\n /* renamed from: com.bumptech.glide.load.engine.c.a$b$3 */\n class C34793 implements C1255b {\n C34793() {\n }\n\n /* renamed from: a */\n public void mo1031a(Throwable th) {\n if (th != null) {\n throw new RuntimeException(\"Request threw uncaught throwable\", th);\n }\n }\n }\n\n /* renamed from: a */\n void mo1031a(Throwable th);\n }", "private void enforceTransitiveClassUsage() {\n HashSet<String> tmp = new HashSet<String>(usedAppClasses);\n for(String className : tmp) {\n enforceTransitiveClassUsage(className);\n }\n }", "public ClassTypeManagerImpl(JNIEasyImpl jniEasy)\n {\n this.jniEasy = jniEasy;\n this.classTypeFinder = new ClassTypeFinder(this);\n \n ClassTypeNativeImpl.registerAllClassTypes(this); // He calculado que tarda algo más de un segundo, pero yo creo que vale la pena\n }", "private TagsBenchmarksUtil() {}", "protected ArrayList<String> getClassKeyword(ClassDoc classdoc) {\n String cltypelower = classdoc.isInterface() ? \"interface\" : \"class\";\n ArrayList<String> metakeywords = new ArrayList<>(1);\n metakeywords.add(classdoc.qualifiedName() + \" \" + cltypelower);\n return metakeywords;\n }", "@Override\n String getClassRef() {\n return this.classNode.name;\n }", "public interface C35590c {\n /* renamed from: a */\n void mo56317a(Context context, Bundle bundle, C4541a c4541a);\n}", "Report.LocationOuterClass.GCJ02 getGcj02();", "public final String mo38131b() {\n return \"com.google.android.gms.ads.internal.cache.ICacheService\";\n }", "public GCMIntentService() {\n super(\"GCMIntentService\");\n\n }", "private static Set<C3246b> m11182c(List<Component<?>> list) {\n Set<C3246b> set;\n HashMap hashMap = new HashMap(list.size());\n for (Component next : list) {\n C3246b bVar = new C3246b(next);\n Iterator it = next.getProvidedInterfaces().iterator();\n while (true) {\n if (it.hasNext()) {\n Class cls = (Class) it.next();\n C3247c cVar = new C3247c(cls, !next.isValue());\n if (!hashMap.containsKey(cVar)) {\n hashMap.put(cVar, new HashSet());\n }\n Set set2 = (Set) hashMap.get(cVar);\n if (set2.isEmpty() || cVar.f18935b) {\n set2.add(bVar);\n } else {\n throw new IllegalArgumentException(String.format(\"Multiple components provide %s.\", new Object[]{cls}));\n }\n }\n }\n }\n for (Set<C3246b> it2 : hashMap.values()) {\n for (C3246b bVar2 : it2) {\n for (Dependency next2 : bVar2.mo20819c().getDependencies()) {\n if (next2.isDirectInjection() && (set = (Set) hashMap.get(new C3247c(next2.getInterface(), next2.isSet()))) != null) {\n for (C3246b bVar3 : set) {\n bVar2.mo20817a(bVar3);\n bVar3.mo20818b(bVar2);\n }\n }\n }\n }\n }\n HashSet hashSet = new HashSet();\n for (Set addAll : hashMap.values()) {\n hashSet.addAll(addAll);\n }\n return hashSet;\n }", "void initClasses() {\n\t\tif (programUnit == null) return;\n\n\t\t// Add all classes\n\t\tList<BdsNode> cdecls = BdsNodeWalker.findNodes(programUnit, ClassDeclaration.class, true, true);\n\t\tfor (BdsNode n : cdecls) {\n\t\t\tClassDeclaration cd = (ClassDeclaration) n;\n\t\t\tbdsvm.addType(cd.getType());\n\t\t}\n\t}", "public void processClasses(CompilationUnit cu) {\n\t\t\n\t\tif(cu.getStorage().get().getFileName().equals(\"package-info.java\")) {\n\t\t\tthis.packageInfo = cu;\n\t\t}else {\n\t\t\tthis.cus.add(cu);\n\t\t}\n\t\tfor(TypeDeclaration<?> node : cu.findAll(TypeDeclaration.class)) {\n\t\t\tthis.classes.put(node.getNameAsString(), new ClassAST(node, this));\n\t\t}\n\t}", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "public String[] getClassesToCompile();", "String getClassTypeVariables() {\n final StringBuilder sb = new StringBuilder();\n if (classTypes.size() > 0) {\n sb.append(\"<\");\n for (int i = 0; i < classTypes.size(); i++) {\n final Class<?> c = classTypes.get(i);\n if (c != null) {\n sb.append(getShortClassName(c));\n if (i < classTypes.size() - 1) {\n sb.append(\", \");\n }\n }\n }\n sb.append(\">\");\n }\n return sb.toString();\n }", "public abstract NestedSet<Artifact> getTransitiveJackClasspathLibraries();", "java.lang.String getClass_();", "java.lang.String getClass_();", "java.util.List<? extends org.multibit.hd.core.protobuf.MBHDContactsProtos.TagOrBuilder> \n getTagOrBuilderList();", "Object getClass_();", "Object getClass_();", "private static C2499b m9558d(Context context) {\n C2502b bVar = new C2502b();\n Intent intent = new Intent(\"com.google.android.gms.ads.identifier.service.START\");\n intent.setPackage(\"com.google.android.gms\");\n if (context.bindService(intent, bVar, 1)) {\n try {\n C2501a aVar = new C2501a(bVar.mo8982a());\n C2499b bVar2 = new C2499b();\n bVar2.f7871c = aVar.mo8979a();\n bVar2.f7873e = aVar.mo8981b();\n return bVar2;\n } catch (Exception e) {\n C2479ad.m9447a(\"android_id\", e);\n } finally {\n context.unbindService(bVar);\n }\n }\n return null;\n }", "private static void InitTagger() {\n\t\ttagger = new MaxentTagger(\"models/english-left3words-distsim.tagger\");\n\t}", "private void zzbJ(int r6) {\n /*\n r5 = this;\n r0 = 8;\n if (r6 != r0) goto L_0x0035;\n L_0x0004:\n r1 = com.google.android.gms.internal.zzld.class;\n monitor-enter(r1);\n r0 = mTwiceBaseCache;\t Catch:{ all -> 0x0067 }\n if (r0 == 0) goto L_0x0030;\n L_0x000b:\n r2 = mTwiceBaseCache;\t Catch:{ all -> 0x0067 }\n r5.mArray = r2;\t Catch:{ all -> 0x0067 }\n r0 = 0;\n r0 = r2[r0];\t Catch:{ all -> 0x0067 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0067 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0067 }\n mTwiceBaseCache = r0;\t Catch:{ all -> 0x0067 }\n r0 = 1;\n r0 = r2[r0];\t Catch:{ all -> 0x0067 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0067 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0067 }\n r5.mHashes = r0;\t Catch:{ all -> 0x0067 }\n r0 = 0;\n r3 = 1;\n r4 = 0;\n r2[r3] = r4;\t Catch:{ all -> 0x0067 }\n r2[r0] = r4;\t Catch:{ all -> 0x0067 }\n r0 = mTwiceBaseCacheSize;\t Catch:{ all -> 0x0067 }\n r0 = r0 + -1;\n mTwiceBaseCacheSize = r0;\t Catch:{ all -> 0x0067 }\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n L_0x002f:\n return;\n L_0x0030:\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n r0 = com.google.android.gms.internal.zzkq.a;\t Catch:{ ClassCastException -> 0x006a }\n if (r0 == 0) goto L_0x006d;\n L_0x0035:\n r0 = 4;\n if (r6 != r0) goto L_0x006d;\n L_0x0038:\n r1 = com.google.android.gms.internal.zzld.class;\n monitor-enter(r1);\n r0 = mBaseCache;\t Catch:{ all -> 0x0064 }\n if (r0 == 0) goto L_0x006c;\n L_0x003f:\n r2 = mBaseCache;\t Catch:{ all -> 0x0064 }\n r5.mArray = r2;\t Catch:{ all -> 0x0064 }\n r0 = 0;\n r0 = r2[r0];\t Catch:{ all -> 0x0064 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0064 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0064 }\n mBaseCache = r0;\t Catch:{ all -> 0x0064 }\n r0 = 1;\n r0 = r2[r0];\t Catch:{ all -> 0x0064 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0064 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0064 }\n r5.mHashes = r0;\t Catch:{ all -> 0x0064 }\n r0 = 0;\n r3 = 1;\n r4 = 0;\n r2[r3] = r4;\t Catch:{ all -> 0x0064 }\n r2[r0] = r4;\t Catch:{ all -> 0x0064 }\n r0 = mBaseCacheSize;\t Catch:{ all -> 0x0064 }\n r0 = r0 + -1;\n mBaseCacheSize = r0;\t Catch:{ all -> 0x0064 }\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n goto L_0x002f;\n L_0x0064:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n throw r0;\n L_0x0067:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n throw r0;\n L_0x006a:\n r0 = move-exception;\n throw r0;\n L_0x006c:\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n L_0x006d:\n r0 = new int[r6];\n r5.mHashes = r0;\n r0 = r6 << 1;\n r0 = new java.lang.Object[r0];\n r5.mArray = r0;\n goto L_0x002f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzlh.zzbJ(int):void\");\n }", "public GoogleApiA() {}", "private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void annotate(JDefinedClass cls) {\n\n\t}", "private static void zza(java.lang.ClassLoader r3) throws com.google.android.gms.dynamite.DynamiteModule.zzc {\n /*\n r0 = 0\n java.lang.String r1 = \"com.google.android.gms.dynamiteloader.DynamiteLoaderV2\"\n java.lang.Class r3 = r3.loadClass(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1 = 0\n java.lang.Class[] r2 = new java.lang.Class[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.reflect.Constructor r3 = r3.getConstructor(r2) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object[] r1 = new java.lang.Object[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object r3 = r3.newInstance(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n android.os.IBinder r3 = (android.os.IBinder) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r3 != 0) goto L_0x001a\n r3 = r0\n goto L_0x002e\n L_0x001a:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoaderV2\"\n android.os.IInterface r1 = r3.queryLocalInterface(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n boolean r2 = r1 instanceof com.google.android.gms.dynamite.zzl // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r2 == 0) goto L_0x0028\n r3 = r1\n com.google.android.gms.dynamite.zzl r3 = (com.google.android.gms.dynamite.zzl) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n goto L_0x002e\n L_0x0028:\n com.google.android.gms.dynamite.zzm r1 = new com.google.android.gms.dynamite.zzm // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1.<init>(r3) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r3 = r1\n L_0x002e:\n zzaSH = r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n return\n L_0x0031:\n r3 = move-exception\n com.google.android.gms.dynamite.DynamiteModule$zzc r1 = new com.google.android.gms.dynamite.DynamiteModule$zzc\n java.lang.String r2 = \"Failed to instantiate dynamite loader\"\n r1.<init>(r2, r3, r0)\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zza(java.lang.ClassLoader):void\");\n }", "private final void zzaj() {\n /*\n r6 = this;\n java.lang.Object r0 = r6.zzsC\n monitor-enter(r0)\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = r6.zzsD // Catch:{ all -> 0x0026 }\n if (r1 == 0) goto L_0x0013\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = r6.zzsD // Catch:{ all -> 0x0026 }\n java.util.concurrent.CountDownLatch r1 = r1.zzsI // Catch:{ all -> 0x0026 }\n r1.countDown() // Catch:{ all -> 0x0026 }\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = r6.zzsD // Catch:{ InterruptedException -> 0x0013 }\n r1.join() // Catch:{ InterruptedException -> 0x0013 }\n L_0x0013:\n long r1 = r6.zzsE // Catch:{ all -> 0x0026 }\n r3 = 0\n int r5 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))\n if (r5 <= 0) goto L_0x0024\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = new com.google.android.gms.ads.identifier.AdvertisingIdClient$zza // Catch:{ all -> 0x0026 }\n long r2 = r6.zzsE // Catch:{ all -> 0x0026 }\n r1.<init>(r6, r2) // Catch:{ all -> 0x0026 }\n r6.zzsD = r1 // Catch:{ all -> 0x0026 }\n L_0x0024:\n monitor-exit(r0) // Catch:{ all -> 0x0026 }\n return\n L_0x0026:\n r1 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0026 }\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.identifier.AdvertisingIdClient.zzaj():void\");\n }", "public interface ITagService {\n\n\t/**\n\t * 1.创建标签\n\t *\n\t * @param accessToken\n\t * @param name\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Tag create(String accessToken, String name) throws Exception;\n\n\t/**\n\t * 2.获取公众号已创建的标签\n\t *\n\t * @param accessToken\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Tags get(String accessToken) throws Exception;\n\n\t/**\n\t * 3.编辑标签\n\t *\n\t * @param accessToken\n\t * @param id\n\t * @param name\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject updateTag(String accessToken, String id, String name) throws Exception;\n\n\t/**\n\t * 4.删除标签\n\t *\n\t * @param accessToken\n\t * @param grouid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject delete(String accessToken, int grouid) throws Exception;\n\n\t/**\n\t * 5. 获取标签下粉丝列表\n\t *\n\t * @param tagid\n\t * @param next_openid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject tagGetOpenids(String accessToken,int tagid, String next_openid) throws Exception;\n\n\t/**\n\t * 6. 批量为用户打标签\n\t *\n\t * @param openid_list\n\t * @param tagid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject batchTagging(String accessToken,List<String> openid_list, int tagid) throws Exception;\n\n\t/**\n\t * 7.批量为用户取消标签\n\t *\n\t * @param openid_list\n\t * @param tagid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject batchuntagging(String accessToken,List<String> openid_list, int tagid) throws Exception;\n\n\t/**\n\t * 8.获取用户身上的标签列表\n\t *\n\t * @param accessToken\n\t * @param openid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject getIdList(String accessToken, String openid) throws Exception;\n\n\n\n}", "private static C2499b m9557c(Context context) {\n try {\n if (Looper.myLooper() == Looper.getMainLooper()) {\n throw new C2579j(\"getAndroidId cannot be called on the main thread.\");\n }\n Method a = C2479ad.m9434a(\"com.google.android.gms.common.GooglePlayServicesUtil\", \"isGooglePlayServicesAvailable\", (Class<?>[]) new Class[]{Context.class});\n if (a == null) {\n return null;\n }\n Object a2 = C2479ad.m9423a((Object) null, a, context);\n if (a2 instanceof Integer) {\n if (((Integer) a2).intValue() == 0) {\n Method a3 = C2479ad.m9434a(\"com.google.android.gms.ads.identifier.AdvertisingIdClient\", \"getAdvertisingIdInfo\", (Class<?>[]) new Class[]{Context.class});\n if (a3 == null) {\n return null;\n }\n Object a4 = C2479ad.m9423a((Object) null, a3, context);\n if (a4 == null) {\n return null;\n }\n Method a5 = C2479ad.m9433a(a4.getClass(), \"getId\", (Class<?>[]) new Class[0]);\n Method a6 = C2479ad.m9433a(a4.getClass(), \"isLimitAdTrackingEnabled\", (Class<?>[]) new Class[0]);\n if (a5 != null) {\n if (a6 != null) {\n C2499b bVar = new C2499b();\n bVar.f7871c = (String) C2479ad.m9423a(a4, a5, new Object[0]);\n bVar.f7873e = ((Boolean) C2479ad.m9423a(a4, a6, new Object[0])).booleanValue();\n return bVar;\n }\n }\n return null;\n }\n }\n return null;\n } catch (Exception e) {\n C2479ad.m9447a(\"android_id\", e);\n return null;\n }\n }", "public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }", "public interface bj\n extends bl\n{\n\n public abstract void a(a a1);\n\n public abstract void b(a a1);\n\n public abstract Ad c();\n\n public abstract String d();\n\n public abstract a e();\n\n public abstract b f();\n\n // Unreferenced inner class com/vungle/publisher/bj$a\n /* block-local class not found */\n class a {}\n\n\n // Unreferenced inner class com/vungle/publisher/bj$b\n /* block-local class not found */\n class b {}\n\n}", "public String mo1081b() {\n return \"com.crashlytics.sdk.android:beta\";\n }", "public interface C24717ak {\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface C8843g {\n}", "@objid (\"59808615-06b0-48b7-a027-38d78fc10bd5\")\n void setReferencedClassName(String value);", "void compileClass() throws IOException {\n tagBracketPrinter(CLASS_TAG, OPEN_TAG_BRACKET);\n try {\n compileClassHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(CLASS_TAG, CLOSE_TAG_BRACKET);\n\n }", "public static void registerApplications ()\n\t{\n\t\tmono.android.Runtime.register (\"CMSoftInventario.App.Globals, CMSoftInventario, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\", md57d92b9ef6bf28eb894fd5debceaac28f.Globals.class, md57d92b9ef6bf28eb894fd5debceaac28f.Globals.__md_methods);\n\t\t\n\t}", "public Tags() {\n\t\t\n\t}", "void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public ClassesInfoFragment() {\r\n }", "private Vector getExtendImplement(ClassType c)\r\n {\r\n String st;\r\n Vector v = new Vector();\r\n\r\n if (c.extend.name != null && c.extend.scope == null)\r\n {\r\n st = c.extend.name.string;\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n v.add(st);\r\n }\r\n\r\n for(int j = 0; j < c.implement.length; j++)\r\n if (c.implement[j].scope == null)\r\n {\r\n st = c.implement[j].name.string;\r\n\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n if (!v.contains(st))\r\n v.add(st);\r\n }\r\n\r\n return v;\r\n }", "public interface XmlProjectTags {\r\n\r\n\tpublic static String SVG = \"svg\";\r\n\tpublic static final String GROUP = \"g\";\r\n\tpublic static final String RECT = \"rect\";\r\n\tpublic static final String PATH = \"path\";\r\n\tpublic static final String ELLIPSE = \"ellipse\";\r\n\tpublic static final String LINE = \"line\";\r\n\tpublic static final String IMAGE = \"image\";\r\n\tpublic static final String METADATA = \"metadata\";\r\n\r\n\tpublic static final String TITULO = \"id\";\r\n\tpublic static final String VIEWBOX = \"viewBox\";\r\n\tpublic static final String XMLNS = \"xmlns\";\r\n\tpublic static final String XMLNS_XLINK = \"xmlns:xlink\";\r\n\tpublic static final String ID = \"id\";\r\n\tpublic static final String FILL = \"fill\";\r\n\tpublic static final String FILL_OPACITY = \"fill-opacity\";\r\n\tpublic static final String POINTER_EVENTS = \"pointer-events\";\r\n\tpublic static final String STROKE = \"stroke\";\r\n\tpublic static final String STROKE_DASHARRAY = \"stroke-dasharray\";\r\n\tpublic static final String STROKE_OPACITY = \"stroke-opacity\";\r\n\tpublic static final String STROKE_WIDTH = \"stroke-width\";\r\n\tpublic static final String D = \"d\";\r\n\tpublic static final String OPACITY = \"opacity\";\r\n\tpublic static final String X = \"x\";\r\n\tpublic static final String Y = \"y\";\r\n\tpublic static final String WIDTH = \"width\";\r\n\tpublic static final String HEIGHT = \"height\";\r\n\tpublic static final String CX = \"cx\";\r\n\tpublic static final String CY = \"cy\";\r\n\tpublic static final String RX = \"rx\";\r\n\tpublic static final String RY = \"ry\";\r\n\tpublic static final String X1 = \"x1\";\r\n\tpublic static final String X2 = \"x2\";\r\n\tpublic static final String Y1 = \"y1\";\r\n\tpublic static final String Y2 = \"y2\";\r\n\tpublic static final String POINTS = \"points\";\r\n\tpublic static final String POLYLINE = \"polyline\";\r\n\tpublic static final String POLYGON = \"polygon\";\r\n\tpublic static final String STR = \"str\";\r\n\tpublic static final String TEXT = \"text\";\r\n\tpublic static final String FONTFAMILY = \"font-family\";\r\n\tpublic static final String FONTSIZE = \"font-size\";\r\n\tpublic static final String XLINKHREF = \"xlink:href\";\r\n\r\n}", "public static final class <init> extends com.google.android.m4b.maps.ct.<init>\n implements b\n{\n\n private ()\n {\n super(com.google.android.m4b.maps.cy.a.d());\n }", "public static TTL_CIL_ServiceClass getReference( String s )\n {\n return( (TTL_CIL_ServiceClass)( nameHash.get( s ) ) );\n }", "private static void zza(com.google.android.gms.internal.gtm.zzug r2, java.lang.Object r3) {\n /*\n com.google.android.gms.internal.gtm.zzre.checkNotNull(r3)\n int[] r0 = com.google.android.gms.internal.gtm.zzqu.zzaxr\n com.google.android.gms.internal.gtm.zzul r2 = r2.zzrs()\n int r2 = r2.ordinal()\n r2 = r0[r2]\n r0 = 1\n r1 = 0\n switch(r2) {\n case 1: goto L_0x0040;\n case 2: goto L_0x003d;\n case 3: goto L_0x003a;\n case 4: goto L_0x0037;\n case 5: goto L_0x0034;\n case 6: goto L_0x0031;\n case 7: goto L_0x0028;\n case 8: goto L_0x001e;\n case 9: goto L_0x0015;\n default: goto L_0x0014;\n }\n L_0x0014:\n goto L_0x0043\n L_0x0015:\n boolean r2 = r3 instanceof com.google.android.gms.internal.gtm.zzsk\n if (r2 != 0) goto L_0x0026\n boolean r2 = r3 instanceof com.google.android.gms.internal.gtm.zzrn\n if (r2 == 0) goto L_0x0043\n goto L_0x0026\n L_0x001e:\n boolean r2 = r3 instanceof java.lang.Integer\n if (r2 != 0) goto L_0x0026\n boolean r2 = r3 instanceof com.google.android.gms.internal.gtm.zzrf\n if (r2 == 0) goto L_0x0043\n L_0x0026:\n r1 = 1\n goto L_0x0043\n L_0x0028:\n boolean r2 = r3 instanceof com.google.android.gms.internal.gtm.zzps\n if (r2 != 0) goto L_0x0026\n boolean r2 = r3 instanceof byte[]\n if (r2 == 0) goto L_0x0043\n goto L_0x0026\n L_0x0031:\n boolean r0 = r3 instanceof java.lang.String\n goto L_0x0042\n L_0x0034:\n boolean r0 = r3 instanceof java.lang.Boolean\n goto L_0x0042\n L_0x0037:\n boolean r0 = r3 instanceof java.lang.Double\n goto L_0x0042\n L_0x003a:\n boolean r0 = r3 instanceof java.lang.Float\n goto L_0x0042\n L_0x003d:\n boolean r0 = r3 instanceof java.lang.Long\n goto L_0x0042\n L_0x0040:\n boolean r0 = r3 instanceof java.lang.Integer\n L_0x0042:\n r1 = r0\n L_0x0043:\n if (r1 == 0) goto L_0x0046\n return\n L_0x0046:\n java.lang.IllegalArgumentException r2 = new java.lang.IllegalArgumentException\n java.lang.String r3 = \"Wrong object type used with protocol message reflection.\"\n r2.<init>(r3)\n goto L_0x004f\n L_0x004e:\n throw r2\n L_0x004f:\n goto L_0x004e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.gtm.zzqt.zza(com.google.android.gms.internal.gtm.zzug, java.lang.Object):void\");\n }", "void emitUsed (StringBuffer s) {\r\n if (used_classes == null) return;\r\n\r\n for (int i = 0, size = used_classes.size (); i < size; i++) {\r\n ClassType c = (ClassType) used_classes.elementAt (i);\r\n Integer pos = (Integer) used_class_offsets.elementAt (i);\r\n s.append ('(');\r\n s.append (pos.intValue ());\r\n s.append (\", \");\r\n s.append (c.getName ().length ());\r\n s.append (\", \");\r\n s.append (c.getFullyQualifiedClassID ());\r\n if (i + 1 < size)\r\n\ts.append (\"), \");\r\n else\r\n\ts.append (')');\r\n }\r\n }", "@androidx.annotation.WorkerThread\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final boolean zzc(com.google.firebase.iid.FirebaseInstanceId r5) {\n /*\n r4 = this;\n L_0x0000:\n monitor-enter(r4)\n java.lang.String r0 = r4.zzar() // Catch:{ all -> 0x0042 }\n r1 = 1\n if (r0 != 0) goto L_0x0017\n boolean r5 = com.google.firebase.iid.FirebaseInstanceId.zzm() // Catch:{ all -> 0x0042 }\n if (r5 == 0) goto L_0x0015\n java.lang.String r5 = \"FirebaseInstanceId\"\n java.lang.String r0 = \"topic sync succeeded\"\n android.util.Log.d(r5, r0) // Catch:{ all -> 0x0042 }\n L_0x0015:\n monitor-exit(r4) // Catch:{ all -> 0x0042 }\n return r1\n L_0x0017:\n monitor-exit(r4) // Catch:{ all -> 0x0042 }\n boolean r2 = zza(r5, r0)\n if (r2 != 0) goto L_0x0020\n r5 = 0\n return r5\n L_0x0020:\n monitor-enter(r4)\n java.util.Map<java.lang.Integer, com.google.android.gms.tasks.TaskCompletionSource<java.lang.Void>> r2 = r4.zzdx // Catch:{ all -> 0x003f }\n int r3 = r4.zzdw // Catch:{ all -> 0x003f }\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3) // Catch:{ all -> 0x003f }\n java.lang.Object r2 = r2.remove(r3) // Catch:{ all -> 0x003f }\n com.google.android.gms.tasks.TaskCompletionSource r2 = (com.google.android.gms.tasks.TaskCompletionSource) r2 // Catch:{ all -> 0x003f }\n r4.zzn(r0) // Catch:{ all -> 0x003f }\n int r0 = r4.zzdw // Catch:{ all -> 0x003f }\n int r0 = r0 + r1\n r4.zzdw = r0 // Catch:{ all -> 0x003f }\n monitor-exit(r4) // Catch:{ all -> 0x003f }\n if (r2 == 0) goto L_0x0000\n r0 = 0\n r2.setResult(r0)\n goto L_0x0000\n L_0x003f:\n r5 = move-exception\n monitor-exit(r4) // Catch:{ all -> 0x003f }\n throw r5\n L_0x0042:\n r5 = move-exception\n monitor-exit(r4) // Catch:{ all -> 0x0042 }\n throw r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.firebase.iid.zzba.zzc(com.google.firebase.iid.FirebaseInstanceId):boolean\");\n }", "public void searchClassMemberReferences(String name, SearchIdConsumer consumer);", "AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.telephony.SmsCbCmasInfo.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.<init>():void\");\n }", "public interface C3210f extends C11871b<DeletedProgramBroadcastReceiver> {\n\n /* renamed from: com.bamtechmedia.dominguez.channels.tv.f$a */\n /* compiled from: FeatureChannelModule_ProvidesWatchNextProgramBroadcastReceiver */\n public interface C3211a extends C11872a<DeletedProgramBroadcastReceiver> {\n }\n}", "public interface g {\n\n /* compiled from: AccessibilityViewCommand */\n public static abstract class a {\n\n /* renamed from: a reason: collision with root package name */\n private static final Bundle f2690a = new Bundle();\n\n /* renamed from: b reason: collision with root package name */\n Bundle f2691b;\n\n public void a(Bundle bundle) {\n this.f2691b = bundle;\n }\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class b extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class c extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class d extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class e extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class f extends a {\n }\n\n /* renamed from: b.g.i.a.g$g reason: collision with other inner class name */\n /* compiled from: AccessibilityViewCommand */\n public static final class C0028g extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class h extends a {\n }\n\n boolean a(View view, a aVar);\n}", "void removeBrokenRefs() \r\n {\n\r\n if (LOG.isTraceOn()) LOG.trace(\"BEGIN removeBrokenRefs\"); \r\n\r\n Iterator compItr = new ComponentTreeIterator(\r\n (BComponent) BOrd.make(\"slot:/\").resolve(service, null).get());\r\n\r\n // check every component\r\n while (compItr.hasNext())\r\n {\r\n BComponent comp = (BComponent) compItr.next();\r\n HDict tags = BHDict.findTagAnnotation(comp);\r\n if (tags == null) continue;\r\n\r\n // check if any of the tags are a broken ref\r\n Set brokenRefs = null;\r\n Iterator tagItr = tags.iterator();\r\n while (tagItr.hasNext())\r\n {\r\n Map.Entry e = (Map.Entry) tagItr.next();\r\n String name = (String) e.getKey();\r\n HVal val = (HVal) e.getValue();\r\n\r\n if (val instanceof HRef)\r\n {\r\n // try to resolve the ref\r\n try\r\n {\r\n BComponent lookup = tagMgr.lookupComponent((HRef) val);\r\n if (lookup == null)\r\n throw new IllegalStateException(\"Cannot find component for \" + val);\r\n }\r\n // failed!\r\n catch (Exception e2)\r\n {\r\n LOG.warning(\r\n \"broken ref '\" + name + \"' found in \" + \r\n comp.getSlotPath());\r\n\r\n if (brokenRefs == null)\r\n brokenRefs = new HashSet();\r\n brokenRefs.add(name);\r\n }\r\n }\r\n }\r\n\r\n // at least one broken ref was found\r\n if (brokenRefs != null)\r\n {\r\n HDictBuilder hdb = new HDictBuilder();\r\n tagItr = tags.iterator();\r\n while (tagItr.hasNext())\r\n {\r\n Map.Entry e = (Map.Entry) tagItr.next();\r\n String name = (String) e.getKey();\r\n HVal val = (HVal) e.getValue();\r\n\r\n if (!brokenRefs.contains(name))\r\n hdb.add(name, val);\r\n }\r\n comp.set(\"haystack\", BHDict.make(hdb.toDict()));\r\n }\r\n }\r\n\r\n if (LOG.isTraceOn()) LOG.trace(\"END removeBrokenRefs\"); \r\n }", "@Override\n protected void findReferencedClassNames(final Set<String> refdClassNames) {\n refdClassNames.add(getFullyQualifiedClassName());\n for (final TypeArgument typeArgument : typeArguments) {\n typeArgument.findReferencedClassNames(refdClassNames);\n }\n for (final List<TypeArgument> typeArgumentList : suffixTypeArguments) {\n for (final TypeArgument typeArgument : typeArgumentList) {\n typeArgument.findReferencedClassNames(refdClassNames);\n }\n }\n }", "public BuddycloudService() {\n super(R.xml.smackproviders);\n }", "@Override // com.google.android.gms.internal.measurement.zzgi\n public final /* synthetic */ zzgi zza(zzgj zzgj) {\n return zza((zza<MessageType, BuilderType>) ((zzib) zzgj));\n }", "public final boolean mo3330c(android.content.Intent r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = \"com.google.firebase.messaging.NOTIFICATION_OPEN\";\n r1 = r3.getAction();\n r0 = r0.equals(r1);\n if (r0 == 0) goto L_0x002c;\n L_0x000c:\n r0 = \"pending_intent\";\n r0 = r3.getParcelableExtra(r0);\n r0 = (android.app.PendingIntent) r0;\n if (r0 == 0) goto L_0x0021;\n L_0x0016:\n r0.send();\t Catch:{ CanceledException -> 0x001a }\n goto L_0x0021;\n L_0x001a:\n r0 = \"FirebaseMessaging\";\n r1 = \"Notification pending intent canceled\";\n android.util.Log.e(r0, r1);\n L_0x0021:\n r0 = com.google.firebase.messaging.C2609b.m12812e(r3);\n if (r0 == 0) goto L_0x002a;\n L_0x0027:\n com.google.firebase.messaging.C2609b.m12809b(r3);\n L_0x002a:\n r3 = 1;\n return r3;\n L_0x002c:\n r3 = 0;\n return r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.firebase.messaging.FirebaseMessagingService.c(android.content.Intent):boolean\");\n }", "private static void addClasses(\n @NotNull CompletionParameters parameters,\n @NotNull final CompletionResultSet result,\n @NotNull final CompletionSession session\n ) {\n JetClassCompletionContributor.addClasses(parameters, result, new Consumer<LookupElement>() {\n @Override\n public void consume(@NotNull LookupElement element) {\n addCompletionToResult(result, element, session);\n }\n });\n }", "byte[] createJCasCoverClass(TypeImpl type) {\n this.type = type;\n typeJavaDescriptor = type.getJavaDescriptor();\n typeJavaClassName = type.getName().replace('.', '/');\n cn = new ClassNode(ASM5); // java 8\n cn.version = JAVA_CLASS_VERSION;\n cn.access = ACC_PUBLIC + ACC_SUPER;\n cn.name = typeJavaClassName; \n cn.superName = type.getSuperType().getName().replace('.', '/');\n// cn.interfaces = typeImpl.getInterfaceNamesArray(); // TODO\n \n // add the \"_typeImpl\" field - this has a ref to the TypeImpl for this class\n cn.fields.add(new FieldNode(ACC_PUBLIC + ACC_FINAL + ACC_STATIC,\n \"_typeImpl\", \"Lorg/apache/uima/type_system/impl/TypeImpl;\", null, null));\n \n // add field declares, and getters and setters, and special getters/setters for array things \n type.getMergedStaticFeaturesIntroducedByThisType().stream()\n .forEach(this::addFeatureFieldGetSet);\n \n addStaticInitAndConstructors();\n \n createSwitchGettersAndSetters();\n \n \n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cn.accept(cw);\n return cw.toByteArray();\n }", "public TagInfo[] getTags() {\n/* 164 */ return this.tags;\n/* */ }", "public void c() {\n List<DBUserBrief> b2 = this.f16688d.b(this.f16687c.c());\n ArrayList arrayList = new ArrayList();\n for (DBUserBrief a2 : b2) {\n UserBriefInfo userBriefInfo = new UserBriefInfo();\n b.a(a2, userBriefInfo);\n arrayList.add(userBriefInfo);\n }\n com.garena.android.appkit.b.b.a(\"MY_CUSTOMER_LOAD\", new a(arrayList), b.a.NETWORK_BUS);\n }", "@Override\n public List<Class<? extends ProjectInitializer>> getDependencies()\n {\n return asList(TokenLayerInitializer.class);\n }", "CdapPackage getCdapPackage();", "public interface C39682m {\n\n /* renamed from: com.ss.android.ugc.aweme.shortvideo.edit.m$a */\n public interface C39683a {\n /* renamed from: a */\n int mo98966a(C29296g gVar);\n\n /* renamed from: b */\n int mo98967b(C29296g gVar);\n\n /* renamed from: c */\n float mo98968c(C29296g gVar);\n }\n\n /* renamed from: com.ss.android.ugc.aweme.shortvideo.edit.m$b */\n public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }\n}", "private List<String> getClassesInPackage(String packageUniqueName) {\n List<String> result = new ArrayList<String>();\n if (theModel.packages.containsKey(packageUniqueName)){\n \tTreeSet<String> children = theModel.packages.get(packageUniqueName).children;\n \tif ((children != null)){\n \t\tfor (String uniqueName : children){\n \t\t\tFamixClass foundClass = theModel.classes.get(uniqueName);\n \t\t\tif (foundClass != null){\n \t\t\t\tresult.add(uniqueName);\n \t\t\t\tif (foundClass.hasInnerClasses){\n \t\t\t\t\tresult.addAll(foundClass.children);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }\n return result;\n }", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }" ]
[ "0.5415806", "0.52423793", "0.5164869", "0.5163092", "0.5070419", "0.50270075", "0.498633", "0.49001998", "0.48449418", "0.48193973", "0.48083168", "0.47843516", "0.47826797", "0.47547477", "0.47460586", "0.46826005", "0.46718332", "0.46717516", "0.46660566", "0.46626058", "0.46552315", "0.46472985", "0.46432516", "0.4640234", "0.46279156", "0.46231574", "0.4620479", "0.4602659", "0.45987862", "0.4578589", "0.45767203", "0.4556066", "0.4544578", "0.45336035", "0.45323852", "0.45269942", "0.4471429", "0.4463906", "0.44394368", "0.44372028", "0.44240844", "0.4419265", "0.44172645", "0.44136107", "0.44073027", "0.43952295", "0.43936056", "0.43905896", "0.43731532", "0.43731532", "0.43703014", "0.43702823", "0.43702823", "0.43650514", "0.4362147", "0.4357838", "0.43575636", "0.4353907", "0.43516928", "0.43499547", "0.4334094", "0.4329707", "0.43271104", "0.43221697", "0.43195355", "0.43114993", "0.43088147", "0.4297998", "0.4297757", "0.42925513", "0.42843327", "0.42785493", "0.4276485", "0.42753658", "0.42616746", "0.42553806", "0.42536938", "0.4252225", "0.425034", "0.4248595", "0.42479554", "0.42479348", "0.42440757", "0.42405808", "0.42325982", "0.4221382", "0.4213468", "0.42124295", "0.42056313", "0.42052606", "0.42041853", "0.420323", "0.4201391", "0.42005044", "0.42004514", "0.41973996", "0.41927615", "0.41901955", "0.41852218", "0.4183683" ]
0.4625115
25
Return a Try value that isn't an exception
public static <A> Try<A> success(A value) { return new Try<>(null, value, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Block getTryBlock();", "public T getOrThrow() {\n if (hasResult) {\n return value;\n } else {\n throw new ReflectionException(exception);\n }\n }", "public ByteVector getCodeItemTryCatch() {\n\t\treturn codeItem.getCodeItemTryCatch();\n\t}", "public static <A> Try<A> failure(Exception ex) {\n return new Try<>(ex, null, true);\n }", "Try<T> recoverWith(TryFunction<? super Throwable, Try<T>> fn);", "public boolean trySuccess()\r\n/* 52: */ {\r\n/* 53: 84 */ return trySuccess(null);\r\n/* 54: */ }", "Try<T> recover(TryFunction<? super Throwable, T> fn);", "public static <T> T tryGet(Callable<T> callable) {\n try {\n return callable.call();\n }\n catch (Exception e) {\n throw softened(e);\n }\n }", "boolean getPossiblyBad();", "public static void catchingOnlyFromTry(){\n int x =1;\n try{\n if (true){throw new RuntimeException();}\n }\n catch (RuntimeException e){\n x*=2;\n System.out.println(x);\n if (true){throw new Error();}\n }\n catch(Error err){\n x*=3;\n System.out.println(x);\n }\n x*=5;\n System.out.println(x);\n }", "public static <T> Try<T> narrow(final Try<? extends T> tryTypeal) {\n return (Try<T>) tryTypeal;\n }", "Object getFailonerror();", "Object getFailonerror();", "public static TryExpression tryFault(Expression body, Expression fault) { throw Extensions.todo(); }", "public static int catchingObjectNotReference(){\n int x=1;\n try{\n Throwable t = new Exception();\n throw t;\n }\n catch (RuntimeException re){x*=2;}\n catch(Exception e){x*=3;}\n catch(Throwable t){x*=5;}\n return x; // x==3\n }", "default V getOrThrow() {\n return getOrThrow(\"null\");\n }", "public int getTryCatchBlockIndex() {\n/* 424 */ return (this.value & 0xFFFF00) >> 8;\n/* */ }", "@Override\n\tpublic void VisitTryNode(BunTryNode Node) {\n\n\t}", "private void submitRedundantReturnInTryCatch(DetailAST aTryAst) {\n\n\t\tDetailAST astBlockTry = aTryAst.getFirstChild();\n\n\t\thandleBlocksTryCatchFinally(astBlockTry.getLastChild()\n\t\t\t\t.getPreviousSibling());\n\n\t\tfinal int catchBlocksAmount = aTryAst\n\t\t\t\t.getChildCount(TokenTypes.LITERAL_CATCH);\n\n\t\tfor (int i = 0; i < catchBlocksAmount; i++) {\n\n\t\t\tastBlockTry = astBlockTry.getNextSibling();\n\t\t\thandleBlocksTryCatchFinally(astBlockTry.getLastChild()\n\t\t\t\t\t.getLastChild().getPreviousSibling());\n\t\t}\n\n\t\tif (astBlockTry.getNextSibling() != null) {\n\n\t\t\thandleBlocksTryCatchFinally(astBlockTry.getNextSibling()\n\t\t\t\t\t.getLastChild().getLastChild().getPreviousSibling());\n\n\t\t}\n\t}", "V result() throws Exception;", "public Optional<SpreadsheetError> error() {\n final Optional<Object> value = this.value();\n\n final Object maybeValue = this.value()\n .orElse(null);\n return maybeValue instanceof SpreadsheetError ?\n Cast.to(value) :\n SpreadsheetFormula.NO_ERROR;\n }", "@Nonnull\n default T parseOrFail(@Nonnull String s) throws CommandInterruptException {\n Optional<T> ret = parse(s);\n if (!ret.isPresent()) {\n throw new CommandInterruptException(\"&cUnable to parse argument: \" + s);\n }\n return ret.get();\n }", "default V getOrThrow(String message) {\n return Conditions.nonNull(get(), message);\n }", "Try<T> orElse(Supplier<Try<T>> fn);", "public static int finallyReturnWithException() {\n try {\n throw new RuntimeException();\n } finally {\n return 1;\n }\n }", "<U> Try<U> map(TryFunction<? super T, U> fn);", "@org.chromium.protocolReader.JsonOptionalField\n boolean wasThrown();", "static <IS, OS, X extends Exception> Function<Result<IS, Exception>, Result<OS, Exception>> onSuccessTry(\n ThrowingLambdas.ThrowingFunction<IS, OS, X> throwingFunction\n ) {\n return attempt(tryTo(throwingFunction));\n }", "public static TryExpression makeTry(Class type, Expression body, Expression finally_, Expression fault, Iterable<CatchBlock> handlers) { throw Extensions.todo(); }", "@jsweet.lang.Name(\"catch\")\r\n native public <U> Promise<U> Catch();", "private @NotNull ErrorValue finishReadingError()\n throws IOException, JsonFormatException {\n stepOver(JsonToken.VALUE_NUMBER_INT, \"integer value\");\n int errorCode;\n try { errorCode = currentValueAsInt(); } catch (JsonParseException ignored) {\n throw expected(\"integer error code\");\n }\n stepOver(JsonFormat.ERROR_MESSAGE_FIELD);\n stepOver(JsonToken.VALUE_STRING, \"string value\");\n String message = currentText();\n // TODO read custom error properties here (if we decide to support these)\n stepOver(JsonToken.END_OBJECT);\n return new ErrorValue(errorCode, message, null);\n }", "public static TypeReference newTryCatchReference(int tryCatchBlockIndex) {\n/* 296 */ return new TypeReference(0x42000000 | tryCatchBlockIndex << 8);\n/* */ }", "public abstract String check() throws Exception;", "public static TryExpression tryCatch(Expression body, CatchBlock[] handlers) { throw Extensions.todo(); }", "@Override\n public String visit(TryStmt n, Object arg) {\n return null;\n }", "<U> Try<U> flatMap(TryFunction<? super T, Try<U>> fn);", "String getException();", "String getException();", "public Integer getLoginTry() throws NotLoadedException {\n return loginTry.getValue();\n }", "@Override\r\n\tpublic boolean doCatch(Throwable ex) throws Exception\r\n\t{\n\t\treturn false;\r\n\t}", "private ChannelFuture checkException(ChannelPromise promise) {\n/* 624 */ Throwable t = this.lastException;\n/* 625 */ if (t != null) {\n/* 626 */ this.lastException = null;\n/* */ \n/* 628 */ if (promise.isVoid()) {\n/* 629 */ PlatformDependent.throwException(t);\n/* */ }\n/* */ \n/* 632 */ return (ChannelFuture)promise.setFailure(t);\n/* */ } \n/* */ \n/* 635 */ return (ChannelFuture)promise.setSuccess();\n/* */ }", "public static int doSomething() {\n try {\n return 1;\n } catch (Exception e) {\n return 2;\n } finally {\n // never use return in finally block\n // method will always return 9\n return 9;\n }\n\n }", "public void checkException() {\n/* 642 */ checkException(voidPromise());\n/* */ }", "private <T> T swallowing(T throwing) {\n return null;\n }", "public static int catchRuntimeExceptionWithException(){\n int x =1;\n try{\n if (true){throw new RuntimeException();}\n x *=2;\n }\n catch (Exception e){\n x*=3;\n }\n x*=5;\n return x; // x==15\n }", "public Try<R> tryBuildTerminalResult(L lexeme, D data) {\n return Try.of(() -> buildTerminalResult(lexeme, data));\n }", "public static int getValue_from_die()\n {\n return value_from_die;\n }", "@SuppressWarnings({\"unchecked\", \"cast\"})\n public boolean catchableException(TypeDecl type) {\n Object _parameters = type;\n if(catchableException_TypeDecl_values == null) catchableException_TypeDecl_values = new java.util.HashMap(4);\n if(catchableException_TypeDecl_values.containsKey(_parameters)) {\n return ((Boolean)catchableException_TypeDecl_values.get(_parameters)).booleanValue();\n }\n ASTNode$State state = state();\n int num = state.boundariesCrossed;\n boolean isFinal = this.is$Final();\n boolean catchableException_TypeDecl_value = catchableException_compute(type);\n if(isFinal && num == state().boundariesCrossed) catchableException_TypeDecl_values.put(_parameters, Boolean.valueOf(catchableException_TypeDecl_value));\n return catchableException_TypeDecl_value;\n }", "public static int methodWithoutReturn(){\n throw new Error();\n }", "private static int tryParse(String number) {\r\n\t\ttry {\r\n\t\t\treturn Integer.parseInt(number);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tthrow new java.lang.Error(\"Could not convert input to integer.\");\r\n\t\t}\r\n\t}", "public Object getElseValue();", "public Object call() throws Exception{\n return null;\n }", "public static int check() {\r\n\t\tint num = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\t\t\t// unos \r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\t\tSystem.out.println(\"Pogresan unos, probajte ponovo\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t\treturn num;\r\n\t}", "public int getInt() throws Exception\n {\n return 0;\n }", "R getOneRowOrThrow();", "public int lecturaNumero()\n {\n boolean error = false; \n int numero = 0;\n System.out.print(\">\");\n try {\n numero = lectura.nextInt();\n\n } catch (InputMismatchException ime){\n error = true; \n lectura.next();\n }\n if (!error){\n return numero; \n }else{\n return -1;\n }\n }", "public static ValueImpl getValueAndThrow(Document document, String name)\n throws RepositoryException {\n return (ValueImpl) Value.getSingleValue(document, name);\n }", "public static TryExpression tryFinally(Expression body, Expression fault) { throw Extensions.todo(); }", "private static Throwable reconstitute(Throwable t) {\n Throwable result = null;\n try(ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream out = new ObjectOutputStream(bout)) {\n out.writeObject(t);\n out.flush();\n try(ByteArrayInputStream bin =\n new ByteArrayInputStream(bout.toByteArray());\n ObjectInputStream in = new ObjectInputStream(bin)) {\n result = (Throwable) in.readObject();\n }\n } catch(IOException | ClassNotFoundException e) {\n throw new RuntimeException(e);\n }\n return result;\n }", "Throwable cause();", "Boolean ignoreExceptions();", "@Override\n\tprotected Respond exceptHandle(Exception e) {\n\t\treturn SqlTool.normalExceptionDeal(new RspSingleRow(), e);\n\t}", "public char position_valid_TRY(Bounds.Inside ph)\n {\n if(ph.field_bit != 242 && !try_visit_field(ph, 242)) return 0;\n return (char)((char) get_bytes(data, ph.BYTE, 1));\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 }", "@Override\n boolean canFail() {\n return true;\n }", "private Optional<Long> getValidFrom(String key) {\n Object validFrom = redisTemplate.<String, String>boundHashOps(key).get(VALID_FROM);\n try {\n return Optional.of(Long.valueOf((String) validFrom));\n } catch (NumberFormatException e) {\n log.error(\"Fail to parse String[{}] into Long\", validFrom);\n //invalid long value\n redisTemplate.boundHashOps(key).delete(VALID_FROM);\n\n }\n return Optional.empty();\n }", "public boolean tryFailure(Throwable cause)\r\n/* 341: */ {\r\n/* 342:424 */ if (setFailure0(cause))\r\n/* 343: */ {\r\n/* 344:425 */ notifyListeners();\r\n/* 345:426 */ return true;\r\n/* 346: */ }\r\n/* 347:428 */ return false;\r\n/* 348: */ }", "public void testNegativeScalar() {\n\n /*\n * fixme Boolean converters not implemented at this point value = LocaleConvertUtils.convert(\"foo\", Boolean.TYPE); ...\n *\n * value = LocaleConvertUtils.convert(\"foo\", Boolean.class); ...\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (1)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.class);\n fail(\"Should have thrown conversion exception (2)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n /*\n * fixme - not implemented try { value = LocaleConvertUtils.convert(\"org.apache.commons.beanutils2.Undefined\", Class.class);\n * fail(\"Should have thrown conversion exception\"); } catch (ConversionException e) { ; // Expected result }\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.TYPE);\n fail(\"Should have thrown conversion exception (3)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.class);\n fail(\"Should have thrown conversion exception (4)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.TYPE);\n fail(\"Should have thrown conversion exception (5)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.class);\n fail(\"Should have thrown conversion exception (6)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.TYPE);\n fail(\"Should have thrown conversion exception (7)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.class);\n fail(\"Should have thrown conversion exception (8)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (9)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Long.class);\n fail(\"Should have thrown conversion exception (10)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.TYPE);\n fail(\"Should have thrown conversion exception (11)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.class);\n fail(\"Should have thrown conversion exception (12)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n }", "private V getDoneValue(Object obj) throws ExecutionException {\n if (obj instanceof Cancellation) {\n throw cancellationExceptionWithCause(\"Task was cancelled.\", ((Cancellation) obj).cause);\n } else if (obj instanceof Failure) {\n throw new ExecutionException(((Failure) obj).exception);\n } else if (obj == NULL) {\n return null;\n } else {\n return obj;\n }\n }", "@Nonnull\n default T parseOrFail(@Nonnull Argument argument) throws CommandInterruptException {\n Optional<T> ret = parse(argument);\n if (!ret.isPresent()) {\n throw new CommandInterruptException(\"&cUnable to parse argument at index \" + argument.index() + \".\");\n }\n return ret.get();\n }", "public final EObject ruleTryStatement() throws RecognitionException {\n EObject current = null;\n int ruleTryStatement_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_3=null;\n EObject lv_tryBlock_1_0 = null;\n\n EObject lv_catches_2_0 = null;\n\n EObject lv_finallyBlock_4_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 78) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3512:28: ( (otherlv_0= KEYWORD_43 ( (lv_tryBlock_1_0= ruleBlock ) ) ( (lv_catches_2_0= ruleCatch ) )* (otherlv_3= KEYWORD_78 ( (lv_finallyBlock_4_0= ruleBlock ) ) )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3513:1: (otherlv_0= KEYWORD_43 ( (lv_tryBlock_1_0= ruleBlock ) ) ( (lv_catches_2_0= ruleCatch ) )* (otherlv_3= KEYWORD_78 ( (lv_finallyBlock_4_0= ruleBlock ) ) )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3513:1: (otherlv_0= KEYWORD_43 ( (lv_tryBlock_1_0= ruleBlock ) ) ( (lv_catches_2_0= ruleCatch ) )* (otherlv_3= KEYWORD_78 ( (lv_finallyBlock_4_0= ruleBlock ) ) )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3514:2: otherlv_0= KEYWORD_43 ( (lv_tryBlock_1_0= ruleBlock ) ) ( (lv_catches_2_0= ruleCatch ) )* (otherlv_3= KEYWORD_78 ( (lv_finallyBlock_4_0= ruleBlock ) ) )?\n {\n otherlv_0=(Token)match(input,KEYWORD_43,FOLLOW_KEYWORD_43_in_ruleTryStatement7018); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getTryStatementAccess().getTryKeyword_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3518:1: ( (lv_tryBlock_1_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3519:1: (lv_tryBlock_1_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3519:1: (lv_tryBlock_1_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3520:3: lv_tryBlock_1_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTryStatementAccess().getTryBlockBlockParserRuleCall_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleTryStatement7038);\n lv_tryBlock_1_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTryStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"tryBlock\",\n \t\tlv_tryBlock_1_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3536:2: ( (lv_catches_2_0= ruleCatch ) )*\n loop63:\n do {\n int alt63=2;\n alt63 = dfa63.predict(input);\n switch (alt63) {\n \tcase 1 :\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3537:1: (lv_catches_2_0= ruleCatch )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3537:1: (lv_catches_2_0= ruleCatch )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3538:3: lv_catches_2_0= ruleCatch\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getTryStatementAccess().getCatchesCatchParserRuleCall_2_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleCatch_in_ruleTryStatement7059);\n \t lv_catches_2_0=ruleCatch();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getTryStatementRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"catches\",\n \t \t\tlv_catches_2_0, \n \t \t\t\"Catch\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop63;\n }\n } while (true);\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3554:3: (otherlv_3= KEYWORD_78 ( (lv_finallyBlock_4_0= ruleBlock ) ) )?\n int alt64=2;\n alt64 = dfa64.predict(input);\n switch (alt64) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3555:2: otherlv_3= KEYWORD_78 ( (lv_finallyBlock_4_0= ruleBlock ) )\n {\n otherlv_3=(Token)match(input,KEYWORD_78,FOLLOW_KEYWORD_78_in_ruleTryStatement7074); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_3, grammarAccess.getTryStatementAccess().getFinallyKeyword_3_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3559:1: ( (lv_finallyBlock_4_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3560:1: (lv_finallyBlock_4_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3560:1: (lv_finallyBlock_4_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3561:3: lv_finallyBlock_4_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTryStatementAccess().getFinallyBlockBlockParserRuleCall_3_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleTryStatement7094);\n lv_finallyBlock_4_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTryStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"finallyBlock\",\n \t\tlv_finallyBlock_4_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 78, ruleTryStatement_StartIndex); }\n }\n return current;\n }", "boolean isFailure();", "@SuppressWarnings(\"unchecked\")\n <T extends GraphNode<N, E>> T getNodeOrFail(N val) {\n T node = (T) getNode(val);\n if (node == null) {\n throw new IllegalArgumentException(val + \" does not exist in graph\");\n }\n return node;\n }", "@Test(expected = CTPException.class)\n public void getInvalidAddressCaseByUPRNOnly() throws Exception {\n when(dataRepo.readNonHILatestCollectionCaseByUprn(Long.toString(UPRN.getValue()), true))\n .thenThrow(new CTPException(null));\n caseSvc.getLatestValidNonHICaseByUPRN(UPRN);\n }", "static <IS, OS, F, X extends Exception> Function<Result<IS, F>, Result<OS, F>> onSuccessTry(\n ThrowingLambdas.ThrowingFunction<IS, OS, X> throwingFunction,\n Function<Exception, F> exceptionMapper\n ) {\n return attempt(tryTo(throwingFunction).andThen(onFailure(exceptionMapper)));\n }", "public static double validDouble(String message){\n boolean success = false;\n double value = -1;\n do {\n try {\n value = (double)readNumber(message, \"double\");\n success = true;\n } catch (InputMismatchException e){\n System.out.println(\"Debe introducir un valor numérico válido... \");\n }\n } while(!success);\n return value;\n }", "boolean hasException();", "private User tryRetrieveUser(String userId) {\n try {\n Object result = gateway.sendAndWait(new RetrieveUserCommand(userId));\n return (User) result;\n }\n catch (AggregateNotFoundException e) {\n return null;\n }\n }", "public static boolean tryStatement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"tryStatement\")) return false;\n if (!nextTokenIs(b, TRY)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, TRY_STATEMENT, null);\n r = consumeToken(b, TRY);\n p = r; // pin = 1\n r = r && report_error_(b, block(b, l + 1));\n r = p && tryStatement_2(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public static String j() {\n Object object;\n Object object2;\n block23: {\n block25: {\n block24: {\n block22: {\n block21: {\n object2 = null;\n object = \"/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq\";\n FileReader fileReader = new FileReader((String)object);\n object = new BufferedReader(fileReader);\n object2 = ((BufferedReader)object).readLine();\n object2 = ((String)object2).trim();\n try {\n ((BufferedReader)object).close();\n }\n catch (IOException iOException) {\n iOException.printStackTrace();\n }\n break block25;\n catch (IOException iOException) {\n break block21;\n }\n catch (FileNotFoundException fileNotFoundException) {\n break block22;\n }\n catch (Throwable throwable) {\n object = null;\n object2 = throwable;\n break block23;\n }\n catch (IOException iOException) {\n object = null;\n object2 = iOException;\n }\n }\n ((Throwable)object2).printStackTrace();\n if (object == null) break block24;\n ((BufferedReader)object).close();\n catch (FileNotFoundException fileNotFoundException) {\n object = null;\n object2 = fileNotFoundException;\n }\n }\n ((Throwable)object2).printStackTrace();\n if (object == null) break block24;\n try {\n ((BufferedReader)object).close();\n }\n catch (IOException iOException) {\n iOException.printStackTrace();\n }\n }\n object2 = \"N/A\";\n }\n return object2;\n catch (Throwable throwable) {\n // empty catch block\n }\n }\n if (object != null) {\n try {\n ((BufferedReader)object).close();\n }\n catch (IOException iOException) {\n iOException.printStackTrace();\n }\n }\n throw object2;\n }", "public ParseResult failure (Object input) {\n return failure(input, 1);\n }", "public static int evaluateNoException(final AST ast) {\n\tint retval = 0;\n\tboolean retvalSet = false;\n\t\n\ttry {\n\t retval = evaluate(ast);\n\t retvalSet = true;\n\t} catch (EvaluatorException e) {\n\t fail(\"Unexpected evaluator exception: \" + e.toString());\n\t}\n\n\tassert(retvalSet);\n\treturn retval;\n }", "public User orElseThrow(Object object) {\n\t\treturn null;\n\t}", "public static int catchExceptionWithInnerCatch(){\n int x =1;\n try {\n try {\n x*=2;\n if (true) {throw new RuntimeException();}\n x*=3;\n } catch (RuntimeException e) {\n x*=5;\n } finally {\n x*=7;\n }\n x*=11;\n } catch (Exception e) {\n x*=13;\n } finally {\n x*=17;\n }\n return x; // x== 2*5*7*11*17\n }", "public static Supplier<MultiErrorException> notFoundSupplier() {\r\n\t\t\r\n\t\treturn () -> NOT_FOUND_EXCEPTION;\r\n\t}", "int getUknown();", "public int getTried()\n\t{\n\t\treturn tried;\t\n\t}", "public static int check() {\r\n\t\tint num = 0;\r\n\t\tboolean check = true;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\r\n\t\t\t\tif (num < 0) {\r\n\t\t\t\t\tnum = Math.abs(num);\r\n\t\t\t\t}\r\n\t\t\t\tcheck = false;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t\t\t// hvatanje greske i ispis da je unos pogresan\r\n\t\t\t\tSystem.out.println(\"You know it's wrong input, try again mate:\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (check);\r\n\t\treturn num;\r\n\t}", "public Double getInvalidDouble() throws ServiceException {\n try {\n Call<ResponseBody> call = service.getInvalidDouble();\n ServiceResponse<Double> response = getInvalidDoubleDelegate(call.execute(), null);\n return response.getBody();\n } catch (ServiceException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new ServiceException(ex);\n }\n }", "public V call() throws Exception {\n\t\treturn null;\n\t}", "public V call() throws Exception {\n\t\treturn null;\n\t}", "public Object call() throws Exception {\n return this.call();\n }", "V get() throws PromiseBrokenException, InterruptedException;", "private static double checkInput(String input) {\n\t\tdouble parsedValue = 0;\n\t\ttry {\n\t\t\tparsedValue = Double.parseDouble(input);\n\t\t} catch (NumberFormatException parseFailed) {\n\t\t\tSystem.out.println(\"'\" + input + \"' se ne može protumačiti kao broj.\");\n\t\t\treturn ERROR;\n\t\t}\n\n\t\tif (parsedValue > 0) {\n\t\t\treturn parsedValue;\n\t\t} else if (parsedValue < 0) {\n\t\t\tSystem.out.println(\"Unijeli ste negativnu vrijednost.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Ne postoji pravokutnik sa stranicom duljine nula.\");\n\t\t}\n\t\treturn ERROR;\n\t}", "boolean processFailure(Throwable t);", "private static Exception method_7085(Exception var0) {\r\n return var0;\r\n }", "@Override\n public Promise<T> exceptionallyAsync(Function<Throwable, ? extends T> fn) {\n return cast(super.exceptionallyAsync(fn));\n }", "public void pos3() {\n int num1, num2;\n try {\n Object obj = null;\n obj.hashCode();\n System.out.println(\"Hey I'm at the end of try block\");\n // BUG: Diagnostic contains: Catch general exception not specific enough.\n } catch (Exception e1) {\n System.out.println(\"Don't try to get the hashcode of a null object.\");\n try {\n num1 = 0;\n num2 = 62 / num1;\n System.out.println(num2);\n System.out.println(\"Hey I'm at the end of try block\");\n // BUG: Diagnostic contains: Catch general exception not specific enough.\n } catch (Exception e2) {\n System.out.println(\"You should not divide a number by zero\");\n }\n }\n System.out.println(\"I'm out of try-catch block in Java.\");\n }", "void checked(){\n \n try {\n \n throw new CheckedException();\n } catch (CheckedException e) {\n e.printStackTrace();\n }\n\n }", "@MethodContract(post = @Expression(\"result != null ? contains(result\"))\n public PropertyException getAnElement() {\n if (isEmpty()) {\n return null;\n }\n else {\n Iterator<Set<PropertyException>> iter1 = getElementExceptions().values().iterator();\n Set<PropertyException> s = iter1.next();\n Iterator<PropertyException> iter2 = s.iterator();\n return iter2.next();\n }\n }" ]
[ "0.6581849", "0.6288928", "0.613941", "0.6110751", "0.61066186", "0.61000556", "0.5988894", "0.598825", "0.5883695", "0.58528554", "0.57105654", "0.56895095", "0.56895095", "0.56694305", "0.5638893", "0.55956024", "0.55798733", "0.5556095", "0.552963", "0.5465408", "0.5431004", "0.54105943", "0.53818023", "0.53755355", "0.5367882", "0.5307534", "0.52839726", "0.5281338", "0.52667147", "0.5249668", "0.5229787", "0.52133447", "0.5209214", "0.52079934", "0.5147625", "0.5129497", "0.5122937", "0.5122937", "0.5091764", "0.50872535", "0.50802153", "0.5067711", "0.50634617", "0.5038025", "0.5022118", "0.49809676", "0.4919466", "0.4919008", "0.4907355", "0.4898466", "0.48952442", "0.48946527", "0.4883243", "0.48805213", "0.4877636", "0.48487312", "0.48347083", "0.4832534", "0.4817239", "0.48164538", "0.4815625", "0.48152494", "0.47942707", "0.47709498", "0.47684115", "0.47648144", "0.4757961", "0.47568652", "0.47494033", "0.4744539", "0.47400326", "0.4739564", "0.47349346", "0.47322828", "0.47272316", "0.4714846", "0.4714218", "0.4710278", "0.4707827", "0.47025898", "0.46969047", "0.46953604", "0.46933523", "0.46911934", "0.4686196", "0.46794292", "0.4677288", "0.46629667", "0.4660916", "0.4660225", "0.4660225", "0.46521634", "0.4651628", "0.46476686", "0.46376628", "0.46370533", "0.4635739", "0.46357363", "0.46348852", "0.46336684" ]
0.5943577
8
Return a Try value that represents an exception
public static <A> Try<A> failure(Exception ex) { return new Try<>(ex, null, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getException();", "String getException();", "public T getOrThrow() {\n if (hasResult) {\n return value;\n } else {\n throw new ReflectionException(exception);\n }\n }", "Try<T> recoverWith(TryFunction<? super Throwable, Try<T>> fn);", "public Optional<SpreadsheetError> error() {\n final Optional<Object> value = this.value();\n\n final Object maybeValue = this.value()\n .orElse(null);\n return maybeValue instanceof SpreadsheetError ?\n Cast.to(value) :\n SpreadsheetFormula.NO_ERROR;\n }", "Try<T> recover(TryFunction<? super Throwable, T> fn);", "public ByteVector getCodeItemTryCatch() {\n\t\treturn codeItem.getCodeItemTryCatch();\n\t}", "Block getTryBlock();", "com.palantir.paxos.persistence.generated.PaxosPersistence.ExceptionProto getException();", "private @NotNull ErrorValue finishReadingError()\n throws IOException, JsonFormatException {\n stepOver(JsonToken.VALUE_NUMBER_INT, \"integer value\");\n int errorCode;\n try { errorCode = currentValueAsInt(); } catch (JsonParseException ignored) {\n throw expected(\"integer error code\");\n }\n stepOver(JsonFormat.ERROR_MESSAGE_FIELD);\n stepOver(JsonToken.VALUE_STRING, \"string value\");\n String message = currentText();\n // TODO read custom error properties here (if we decide to support these)\n stepOver(JsonToken.END_OBJECT);\n return new ErrorValue(errorCode, message, null);\n }", "public static TryExpression tryFault(Expression body, Expression fault) { throw Extensions.todo(); }", "Object getFailonerror();", "Object getFailonerror();", "public WorldUps.UErr getError(int index) {\n return error_.get(index);\n }", "String getCauseException();", "public static <A> Try<A> success(A value) {\n return new Try<>(null, value, false);\n }", "public static TryExpression tryCatch(Expression body, CatchBlock[] handlers) { throw Extensions.todo(); }", "public static <T> T tryGet(Callable<T> callable) {\n try {\n return callable.call();\n }\n catch (Exception e) {\n throw softened(e);\n }\n }", "private ScriptException getScriptException(LuaException e) {\n\t\tMatcher matcher = LUA_ERROR_MESSAGE.matcher(e.getMessage());\n\t\tif (matcher.find()) {\n\t\t\tString fileName = matcher.group(1);\n\t\t\tint lineNumber = Integer.parseInt(matcher.group(2));\n\t\t\treturn new ScriptException(e.getMessage(), fileName, lineNumber);\n\t\t} else {\n\t\t\treturn new ScriptException(e);\n\t\t}\n\t}", "ResolvedType getSpecifiedException(int index);", "@jsweet.lang.Name(\"catch\")\r\n native public <U> Promise<U> Catch();", "ExceptionEvaluationCondition getException();", "public WorldUps.UErr getError(int index) {\n if (errorBuilder_ == null) {\n return error_.get(index);\n } else {\n return errorBuilder_.getMessage(index);\n }\n }", "default V getOrThrow() {\n return getOrThrow(\"null\");\n }", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "@Nullable\n public ApolloException awaitFailure() {\n Await.latch(failureLatch, waitTimeMs);\n return failureContainer.get();\n }", "Throwable cause();", "public static TryExpression makeTry(Class type, Expression body, Expression finally_, Expression fault, Iterable<CatchBlock> handlers) { throw Extensions.todo(); }", "public static int catchingObjectNotReference(){\n int x=1;\n try{\n Throwable t = new Exception();\n throw t;\n }\n catch (RuntimeException re){x*=2;}\n catch(Exception e){x*=3;}\n catch(Throwable t){x*=5;}\n return x; // x==3\n }", "V result() throws Exception;", "public int getTryCatchBlockIndex() {\n/* 424 */ return (this.value & 0xFFFF00) >> 8;\n/* */ }", "public abstract RuntimeException getException(String message);", "public Exception getException ()\r\n {\r\n return exception_;\r\n }", "public static void catchingOnlyFromTry(){\n int x =1;\n try{\n if (true){throw new RuntimeException();}\n }\n catch (RuntimeException e){\n x*=2;\n System.out.println(x);\n if (true){throw new Error();}\n }\n catch(Error err){\n x*=3;\n System.out.println(x);\n }\n x*=5;\n System.out.println(x);\n }", "private RedisSMQException validationException(String cause) {\n\t\treturn new RedisSMQException(\"Value \" + cause);\n\t}", "protected ResultEntity error(Exception ex) {\n log.error(ex);\n resultEntity.setMessage(ex.getMessage());\n if (ex instanceof CustomException) {\n CustomException customException = (CustomException) ex;\n resultEntity.setCode(customException.getCode());\n resultEntity.setData(customException.getData());\n } else {\n resultEntity.setCode(500);\n resultEntity.setMessage(\"Internal Server Error \" + ex.getMessage());\n }\n return resultEntity;\n }", "CacheException getCacheException(ArchivalUnit au,\n String url,\n CacheEvent evt) {\n try {\n CacheException cacheException = makeException(au, url, evt);\n return cacheException;\n } catch (Exception ex) {\n log.error(\"Can't make CacheException for: \" + evt.getResultString(),\n ex);\n return new\n CacheException.UnknownExceptionException(\"Unable to make exception:\"\n + ex.getMessage());\n }\n }", "private static Exception method_7085(Exception var0) {\r\n return var0;\r\n }", "static <IS, OS, X extends Exception> Function<Result<IS, Exception>, Result<OS, Exception>> onSuccessTry(\n ThrowingLambdas.ThrowingFunction<IS, OS, X> throwingFunction\n ) {\n return attempt(tryTo(throwingFunction));\n }", "@org.chromium.protocolReader.JsonOptionalField\n boolean wasThrown();", "@Nullable public Throwable error() {\n return err;\n }", "WorldUps.UErr getError(int index);", "private RedisSMQException validationException(Object value, String cause) {\n\t\treturn new RedisSMQException(\"Value \" + value + \" \" + cause);\n\t}", "@NonNull\n @Override\n public <X extends Throwable> ResultT getResult(@NonNull Class<X> exceptionType) throws X {\n if (getFinalResult() == null) {\n throw new IllegalStateException();\n }\n if (exceptionType.isInstance(getFinalResult().getError())) {\n throw exceptionType.cast(getFinalResult().getError());\n }\n Throwable t = getFinalResult().getError();\n if (t != null) {\n throw new RuntimeExecutionException(t);\n }\n return getFinalResult();\n }", "private ChannelFuture checkException(ChannelPromise promise) {\n/* 624 */ Throwable t = this.lastException;\n/* 625 */ if (t != null) {\n/* 626 */ this.lastException = null;\n/* */ \n/* 628 */ if (promise.isVoid()) {\n/* 629 */ PlatformDependent.throwException(t);\n/* */ }\n/* */ \n/* 632 */ return (ChannelFuture)promise.setFailure(t);\n/* */ } \n/* */ \n/* 635 */ return (ChannelFuture)promise.setSuccess();\n/* */ }", "public Exception getException ()\n {\n return exception;\n }", "public static TypeReference newTryCatchReference(int tryCatchBlockIndex) {\n/* 296 */ return new TypeReference(0x42000000 | tryCatchBlockIndex << 8);\n/* */ }", "public ItemInvalidoException() {\r\n }", "public static int finallyReturnWithException() {\n try {\n throw new RuntimeException();\n } finally {\n return 1;\n }\n }", "String getErrorMessage(E input);", "public java.lang.String getException() {\n return exception;\n }", "java.lang.String getErr();", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "@Test\n\tpublic void exception() {\n\t\t// ReactiveValue wraps all exceptions in CompletionException.\n\t\tCompletionException ce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new ArithmeticException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t\tassertThat(p.keys(), contains(\"key\"));\n\t\t// If we try to throw another exception second time around, we will still get the first one.\n\t\tce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new IllegalStateException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t}", "@Override\n\tpublic void VisitTryNode(BunTryNode Node) {\n\n\t}", "public ApiException exception() {\n return this.exception;\n }", "@Nonnull\n default T parseOrFail(@Nonnull String s) throws CommandInterruptException {\n Optional<T> ret = parse(s);\n if (!ret.isPresent()) {\n throw new CommandInterruptException(\"&cUnable to parse argument: \" + s);\n }\n return ret.get();\n }", "int mo23350e(String str, String str2, Throwable th);", "static <IS, OS, F, X extends Exception> Function<Result<IS, F>, Result<OS, F>> onSuccessTry(\n ThrowingLambdas.ThrowingFunction<IS, OS, X> throwingFunction,\n Function<Exception, F> exceptionMapper\n ) {\n return attempt(tryTo(throwingFunction).andThen(onFailure(exceptionMapper)));\n }", "public Exception getException() {\r\n return exception;\r\n }", "public Exception getException() {\n return exception;\n }", "public BuildException getException() {\n return failure;\n }", "public static Errors forException(Throwable t) {\n Errors error = classToError.get(t.getClass());\n return error == null ? UNKNOWN : error;\n }", "Result(Exception e) {\n empty = false;\n this.e = e;\n status = 1;\n }", "public Exception getException()\n {\n return exception;\n }", "public java.lang.CharSequence getException() {\n return Exception;\n }", "@Property\n public native MintMessageException getExceptionError ();", "@Test\n public void test071() throws Throwable {\n Submit submit0 = new Submit((Component) null, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n NumberInput numberInput0 = new NumberInput(submit0, \"Col component can e added onlG to a TableBlock.\", \"Col component can e added onlG to a TableBlock.\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.tt();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public int getExceptionNumber(\n ) {return (0);}", "public ValidationFailure(Exception exception) {\n message = exception.getMessage();\n if (exception instanceof XPathException) {\n errorCode = ((XPathException)exception).getErrorCodeLocalPart();\n }\n }", "public static int catchRuntimeExceptionWithException(){\n int x =1;\n try{\n if (true){throw new RuntimeException();}\n x *=2;\n }\n catch (Exception e){\n x*=3;\n }\n x*=5;\n return x; // x==15\n }", "public Exception getException()\n\t{\n\t\treturn exception;\n\t}", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "public static ReturnError instance(Object value) {\n ReturnError instance = INSTANCE;\n instance.value = value;\n return instance;\n }", "public String getError() throws IOException {\n String line = \"\";\n StringBuffer buffer = new StringBuffer();\n BufferedReader in = new BufferedReader(new InputStreamReader(\n httpConnection.getErrorStream()));\n while ((line = in.readLine()) != null) {\n buffer.append(line + \"\\n\");\n }\n in.close();\n return buffer.toString();\n }", "public static <T> CommonResult<T> failed(IErrorCode errorCode) {\n return new CommonResult<T>(errorCode.getCode(), errorCode.getMessage(), null);\n }", "@Override\n @Nullable\n public Exception getError() {\n return error;\n }", "public ErrorResponse getError()\n {\n return data().containsKey(_ERROR) ? new ErrorResponse(data().getDataMap(_ERROR)) : null;\n }", "public CodeException getCodeException(final ConstantPoolGen cp) {\n return new CodeException(startPc.getPosition(), endPc.getPosition() + endPc.getInstruction().getLength(), handlerPc.getPosition(),\n catchType == null ? 0 : cp.addClass(catchType));\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "public Object getError() {\n\t\treturn error;\n\t}", "public Exception getException() {\n return mException;\n }", "default V getOrThrow(String message) {\n return Conditions.nonNull(get(), message);\n }", "public ElFicheroNoExisteException() {\n }", "public UnresolvedAddressException getException()\n\t{\n\t\treturn exception;\n\t}", "public String getInvalidError()\n\t{\n\t\t @SuppressWarnings(\"deprecation\")\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n\t\t\t .withTimeout(5000, TimeUnit.MILLISECONDS)\n\t\t\t .pollingEvery(250, TimeUnit.MILLISECONDS)\n\t\t\t .ignoring(NoSuchElementException.class);\n\t\t\t \n\t\t\t WebElement element = wait.until(new Function<WebDriver, WebElement>() \n\t\t\t {\n\t\t\t public WebElement apply(WebDriver driver) \n\t\t\t {\n\t\t\t\t String getTextOnPage = invaliderror.getText();\n\t\t\t\t \n\t\t\t\t if(getTextOnPage.contains(\"Invalid Username Or Password\"))\n\t\t\t\t \t{\n\t\t\t\t\t \treturn invaliderror;\n\t\t\t\t \t}\n\t\t\t\t else\n\t\t\t\t \t{\n\t\t\t\t\t \treturn null;\n\t\t\t\t \t}\n\t\t\t }\n\t\t\t }\n\t\t\t );\n\t\t\t\n\t\t\treturn element.getText();\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testFromValueWithException() {\n System.out.println(\"fromValue\");\n String value = \"DELETED\";\n StatusType expResult = StatusType.DELETED;\n StatusType result = StatusType.fromValue(value);\n assertEquals(expResult, result);\n }" ]
[ "0.60780644", "0.60780644", "0.5972159", "0.5849292", "0.57982093", "0.5748432", "0.5697552", "0.5691532", "0.5672868", "0.5536646", "0.551955", "0.5516239", "0.5516239", "0.5413819", "0.54121286", "0.5387597", "0.53469783", "0.5296617", "0.5264767", "0.52475196", "0.5233867", "0.5221801", "0.5218955", "0.52086854", "0.5176373", "0.5176373", "0.5176373", "0.51701206", "0.5164968", "0.51645535", "0.5158298", "0.5081973", "0.5062067", "0.50455076", "0.50379086", "0.5030373", "0.5027964", "0.50237906", "0.5022659", "0.5019316", "0.500957", "0.5004173", "0.49797776", "0.49674627", "0.4936793", "0.49293423", "0.49264342", "0.4923953", "0.49162874", "0.49082717", "0.49058735", "0.4902707", "0.490091", "0.4898269", "0.4882253", "0.4870314", "0.4860868", "0.48587817", "0.48319134", "0.48306373", "0.48233312", "0.48190767", "0.4818018", "0.48114842", "0.47988504", "0.47976565", "0.47962078", "0.47807327", "0.47781208", "0.47721913", "0.47700474", "0.47671086", "0.4765156", "0.47640243", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47637683", "0.47628853", "0.47622207", "0.47619334", "0.47614694", "0.47593147", "0.47530314", "0.47435245", "0.4734663", "0.47322693", "0.47311622", "0.47290307", "0.4721733", "0.4719611", "0.47165525" ]
0.6927892
0
add getters, setters, etc. here
public String toString() { if (!isException) { return "SUCCESS(" + value + ")"; } else { return "FAILURE(" + ex + ")"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void updateProperties() {\n }", "public void setupProperties() {\n // left empty for subclass to override\n }", "@Override\n public void updateProperties() {\n // unneeded\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public void generate() {\n\t\tthis.initializePathBindingClass();\n\t\t// managed at abstract level ; name provided at binding generation time\n\t\t// this.addGetName();\n\t\t// this.addGetType();\n\n\t\t// add all properties methods\n\t\tthis.addProperties();\n\t\t// add getter that provides property list\n\t\tthis.addGetChildBindings();\n\n\t\t// initialize class declaration (*Binding)\n\t\tthis.initializeRootBindingClass();\n\t\t// add constructors\n\t\tthis.addConstructors();\n\t\t// add getWithRoot method\n\t\tthis.addGetWithRoot();\n\t\t// add getSafelyWithRoot method\n\t\tthis.addGetSafelyWithRoot();\n\n\t\tthis.addGeneratedTimestamp();\n\t\tthis.addSerialVersionUID();\n\t\tthis.saveCode(this.pathBindingClass);\n\t\tthis.saveCode(this.rootBindingClass);\n\t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "@Override\npublic void setAttributes() {\n\t\n}", "private TigerData() {\n initFields();\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n setDate();\n setISBN();\n setDescription();\n setPageCount();\n setNumRatings();\n }", "@Override\r\n\tpublic void addMe() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private GetProperty(Builder builder) {\n super(builder);\n }", "@Test\r\n\tpublic void gettersSettersTest() {\r\n\t\tItem item = new Item();\r\n\t\titem.setCount(NUMBER);\r\n\t\tassertEquals(item.getCount(), NUMBER);\r\n\t\titem.setDescription(\"word\");\r\n\t\tassertEquals(item.getDescription(), \"word\");\r\n\t\titem.setId(NUMBER);\r\n\t\tassertEquals(item.getId(), NUMBER);\r\n\t\titem.setName(\"word\");\r\n\t\tassertEquals(item.getName(), \"word\");\r\n\t\titem.setPicture(\"picture\");\r\n\t\tassertEquals(item.getPicture(), \"picture\");\r\n\t\titem.setPrice(FLOATNUMBER);\r\n\t\tassertEquals(item.getPrice(), FLOATNUMBER, 0);\r\n\t\titem.setType(\"word\");\r\n\t\tassertEquals(item.getType(), \"word\");\r\n\t\titem.setSellerId(NUMBER);\r\n\t\tassertEquals(item.getSellerId(), NUMBER);\r\n\t\titem.setDeleted(false);\r\n\t\tassertEquals(item.isDeleted(), false);\r\n\t\titem.setDeleted(true);\r\n\t\tassertEquals(item.isDeleted(), true);\t\t\r\n\t}", "@Override\n\tprotected void initializeFields() {\n\n\t}", "@Override\n\tpublic void addProperty(String name) {\n\t}", "@Override\n public void get() {}", "private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}", "private RoleData() {\n initFields();\n }", "public void initForAddNew() {\r\n\r\n\t}", "@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}", "@Override\n\tpublic void generate() {\n\t\tJavaObject objectInterface = new JavaObject(interfaceType);\n\t\tif (hasFields() && getBean().get().isCompare()) {\n\t\t\tobjectInterface.addExtends(getComparableInterface());\n\t\t}\n\t\tif (bean.isExecutable()) {\n\t\t\tIJavaType type = resolve(IExecutableBean.class, bean.getReturnType());\n\t\t\tobjectInterface.addExtends(type);\n\t\t} else {\n\t\t\tIJavaType type = resolve(IBean.class);\n\t\t\tobjectInterface.addExtends(type);\n\t\t}\n\t\taddExtends(objectInterface);\n\t\tif (isImmutable()) {\n\t\t\tobjectInterface.addExtends(resolve(IImmutable.class));\n\t\t}\n\n\t\t// For each bean we generate a class\n\t\tJavaObject object = new JavaObject(classType);\n\t\tobject.addExtends(interfaceType);\n\t\taddExtends(object);\n\n\t\t// Add the fields, getters and setter methods\n\t\taddBlocks(object, objectInterface);\n\n\t\t// Done!\n\t\twrite(object);\n\t\twrite(objectInterface);\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void setupConvenienceObjects();", "@FameProperty(name = \"accessors\", derived = true)\n public Collection<TWithAccesses> getAccessors() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "private AccessorModels() {\n // Private constructor to prevent instantiation\n }", "private void add() {\n\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "private Response() {\n initFields();\n }", "@Override\n public void load() {\n }", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "private RowData() {\n initFields();\n }", "private void setAllAttributesFromController() {\n obsoData.setSupplier(supplier);\n \n obsoData.setEndOfOrderDate(endOfOrderDate);\n obsoData.setObsolescenceDate(obsolescenceDate);\n \n obsoData.setEndOfSupportDate(endOfSupportDate);\n obsoData.setEndOfProductionDate(endOfProductionDate);\n \n obsoData.setCurrentAction(avlBean.findAttributeValueListById(\n ActionObso.class, actionId));\n obsoData.setMtbf(mtbf);\n \n obsoData.setStrategyKept(avlBean.findAttributeValueListById(\n Strategy.class,\n strategyId));\n obsoData.setContinuityDate(continuityDate);\n \n obsoData.setManufacturerStatus(avlBean.findAttributeValueListById(\n ManufacturerStatus.class, manufacturerStatusId));\n obsoData.setAirbusStatus(avlBean.findAttributeValueListById(\n AirbusStatus.class, airbusStatusId));\n \n obsoData.setLastObsolescenceUpdate(lastObsolescenceUpdate);\n obsoData.setConsultPeriod(avlBean.findAttributeValueListById(\n ConsultPeriod.class, consultPeriodId));\n \n obsoData.setPersonInCharge(personInCharge);\n obsoData.setCommentOnStrategy(comments);\n }", "@Override\n void init() {\n }", "private MainModel() {\n jsonManager = new JsonManager(this);\n }", "private FundInfo() {\n initFields();\n }", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "private ReadProperty()\r\n {\r\n\r\n }", "private void addProperties() {\n\t\tfor (PropertyGenerator pg : this.getPropertyGenerators()) {\n\t\t\tpg.generate();\n\t\t\tthis.enqueuePropertyTypeIfNeeded(pg);\n\t\t\tthis.addToSubBindingsIfNeeded(pg);\n\t\t}\n\t}", "private void setData() {\n populateInterfaceElements();\n }", "public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldInfo(this, \"ID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"LastChanged\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Date.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Deleted\", 10, null, new Boolean(false));\n field.setDataClass(Boolean.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Description\", 25, null, null);\n field = new FieldInfo(this, \"CurrencyCode\", 3, null, null);\n field = new FieldInfo(this, \"LastRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"RateChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"RateChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"CostingRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"CostingChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"CostingChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"RoundAt\", 1, null, null);\n field.setDataClass(Short.class);\n field = new FieldInfo(this, \"IntegerDesc\", 20, null, \"Dollar\");\n field = new FieldInfo(this, \"FractionDesc\", 20, null, null);\n field = new FieldInfo(this, \"FractionAmount\", 10, null, new Integer(100));\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"Sign\", 3, null, \"$\");\n field = new FieldInfo(this, \"LanguageID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"NaturalInteger\", 20, null, null);\n field = new FieldInfo(this, \"NaturalFraction\", 20, null, null);\n }", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "public interface SaleRowDTOProperties {\n\n Vehicle.KapschVehicle getVehicle();\n\n void setVehicle(Vehicle.KapschVehicle vehicle);\n\n}", "@Override\n protected void initialize() {\n\n \n }", "protected void addPropNames()\n{\n addPropNames(\"Visible\", \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\",\n \"Font\", \"TextColor\", \"FillColor\", \"StrokeColor\", \"URL\");\n}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private WebResponse() {\n initFields();\n }", "private void setAttributesIntoStrategy() {\n ResolverStrategy strategy = _resolverStrategy;\n strategy.setProperty(\n ResolverStrategy.PROPERTY_LOAD_PACKAGE_MAPPINGS, \n _loadPackageMappings);\n strategy.setProperty(\n ResolverStrategy.PROPERTY_USE_INTROSPECTION, _useIntrospector);\n strategy.setProperty(\n ResolverStrategy.PROPERTY_MAPPING_LOADER, _mappingLoader);\n strategy.setProperty(\n ResolverStrategy.PROPERTY_INTROSPECTOR, _introspector);\n }", "public interface Currency extends Model {\n String getCode();\n void setCode(String strCode);\n String getCurrencyName();\n void setCurrenyName(String strCurrencyName);\n String getCurrencySymbol();\n void setCurrencySymbol(String strCurrencySymbol);\n String getIsDefault();\n void setIsDefault(String strIsDefault);\n double getCurrencyRate();\n void setCurrencyRate(double dCurrencyRate);\n}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void grabar() {\n\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 ObjetosBeans() {\n this.init();\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\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type) {\n }", "@Override // opcional\n public void init(){\n\n }", "private void setBeanReflect(DeployBeanDescriptor<?> desc) {\n // Set the BeanReflectGetter and BeanReflectSetter that typically\n // use generated code. NB: Due to Bug 166 so now doing this for\n // abstract classes as well.\n BeanPropertiesReader reflectProps = new BeanPropertiesReader(desc.getBeanType());\n desc.setProperties(reflectProps.getProperties());\n for (DeployBeanProperty prop : desc.propertiesAll()) {\n String propName = prop.getName();\n Integer pos = reflectProps.getPropertyIndex(propName);\n if (pos == null) {\n if (isPersistentField(prop)) {\n throw new IllegalStateException(\n \"If you are running in an IDE with enhancement plugin try a Build -> Rebuild Project to recompile and enhance all entity beans. \" +\n \"Error - property \" + propName + \" not found in \" + reflectProps + \" for type \" + desc.getBeanType());\n }\n } else {\n final int propertyIndex = pos;\n prop.setPropertyIndex(propertyIndex);\n prop.setGetter(beanPropertyAccess.getGetter(propertyIndex));\n prop.setSetter(beanPropertyAccess.getSetter(propertyIndex));\n if (prop.isAggregation()) {\n prop.setAggregationPrefix(DetermineAggPath.manyPath(prop.getRawAggregation(), desc));\n }\n }\n }\n }", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "@Override\n public void init() {\n }", "public void initEventsAndProperties() {\r\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n public void updateClassDescriptor(ClassDescriptor desc) {\n desc.getters = List.of();\n desc.setters = List.of();\n\n for (Iterator<Binding> iterator = desc.fields.iterator(); iterator.hasNext(); ) {\n Binding binding = iterator.next();\n \n if (!Modifier.isPublic(binding.field.getModifiers())) {\n iterator.remove();\n } else {\n Property property = getProperty(binding.annotations);\n if (property != null) {\n binding.fromNames = new String[]{property.name()};\n binding.toNames = new String[]{property.name()};\n } else {\n iterator.remove();\n }\n }\n }\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "@Override\n\tprotected Mapping getMapping() {\n\t\treturn new Mapping()\n\t\t\t.add(\"firstname\", driver.getFirstName())\n\t\t\t.add(\"lastname\", driver.getLastName())\n\t\t\t.add(\"dateofbirth\", driver.getDateOfBirth())\n\t\t\t.add(\"gender\", driver.getGender())\n\t\t\t.add(\"age\", computeAge())\n\t\t\t.add(\"numberOfAccidents\", driver.getNumberOfAccidents())\n\t\t\t.add(\"numberOfTickets\", driver.getNumberOfTickets());\n\t}", "private SetProperty(Builder builder) {\n super(builder);\n }", "static void setPropertiesFromGetters(TableEntity entity, ClientLogger logger) {\n Class<?> myClass = entity.getClass();\n\n // Do nothing if the entity is actually a `TableEntity` rather than a subclass\n if (myClass == TableEntity.class) {\n return;\n }\n\n for (Method m : myClass.getMethods()) {\n // Skip any non-getter methods\n if (m.getName().length() < 3\n || TABLE_ENTITY_METHODS.contains(m.getName())\n || (!m.getName().startsWith(\"get\") && !m.getName().startsWith(\"is\"))\n || m.getParameterTypes().length != 0\n || void.class.equals(m.getReturnType())) {\n continue;\n }\n\n // A method starting with `is` is only a getter if it returns a boolean\n if (m.getName().startsWith(\"is\") && m.getReturnType() != Boolean.class\n && m.getReturnType() != boolean.class) {\n continue;\n }\n\n // Remove the `get` or `is` prefix to get the name of the property\n int prefixLength = m.getName().startsWith(\"is\") ? 2 : 3;\n String propName = m.getName().substring(prefixLength);\n\n try {\n // Invoke the getter and store the value in the properties map\n entity.getProperties().put(propName, m.invoke(entity));\n } catch (ReflectiveOperationException | IllegalArgumentException e) {\n logger.logThrowableAsWarning(new ReflectiveOperationException(String.format(\n \"Failed to get property '%s' on type '%s'\", propName, myClass.getName()), e));\n }\n }\n }", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "private static void initObjectProperties() {\n OntModel ontologie = ModelFactory.createOntologyModel();\n OntologyFactory.readOntology(ontologyPath, ontologie);\n objectProperties.addAll(ontologie.listObjectProperties().toList());\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\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 RepositorioOrdemServicoHBM() {\n\n\t}", "public ApplyUpdateProperties() {\n }", "public interface IngredientListReadWriteModel extends BaseReadWriteModel,ICustomListViewModel,IngredientListReadModel {\n\n void setMealName(String mealName);\n void setEditableIngredientPosition(int pos);\n boolean checkMealName();\n void saveMeal();\n void newActiveIngredient();\n IMeal getActiveMeal();\n}", "public void setItems(){\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Test\n\tpublic static void testGetters() {\n\t\tCompoundMadeOfElementDTO idk = new CompoundMadeOfElementDTO(1, 3, 20);\n\t\tassertEquals(1, idk.getCompoundID());\n\t\tassertEquals(3, idk.getElementID());\n\t\tassertEquals(20, idk.getElementQuantity());\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void collectReadableProperties(Map<String, PojoProperty> map,\n Class<?> cls) {\n for (final Method m : cls.getDeclaredMethods()) {\n //if (isStaticOrPrivate(m)) continue;\n if (isStatic(m.getModifiers())) continue;\n if (1 != m.getParameterTypes().length)// get=0,set=1\n continue;\n Class<?> returnType = m.getReturnType();\n if (returnType == Object.class || returnType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n Class<?> propType = m.getParameterTypes()[0];\n if (returnType == Void.TYPE && propType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n\n String name = m.getName();\n String propName = null;\n String originalPropName = null;\n boolean isBool = false;\n if (name.startsWith(\"set\") && name.length() > 3) {\n originalPropName = name.substring(3);\n propName = decapitalize(originalPropName, true);\n if (propType == Boolean.TYPE) {\n isBool = true;\n }\n }\n if (propName == null) continue;\n\n String getMethodName = (isBool ? \"is\" : \"get\") + originalPropName;\n try {\n Field field;\n try {\n field = cls.getDeclaredField(propName);\n } catch (NoSuchFieldException e) {\n propName = decapitalize(originalPropName, false);\n field = cls.getDeclaredField(propName);\n }\n if (map.containsKey(propName))\n continue;\n\n m.setAccessible(true);\n Method getMethod;\n getMethod = cls.getDeclaredMethod(getMethodName);\n getMethod.setAccessible(true);\n\n PojoProperty rp = new PojoProperty(propName, propType);\n rp.setGetMethod(getMethod);\n rp.setSetMethod(m);\n rp.setField(field);\n map.put(propName, rp);\n } catch (NoSuchMethodException | NoSuchFieldException e) {\n //e.printStackTrace();\n logger.warn(String.format(\"实体方法:%s 或 字段:%s 不存在\", getMethodName, propName));\n }\n }\n\n for (final Field m : cls.getDeclaredFields()) {\n //if (isStaticOrPrivate(m)) continue;\n if(isStatic(m.getModifiers())) continue;\n String propName = m.getName();\n if (map.containsKey(propName)) continue;\n Class<?> returnType = m.getType();\n m.setAccessible(true);\n PojoProperty rp = new PojoProperty(propName, returnType);\n rp.setField(m);\n map.put(propName, rp);\n }\n }" ]
[ "0.6298574", "0.60460687", "0.6023352", "0.5937763", "0.592471", "0.5880709", "0.5826302", "0.5801995", "0.5748182", "0.5716675", "0.56480825", "0.564362", "0.5642975", "0.5627123", "0.55856866", "0.5579323", "0.55788743", "0.55507225", "0.55501527", "0.5536309", "0.5535307", "0.55289453", "0.55139357", "0.5509962", "0.55059385", "0.5498281", "0.5491", "0.5480418", "0.5477655", "0.54729265", "0.547198", "0.5467579", "0.5453282", "0.5447178", "0.5438796", "0.5429592", "0.54226995", "0.5420473", "0.5419426", "0.5412971", "0.5412894", "0.54054886", "0.5404734", "0.53876656", "0.5387351", "0.53785163", "0.53748065", "0.5373113", "0.5369537", "0.5354459", "0.5354028", "0.5350975", "0.5348434", "0.534827", "0.534827", "0.534827", "0.534827", "0.534827", "0.534827", "0.5344951", "0.5343876", "0.5339429", "0.53350496", "0.533428", "0.5331969", "0.53150105", "0.53138316", "0.53138316", "0.53138316", "0.53138316", "0.53138316", "0.53138316", "0.5312478", "0.5309553", "0.5309355", "0.5308812", "0.53062856", "0.5305963", "0.52991486", "0.52991486", "0.5297447", "0.5296085", "0.5294839", "0.5287874", "0.5285593", "0.52837753", "0.5282988", "0.5282988", "0.5281417", "0.52787286", "0.5278016", "0.5277853", "0.52725744", "0.5271836", "0.5264729", "0.52630424", "0.52545035", "0.5251932", "0.5251932", "0.52518964", "0.5249575" ]
0.0
-1
The y coordinate of this Tile. Creates and returns a Tile object with the passed x and y coordinates.
public Tile(final int x, final int y) { this.x = x; this.y = y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTileY(int y) {\n\t\ttileY = y;\n\t}", "public int convertYToTileY(final int y) {\n return convertYToTileY(y, getTileGridYOffset(), getTileHeight());\n }", "public int getTileY() {\n\t\treturn tileY;\n\t}", "public int getTileY()\n\t{\n\t\treturn this.tileY;\n\t}", "public int getY() {\n return yCoord;\n }", "public int getyCoordinate() {\n return yCoordinate;\n }", "public int getyCoordinate() {\n return yCoordinate;\n }", "public int getY() {\r\n\t\treturn ycoord;\r\n\t}", "public int getY() {\n return this.coordinate.y;\n }", "protected Number getY() {\n return this.yCoordinate;\n }", "public int getY()\r\n {\r\n return yCoord;\r\n }", "public int getyCoord() {\r\n\t\treturn yCoord;\r\n\t}", "public int getyCoord() {\n\t\treturn yCoord;\n\t}", "public int getY()\n\t{\n\t\treturn m_nPosY;\n\t}", "public int getY() {\n\t\t\n\t\treturn yPosition;\t\t// Gets the y integer\n\t}", "@Basic\n\tpublic double getYCoordinate() {\n\t\treturn this.y;\n\t}", "public double getyCoordinate() {\n return yCoordinate;\n }", "public int getYCoordinate()\n\t{\n\t\treturn yCoordinate;\n\t}", "public int y() {\r\n\t\treturn yCoord;\r\n\t}", "public int getY() {\r\n\t\treturn this.y;\r\n\t}", "public double getPositionY() {\n\t\treturn this.tilePositionY;\n\t}", "public int getYPos();", "public int getY() {\r\n\t\treturn y;\r\n\t}", "public int getY() {\r\n\t\treturn y;\r\n\t}", "public int getY() {\r\n\t\treturn y;\r\n\t}", "public int getY() {\n\t\treturn this.y;\n\t}", "public int getY() {\n\t\treturn this.y;\n\t}", "public int getY() {\n\t\treturn this.y;\n\t}", "public int getY() {\r\n return this.y;\r\n }", "public final int getY()\n\t{\n\t\treturn pos.y;\n\t}", "public int tileYToY(final int ty) {\n return ty * this.tileHeight + this.tileGridYOffset;\n }", "public int getCoordY() \r\n {\r\n \treturn this.coordY;\r\n }", "public double getY() {\r\n\t\t return this.yCoord;\r\n\t }", "public int getY()\n\t{\n\t\treturn this.y;\n\t}", "public int getY()\n\t{\n\t\treturn this.y;\n\t}", "public int getY() {\r\n return y;\r\n }", "public int getY() {\r\n return y;\r\n }", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() { return y; }", "public int getY() { return y; }", "public double getyCoord() {\n\t\treturn yCoord;\n\t}", "void setY(final Number y) {\n this.yCoordinate = y;\n }", "public static int convertYToTileY(int y, final int tileGridYOffset,\n final int tileHeight) {\n y -= tileGridYOffset;\n if (y < 0) {\n y += 1 - tileHeight; // Force round to -infinity\n }\n return y / tileHeight;\n }", "public int getY()\r\n\t{\r\n\t\treturn y;\r\n\t}", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return this.y;\n }", "public int getY() {\n if (this.coordinates == null)\n return -1;\n return this.coordinates.y();\n }", "public int getY()\r\n\t{\r\n\t\treturn this.Y;\r\n\t}", "public int getY(){\r\n\t\treturn y;\r\n\t}", "public int getY()\r\n {\r\n return yLoc;\r\n }", "public void setY(int y) {\n\tbaseYCoord = y;\n}", "public static int tileYToY(final int ty, final int tileGridYOffset,\n final int tileHeight) {\n return ty * tileHeight + tileGridYOffset;\n }", "public int getY() {\n return (int) yPos;\n }", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY() {\n return y;\r\n }", "public int getY()\n {\n return this.y;\n }", "private int getIsoY(int x, int y) {\n\t\treturn (x + y) * (TILE_HEIGHT/2);\n\t}", "public int getY() {return y;}", "public int getY() {\n return (int) this.ty;\n }", "public int getY()\r\n\t{\r\n\t\treturn (int)y;\r\n\t}", "public double getYCoordinates() { return yCoordinates; }", "public int getY()\n\t{\n\t\treturn mY;\n\t}", "public int getY() { return loc.y; }", "public final double getY() { return location.getY(); }", "public double getYCoordinate() {\n return yCoordinate;\n }", "@Override\n\tpublic float getY() {\n\t\treturn lilyPosY;\n\t}" ]
[ "0.7497795", "0.71624905", "0.71347684", "0.7060668", "0.67531705", "0.6740514", "0.6740514", "0.6719998", "0.6719899", "0.67031354", "0.6701999", "0.6687387", "0.667404", "0.6657931", "0.66245556", "0.66216564", "0.6602509", "0.6595063", "0.6547993", "0.65318066", "0.6522997", "0.65074515", "0.6502112", "0.6502112", "0.6502112", "0.65015084", "0.65015084", "0.65015084", "0.64998174", "0.6499489", "0.6497915", "0.64977354", "0.64949805", "0.648859", "0.648859", "0.64841235", "0.64841235", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.64765143", "0.6476506", "0.6476506", "0.6461629", "0.64551157", "0.64527404", "0.645134", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.6447585", "0.64394885", "0.64394885", "0.64394885", "0.64394885", "0.64394885", "0.64376277", "0.64349157", "0.64329606", "0.6426343", "0.642603", "0.64237094", "0.6421935", "0.6416812", "0.64145625", "0.64145625", "0.64145625", "0.64145625", "0.64145625", "0.64145625", "0.64141005", "0.6402215", "0.64003015", "0.63990813", "0.63969827", "0.6395499", "0.6389691", "0.6383242", "0.6375597", "0.63715434", "0.63675046", "0.6366586" ]
0.69141686
4
///////////////////////// // Constructors //// ///////////////////////// Default Constructor.
public Chromosome(){ super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "public Curso() {\r\n }", "public Tbdtokhaihq3() {\n super();\n }", "public Demo() {\n\t\t\n\t}", "public CSSTidier() {\n\t}", "public PSRelation()\n {\n }", "public Basic() {}", "public Pitonyak_09_02() {\r\n }", "private TMCourse() {\n\t}", "public Odontologo() {\n }", "public Cohete() {\n\n\t}", "public JSFOla() {\n }", "public Chick() {\n\t}", "public Coche() {\n super();\n }", "private Rekenhulp()\n\t{\n\t}", "public Libro() {\r\n }", "public Main() {\n\t\tsuper();\n\t}", "public Magazzino() {\r\n }", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}", "private Main() {\n\n super();\n }", "public SgaexpedbultoImpl()\n {\n }", "public _355() {\n\n }", "public Chauffeur() {\r\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private MApi() {}", "public Lanceur() {\n\t}", "public HGDClient() {\n \n \t}", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public Anschrift() {\r\n }", "public Livro() {\n\n\t}", "public Phl() {\n }", "public Pasien() {\r\n }", "private Default()\n {}", "public Orbiter() {\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public CMN() {\n\t}", "public Trening() {\n }", "private SingleObject()\r\n {\r\n }", "public SlanjePoruke() {\n }", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public Tbdcongvan36() {\n super();\n }", "public Resource() {\n }", "public Resource() {\n }", "public ContentKj () {\n\t\tsuper();\n\t}", "public Parser()\n {\n //nothing to do\n }", "public ExamMB() {\n }", "public Mitarbeit() {\r\n }", "public Factory() {\n\t\tsuper();\n\t}", "public OVChipkaart() {\n\n }", "public Clade() {}", "public mapper3c() { super(); }", "defaultConstructor(){}", "public Carrinho() {\n\t\tsuper();\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Main ()\n {\n super ();\n }", "public RngObject() {\n\t\t\n\t}", "public Mannschaft() {\n }", "private Aliyun() {\n\t\tsuper();\n\t}", "public Aanbieder() {\r\n\t\t}", "public Gasto() {\r\n\t}", "public TTau() {}", "public Boop() {\n\t\tsuper();\n\t}", "public AirAndPollen() {\n\n\t}", "public Main() {\r\n\t}", "public Connection() {\n\t\t\n\t}", "protected Asignatura()\r\n\t{}", "private Instantiation(){}", "public Goodsinfo() {\n super();\n }", "public Webinar() {\n\t\t\n\t}", "public VOCSesame () {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "private Marinator() {\n }", "private Marinator() {\n }", "public Catelog() {\n super();\n }", "public LpsClient() {\n super();\n }", "public Sandwich()\n\t{super();\n \n\t\t\n\t}", "public AFMV() {\r\n }", "public Carrera(){\n }", "public WordList() {\t\t//Default constructor\n\t}", "private Converter()\n\t{\n\t\tsuper();\n\t}", "public Soil()\n\t{\n\n\t}", "public Content() {\n\t}", "public GTFTranslator()\r\n {\r\n // do nothing - no variables to instantiate\r\n }", "public BasicLoader() {\n }", "public EnsembleLettre() {\n\t\t\n\t}", "private HTTPSession ()\n\t{\n\t\tthis (null, false, null);\n\t}", "public Tigre() {\r\n }", "private Composite() {\n }", "private XMLUtils()\r\n\t{\r\n\t}", "public Rook()\n {\n super();\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "public Excellon ()\n {}", "public Rol() {}", "public Alojamiento() {\r\n\t}", "Composite() {\n\n\t}" ]
[ "0.83372754", "0.77752334", "0.7280454", "0.72618455", "0.71868277", "0.7180812", "0.71785593", "0.71533895", "0.71528304", "0.7122178", "0.7076443", "0.707129", "0.7066968", "0.70492727", "0.7048817", "0.7047492", "0.7033688", "0.70263463", "0.69986415", "0.69837", "0.69788927", "0.696351", "0.6945899", "0.69365895", "0.6928725", "0.692253", "0.69219184", "0.69133747", "0.6910882", "0.69078964", "0.69000906", "0.68996197", "0.68995047", "0.689516", "0.68765074", "0.6873261", "0.6866994", "0.6861738", "0.6846665", "0.6845836", "0.6839825", "0.68286216", "0.6823244", "0.68164515", "0.68151397", "0.68138516", "0.6812577", "0.6812577", "0.6809802", "0.6799321", "0.6797236", "0.6797127", "0.6796069", "0.6792505", "0.6786006", "0.67844856", "0.6780864", "0.6780435", "0.67803454", "0.67784816", "0.67768395", "0.67714834", "0.6764151", "0.6759051", "0.6756751", "0.67521614", "0.6751009", "0.6747906", "0.67470247", "0.6745857", "0.67452306", "0.67409647", "0.673797", "0.6737442", "0.6733618", "0.6733088", "0.6725732", "0.6721312", "0.6721312", "0.6696133", "0.6695265", "0.66950846", "0.66891146", "0.6687871", "0.668452", "0.6677502", "0.6673897", "0.66733193", "0.66648036", "0.6663854", "0.6659491", "0.66549546", "0.66541237", "0.6653721", "0.6649995", "0.6648261", "0.66466105", "0.66421527", "0.6641225", "0.66366667", "0.66345763" ]
0.0
-1
For chaining with constructor to include a randomly selected set of knapsack items.
public Chromosome withRandomKnapsackItems() { this.knapsackSelection = generateRandomItems(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Knapsack(int k, int[] v, int[] w) {\n\t\tif (v.length != w.length)\n\t\t\tthrow new IllegalArgumentException(\"ambiguous problem size\");\n\t\tn = v.length;\n\t\tif (n < 1)\n\t\t\tthrow new IllegalArgumentException(\"no items to put in knapsack\");\n\t\tthis.k = k;\n\t\tthis.v = new int[n];\n\t\tthis.w = new int[n];\n\t\tSystem.arraycopy(v, 0, this.v, 0, n);\n\t\tSystem.arraycopy(w, 0, this.w, 0, n);\n\t\tx = new int[n];\n\t\tint max = optimize(); // sets x\n\t\tassert feasible();\n\t\toptimal = objective() == max;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint max_size,n; \n \n ArrayList<item> items=new ArrayList();\n\t\t// item 1, value 6, size 1\n items.add(new item(1, 6, 1));\n\t\t// item 2, value 10, size 2\n\t\titems.add(new item(2, 10, 2));\n\t\t// item 3, value 12, size 3\n\t\titems.add(new item(3, 12, 3));\n\t\t// the size of your knapsack\n max_size=5; \n\t\t// sort items by density\n\t\tsortitems(items);\n \n System.out.println(\"The maximum value we can place into the knapsack is \"+ greedyfractionalknapsack(items, max_size));\n\n\n\n}", "static int knapsack(Item[] items, int maxWeight) {\n return knapsack(items, maxWeight, 0);\n }", "public static void main(String[] args){ w = the total weight\n\t\t// i = item i\n\t\t// m[i, w] = maximum value attained with weight <= w using items up to i\n\t\t//\n\t\t// recurrence relation:\n\t\t// m[0, w] = 0, if there's zero items, the sum is zero\n\t\t// m[i, w] = m[i-1, w], if w(i) > w, the new item's weight > current weight limit\n\t\t// m[i, w] = max(m[i-1, w],\n\t\t// \t\t\t\t m[i-1, w-w(i)] + v(i), if w(i) <= w\n\t\t//\n\t\t//\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\n\t\titems.add(new Item(10, 60));\n\t\titems.add(new Item(20, 100));\n\t\titems.add(new Item(30, 120));\n\n\t\tSystem.out.println(knapsack(items.size()-1, 50, items));\n\t}", "private void initialState() {\n forEach(item -> item.setInKnapsack(false));\n\n for (final Item item : this) {\n if (wouldOverpack(item)) {\n break;\n }\n item.switchIsKnapsack();\n }\n }", "void ksUnbounded(int targetWeight, int nItems, int[] iWeights, int[] iValues) {\n\r\n\t\tint[][] ksItemCapacity = new int[nItems + 1][targetWeight + 1];\r\n\t\tint[][] ksTrack = new int[nItems + 1][targetWeight + 1];\r\n\r\n\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\tksItemCapacity[0][w] = 0;\r\n\t\t}\r\n\r\n\t\tfor (int item = 1; item < nItems; item++) {\r\n\t\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\t\t// last known Maximum value of KS contents s.t. their weight\r\n\t\t\t\t// totals to atmost w-iWeights[item]\r\n\t\t\t\tint eItemValue = (iWeights[item] <= w) ? ksItemCapacity[item - 1][w\r\n\t\t\t\t\t\t- iWeights[item]]\r\n\t\t\t\t\t\t: 0;\r\n\t\t\t\tif ((iWeights[item] <= w)\r\n\t\t\t\t\t\t&& (iValues[item] + eItemValue) > ksItemCapacity[item - 1][w]) {\r\n\t\t\t\t\tksItemCapacity[item][w] = eItemValue + iValues[item];\r\n\t\t\t\t\t// current item included\r\n\t\t\t\t\tksTrack[item][w] = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tksItemCapacity[item][w] = ksItemCapacity[item - 1][w];\r\n\t\t\t\t\t// current item not included\r\n\t\t\t\t\tksTrack[item][w] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Print KS contents\r\n\t\tArrayList<Integer> ksContents = new ArrayList<Integer>();\r\n\t\tint tW = targetWeight;\r\n\t\tfor (int item = nItems; item >= 0; item--) {\r\n\t\t\tif (ksTrack[item][tW] == 1) {\r\n\t\t\t\ttW -= iWeights[item];\r\n\t\t\t\tksContents.add(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Items choosen are:\");\r\n\t\tint W = 0, V = 0;\r\n\t\tfor (Integer e : ksContents) {\r\n\t\t\tW += iWeights[e];\r\n\t\t\tV += iValues[e];\r\n\t\t\tSystem.out.println(\"Weight: \" + iWeights[e] + \", Value: \"\r\n\t\t\t\t\t+ iValues[e]);\r\n\t\t}\r\n\t\tSystem.out.println(\"Total weight: \" + W + \" Total value: \" + V);\r\n\t}", "public Knapsack bruteForceCalc (ArrayList <Item> items,int capacity, int num_items) {\n\t\tif (num_items <= 0) {\n\t\t\tKnapsack knapsack = new Knapsack(0);\n\t\t\treturn knapsack;\n\t\t} \n\t\telse if (items.get(num_items -1).getWeight() > capacity) {\n\t\t\treturn bruteForceCalc(items, capacity, num_items - 1);\n\t\t} else {\n\n\t\t\tKnapsack ignore = bruteForceCalc(items,capacity, num_items - 1);\n\t\t\tKnapsack take = bruteForceCalc(items,capacity - items.get(num_items -1).getWeight(), num_items - 1);\n\t\t\t\n\t\t\tint ignoreVal = ignore.getValue();\n\t\t\tint takeVal = items.get(num_items - 1).getValue() + take.getValue();\n\t\t\t \n\t\t\tif( Math.max(ignoreVal, takeVal) == ignoreVal ) \n\t\t\t\treturn ignore;\n\t\t\telse {\n\t\t\t\ttake.addItem(items.get(num_items - 1));\n\t\t\t\treturn take;\n\t\t\t}\n\t\t}\n\t}", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint capacity = sc.nextInt();\n\t\tint numitems = sc.nextInt();\n\t\tint[] weights = new int[numitems];\n\t\tint[] values = new int[numitems];\n\t\tfor(int i = 0; i < numitems; i++){\n\t\t\tweights[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < numitems; i++){\n\t\t\tvalues[i] = sc.nextInt();\n\t\t}\n\t\tknapsack(weights, values, capacity);\n\t\tsc.close();\n\n\t}", "public static void main(String[] args) {\n System.out.println(\"------Random items and knapsacks------\");\n int itemLen = 10;\n int knapsackLen = 4;\n float[] benefit = new float[itemLen];\n float[] weight = new float[itemLen];\n int[] knapsackWeight = new int[knapsackLen];\n\n Random random = new Random();\n for (int i = 0; i < itemLen; i++) {\n // random benefit: 1 ~ 10\n benefit[i] = random.nextInt(9) + 1;\n // random weight: 1 ~ 10\n weight[i] = random.nextInt(9) + 1;\n }\n for (int i = 0; i < knapsackLen; i++) {\n // random knapsack weight: 5 ~ 15\n knapsackWeight[i] = random.nextInt(10) + 5;\n }\n\n /*\n Print items and knapsacks\n */\n System.out.print(\"Items benefit:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(benefit[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Items weight:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(weight[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Knapsacks weight:\");\n for (int i = 0; i < knapsackLen; i++) {\n System.out.print(knapsackWeight[i] + \" \");\n }\n System.out.println();\n\n // neighborhood search\n neighborhoodSearch(benefit, weight, knapsackWeight);\n\n }", "public default List<Item> generateSolution(KnapsackData knapsackData, BinarySolution solution) {\r\n List<Item> pickedItem = new ArrayList<>();\r\n for (int i = 0; i < knapsackData.getSize(); i++) {\r\n if (solution.getBit(i) == 1) {\r\n pickedItem.add(knapsackData.getData(i));\r\n }\r\n }\r\n return pickedItem;\r\n }", "public double knapsack(double[] valuePass, double[] weightPass, double capacity) {\n\n if (valuePass.length == 0) { return 0; }\n value = valuePass;\n weight = weightPass;\n double[] subsets = new double[value.length];\n double takenValue = 0;\n double takenWeight = 0;\n double selection = 0;\n\n // look at each subset of the entire set\n for (int i = 0; i < Math.pow(2, value.length); i++) {\n\n /* INVARIANT: the value/weight values are greater than 0 */\n if (KnapsackMain.debug)\n assert assertionValueWeightGreaterThanZero(takenValue, takenWeight);\n\n // variables for the inner loop\n int itemToTake = value.length - 1;\n double temporaryValue = 0;\n double temporaryWeight = 0;\n\n // wh\n while (subsets[itemToTake] != 0 && itemToTake > 0) {\n subsets[itemToTake] = 0;\n itemToTake = itemToTake - 1;\n }\n\n subsets[itemToTake] = 1;\n\n for (int j = 0; j < value.length; j++) {\n\n // if the item is marked in the subset, then add it to the takenValue\n if (subsets[j] == 1 ) {\n temporaryValue = temporaryValue + value[j];\n temporaryWeight = temporaryWeight + weight[j];\n }\n }\n\n if (temporaryValue > takenValue && temporaryWeight <= capacity) {\n takenValue = temporaryValue;\n takenWeight = temporaryWeight;\n }\n }\n return takenValue;\n }", "int knapsack01(int[] v, int[] w, int capacity) {\n return knapsack01(v, w, capacity, 0, 0);\n }", "public static int zeroOneKnapsack(int[] weight, int[] value, int capacity) {\n\t\tint[][] dp = new int[weight.length + 1][capacity + 1];\n\n\t\tfor (int i = 0; i < weight.length + 1 ; i++) {\n\t\t\t for (int j = 0; j < capacity + 1; j++) {\n\t\t\t\t\n\t\t\t\t // base condition for memoization\n\t\t\t\t // first row and first column for 2d matrix is initialised to 0\n\t\t\t\t // profit = 0 when number of items = 0 or bag capacity = 0 \n\t\t\t\t if (i == 0 || j == 0) { \n\t\t\t\t\t dp[i][j] = 0;\n\t\t\t\t } \n\t\t\t\t \n\t\t\t\t // weight of item under consideration is less than capacity of bag\n\t\t\t\t // value of i in 2d matrix corresponds to (i-1)th element in weight and value arrays\n\t\t\t\t // hence, weight(i-1) is compared with the corresponding matrix cell capacity(i.e.column)\n\t\t\t\t \n\t\t\t\t else if (weight[i-1] <= j){\n\t\t\t\t\t \n\t\t\t\t\t // possibility 1: when item having weight(i-1) is added to bag\n\t\t\t\t\t // item having weight(i-1) has value(i-1)\n\t\t\t\t\t // this value added to array value for (i-1)th row and (j-weight[i-1])th column\n\t\t\t\t\t // because :\n\t\t\t\t\t // 1) the total capacity reduced by weight(i-1) after deciding item inclusion\n\t\t\t\t\t // 2) total no.of elements reduced by 1 after deciding item inclusion\n\t\t\t\t\t \n\t\t\t\t\t int a = value[i-1] + dp[i-1][j-weight[i-1]];\n\t\t\t\t\t \n\t\t\t\t\t// possibility 1: when item having weight(i-1) is not added to bag\n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t int b = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t\t // max of a and b taken to find maximum profit value \n\t\t\t\t\t dp[i][j] = Math.max(a, b);\t \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\t // weight of item under consideration is more than capacity of bag\n\t\t\t\t // hence item having weight(i-1) is not added to bag\n\t\t\t\t else {\n\t\t\t\t\t \n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t dp[i][j] = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dp[weight.length][capacity];\n\t\t\n\t}", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "private Pool setUpSkookumchuk() {\n final int skookumchukVolume = 1000;\n final int skookumchukTemperature = 42;\n final double skookumchukPH = 7.9;\n final double skookumchukNutrientCoefficient = 0.9;\n final int skookumchukNumberOfGuppies = 100;\n final int skookumchukMinAge = 10;\n final int skookumchukMaxAge = 25;\n final double skookumchukMinHealthCoefficient = 0.5;\n final double skookumchukMaxHealthCoefficient = 0.8;\n\n GuppySet skookumchukGuppies = new GuppySet(skookumchukNumberOfGuppies,\n skookumchukMinAge, skookumchukMaxAge,\n skookumchukMinHealthCoefficient,\n skookumchukMaxHealthCoefficient);\n\n Pool skookumchuk = setUpPool(\"Skookumchuk\", skookumchukVolume,\n skookumchukTemperature, skookumchukPH,\n skookumchukNutrientCoefficient, skookumchukGuppies);\n\n return skookumchuk;\n }", "private void initialize() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter number of items : \");\n\t\tn = sc.nextInt(); // number of items\n\t\tSystem.out.print(\"Enter W of knapsack : \");\n\t\tW = sc.nextInt(); // capacity of knapsack\n\t\tw = new int[n];\n\t\tv = new int[n];\n\t\tSystem.out.println(\"Enter ws and vs of items : \");\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tw[i] = sc.nextInt(); // weight of item\n\t\t\tv[i] = sc.nextInt(); // profit of item\n\t\t}\n\t\tV = new int[n + 1][W + 1]; // initializing the table to hold results\n\t\tfor (int i = 0; i <= W; i++)\n\t\t\tV[0][i] = 0;\n\t}", "protected abstract void solve(Items items,Knapsack knapsack);", "private static List<Integer> packDPInit(PackageDTO packageDTO) {\n // Declare the table dynamically\n Integer itemsSize = packageDTO.getItems().size();\n Integer capacityGrams = packageDTO.getCapacity() * GRAMS_IN_KILO;\n Integer mem[][] = new Integer[itemsSize + 1][capacityGrams + 1];\n\n //I need to re-instance my list as an Integer List to use The values on my memoization structure\n List<Integer> weights = new ArrayList<>();\n for(ItemDTO item : packageDTO.getItems()){\n Double weightGrams = item.getWeight() * GRAMS_IN_KILO;\n weights.add(weightGrams.intValue());\n }\n\n // Loop to initially filled the\n // table with -1\n for(int i = 0; i < itemsSize + 1; i++)\n for(int j = 0; j < capacityGrams + 1; j++)\n mem[i][j] = -1;\n\n List<Integer> optimalChoice = new ArrayList<>();\n packDPRec(capacityGrams, weights, packageDTO.getItems(), weights.size(), mem, optimalChoice);\n return optimalChoice;\n }", "public static void main(String[] args) {\n\t\tif (args.length != 0) {\n\t\t\tString msg = \"unexpected arguments; pass input on stdin\";\n\t\t\tthrow new IllegalArgumentException(msg);\n\t\t}\n\t\tint n = StdIn.readInt();\n\t\tint k = StdIn.readInt();\n\t\tint[] v = new int[n];\n\t\tint[] w = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tv[i] = StdIn.readInt();\n\t\t\tw[i] = StdIn.readInt();\n\t\t}\n\t\tKnapsack knapsack = new Knapsack(k, v, w);\n\t\tSystem.out.print(knapsack.classOut());\n\t}", "Item(Weight weight){\r\n\t\tthis(0, weight, new DukatAmount(0));\r\n\t}", "public BasketItemBuilder() {\n generateRandomId();\n }", "public static void knapsackDynamicProgramming(objects[] items, int capacity, int n) \r\n { \r\n\t\t//use bubble sort to sort item by their weight\t\t\t\t\r\n\t\tfor (int i = 0; i < n-1; i++) \t\t\t\t\r\n\t\t{ \t\t \r\n\t\t\tfor (int j = 0; j < (n-i-1); j++) \t\t \r\n\t\t\t{\t\t \r\n\t\t\t\tif (items[j].weight < items[j+1].weight) \t\t \r\n\t\t\t\t{ \t\t \t\r\n\t\t\t\t\tobjects temp = items[j]; \t\t \r\n\t\t\t\t\titems[j] = items[j+1]; \t\t \r\n\t\t\t\t\titems[j+1] = temp; \t\t \t\t\t\t\t\r\n\t\t\t\t}\t\t \r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n \tif(n <= 0 || capacity <= 0)\r\n \t{\r\n \t\tSystem.out.print(\"Error capacity and object numbers can't be 0\");\r\n \t}\r\n \r\n \tint matrixTable[][] = new int[n+1][capacity+1]; \r\n \r\n \tfor (int i = 0; i <= n; i++) \r\n \t{ \r\n \t\tfor (int j = 0; j <= capacity; j++) \r\n \t\t{ \r\n \t\t\t//Preset row 0 value and column value to 0\r\n \t\t\tif (i==0 || j==0) \r\n \t {\r\n \t\t\t\tmatrixTable[i][j] = 0; \r\n \t }\r\n \r\n \t\t\t//If current row number is greater than current weight number\r\n \t\t\telse if (items[i-1].weight <= j) \r\n \t\t\t{\r\n \t\t\t\t//Compare the top value with top value plus value(use weight as the value to go left)result\r\n \t\t\t\t//and use the greatest value for the current one.\r\n \t\t\t\tmatrixTable[i][j] = Math.max(items[i-1].profit + matrixTable[i-1][j-items[i-1].weight], matrixTable[i-1][j]); \r\n \t\t\t}\r\n \t\t\t//If row number is less than current weight number just use the top value\r\n \t\t\telse \r\n \t\t\t{ \t \r\n \t\t\t\tmatrixTable[i][j] = matrixTable[i-1][j];\r\n \t\t\t}\r\n \t\t} \t\r\n \t} \r\n \t\r\n\t\tint totalProfit = matrixTable[n][capacity]; \t\t\r\n\t\tint temp = matrixTable[n][capacity];\r\n\t\tint [] itemInKnapsack = new int [n];\r\n\t\t\r\n\t\t//solving which item is in the knapsack\r\n for (int i = n; i > 0 && temp > 0; i--) { \r\n \r\n \r\n \tif (temp == matrixTable[i - 1][capacity]) \r\n \t{\r\n continue;\r\n \t}\r\n \t//if the top value is different than it is include in the knapsack\r\n else \r\n { \r\n itemInKnapsack[i-1] = items[i-1].index; //Save item number\r\n temp = temp - items[i - 1].profit; \r\n capacity = capacity - items[i - 1].weight; \r\n } \r\n } \r\n \r\n printResult(itemInKnapsack, totalProfit, 2); //Call print result\r\n }", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public static int knapSackWithDP(int expectedWeight) {\n\t\tint N = values.length;\n\t\tint[][] dP = new int[N + 1][expectedWeight + 1];\n\t\tboolean[][] takeSoln = new boolean[N + 1][expectedWeight + 1];\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= expectedWeight; j++) {\n\t\t\t\tif (weights[i - 1] > j) {\n\t\t\t\t\tdP[i][j] = dP[i - 1][j];\n\t\t\t\t} else {\n\t\t\t\t\tint option1 = dP[i - 1][j], option2 = values[i - 1] + dP[i - 1][j - weights[i - 1]];\n\t\t\t\t\tdP[i][j] = Math.max(option2, option1);\n\t\t\t\t\ttakeSoln[i][j] = (option2 > option1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"Selected items are: \");\n\t\tint totalWt = 0, totalValue = 0;\n\t\tfor (int k = N, wt = expectedWeight; k > 0; k--) {\n\t\t\tif (takeSoln[k][wt]) {\n\t\t\t\ttotalWt += weights[k - 1];\n\t\t\t\ttotalValue += values[k - 1];\n\t\t\t\tSystem.out.printf(\"\tItem %d with weight %d and value %d\\n\", k, weights[k - 1], values[k - 1]);\n\t\t\t\twt -= weights[k - 1];\n\t\t\t}\n\t\t}\n\t\tSystem.out.printf(\"Calculated total weight= %d and total value= %d\\n\", totalWt, totalValue);\n\t\treturn dP[N][expectedWeight];\n\t}", "static int knapSack(int totalWeight, int wt[], int val[], int n) {\n\t\t// Base Case\n\t\tif (n == 0 || totalWeight == 0)\n\t\t\treturn 0;\n\n\t\t// If weight of the nth item is more than Knapsack capacity W, then\n\t\t// this item cannot be included in the optimal solution\n\t\tif (wt[n - 1] > totalWeight)\n\t\t\treturn knapSack(totalWeight, wt, val, n - 1);\n\n\t\t// Return the maximum of two cases:\n\t\t// (1) nth item included\n\t\t// (2) not included\n\t\telse\n\t\t\treturn max(\n\t\t\t\t\tval[n - 1]\n\t\t\t\t\t\t\t+ knapSack(totalWeight - wt[n - 1], wt, val, n - 1),\n\t\t\t\t\tknapSack(totalWeight, wt, val, n - 1));\n\t}", "public UnboundedKnapsack(int[] vol, int[] ben, int n, int V)\r\n {\r\n\r\n M = new int[n+1][V+1];\r\n objects = new int[n+1];\r\n Knapsack(vol, ben, n, V, this.M);\r\n ObjectsKnapsack(vol, this.M, n, V, this.objects);\r\n res = result(this.objects, vol, ben);\r\n }", "Items(double cost){\n\tthis.cost=cost;\n\titemId++;\n\tcurrentID=itemId;\n}", "public void setRandomItems(ArrayList<RandomItem> items);", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "public static Collection<Item> generateItems(int numberOfItems) {\n Random r = new Random(97);\n if (numberOfItems > 0) {\n Collection<Item> gameItems = new Stack<>();\n int power;\n for (int i = 0; i < numberOfItems; i++) {\n\n switch (ItemType.random()) {\n case HEALTH_POTION:\n power = (r.nextInt(3) + 1) * 100;\n gameItems.add(new HealthPotion(\"HealthPotion (\" + power + \")\", power));\n break;\n case POISON:\n power = (r.nextInt(8) + 1) * 20;\n gameItems.add(new Poison(\"Poison (\" + power + \")\", power));\n break;\n case ARMOR:\n power = (r.nextInt(6) + 1) * 10;\n gameItems.add(new Armor(\"Armor (\" + power + \")\", power));\n break;\n case WEAPON:\n power = (r.nextInt(7) + 1) * 10;\n gameItems.add(new Weapon(\"Weapon (\" + power + \")\", power));\n break;\n default:\n break;\n }\n }\n return gameItems;\n }\n return null;\n }", "public Items() {\n equipments = new ArrayList();\n\n SelectItemGroup first = new SelectItemGroup(\"braking\");\n SelectItemGroup second = new SelectItemGroup(\"equipment\");\n \n SelectItem[] array1 = {new SelectItem(\"abs\"), new SelectItem(\"esp\")}; \n SelectItem[] array2 = {new SelectItem(\"radio\"), new SelectItem(\"gps\"), new SelectItem(\"mobil set\")};\n \n first.setSelectItems(array1);\n second.setSelectItems(array2);\n \n equipments.add(first);\n equipments.add(second);\n }", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "private static void normal(){\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n\n //NSGAII algorithm = new NSGAII();\n SPEA2 algorithm = new SPEA2();\n //SPEAHADKA algorithm = new SPEAHADKA();\n //AEMMT algorithm = new AEMMT();\n //AEMMD algorithm = new AEMMD();\n //MOEAD algorithm = new MOEAD();\n\n int x =1;\n int counter = 0;\n\n if (AEMMD.class.isInstance(algorithm) || AEMMT.class.isInstance(algorithm)){\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n }\n else{\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n }\n\n while (counter < x) {\n algorithm.runAlgorithm(problem);\n counter++;\n }\n }", "static int knapsack(int W, int wt[], int val[], int n)\n\t{\n\t\t// base case\n\t\tif (n==0 || W==0)\n\t\t\treturn 0;\n\t\t\n\t\t// If weight of nth item is more than knapsack capacity W, then\n\t\t// this item cannot be included in optimal solution\n\t\tif (wt[n-1] > W)\n\t\t\treturn knapsack(W, wt, val, n-1);\n\t\t\n\t\t// return maximum of two cases\n\t\t// nth item included\n\t\t// not included\n\t\telse return max(val[n-1] + knapsack(W-wt[n-1],wt,val,n-1),\n\t\t\t\tknapsack(W,wt,val,n-1)\n\t\t\t\t);\n\t}", "public WeightedInventory(int weightLimit) {\n\t\tthis.weightLimit = weightLimit;\n\t\tthis.items = new LinkedList<>();\n\t}", "public ArrayList<RandomItem> getRandomItems();", "public void packBags() {\r\n GroceryBag[] packedBags = new GroceryBag[numItems];\r\n int bagCount = 0;\r\n\r\n GroceryBag currentBag = new GroceryBag();\r\n for (int i=0; i<numItems; i++) {\r\n GroceryItem item = (GroceryItem) cart[i];\r\n if (item.getWeight() <= GroceryBag.MAX_WEIGHT) {\r\n if (!currentBag.canHold(item)) {\r\n packedBags[bagCount++] = currentBag;\r\n currentBag = new GroceryBag();\r\n }\r\n currentBag.addItem(item);\r\n removeItem(item);\r\n i--;\r\n }\r\n }\r\n // Check this in case there were no bagged items\r\n if (currentBag.getWeight() > 0)\r\n packedBags[bagCount++] = currentBag;\r\n\r\n // Now create a new bag array which is just the right size\r\n pBags = new GroceryBag[bagCount];\r\n for (int i=0; i<bagCount; i++) {\r\n pBags[i] = packedBags[i];\r\n }\r\n\r\n // Add all grocery bags bag into cart\r\n for (int i = 0; i < bagCount; i++) {\r\n addItem(pBags[i]);\r\n }\r\n }", "public Solution solve(KnapsackData data);", "private void createItemsetsOfSize1() {\n itemsets = new ArrayList<>();\n for (int i = 0; i < numItems; i++) {\n String[] cand = {words.get(i)};\n itemsets.add(cand);\n }\n }", "PackageBuilder() {\n\t\tweightMap = new HashMap<>();\n\t\tcostMap = new HashMap<>();\n\t\tcombinations = new ArrayList<>();\n\t}", "public static void main(String[] args) {\n\t\tUnboundedKnapsack ks = new UnboundedKnapsack();\n\t\tint[] profits = { 15, 50, 60, 90 };\n\t\tint[] weights = { 1, 3, 4, 5 };\n\t\tint maxProfit = ks.solveKnapsack(profits, weights, 8);\n\t\tSystem.out.println(maxProfit);\n\n\t\tmaxProfit = ks.solveKnapsackUsingMemory(profits, weights, 8);\n\t\tSystem.out.println(maxProfit);\n\n\t}", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "static int knapSack(int W, int wt[], int val[], int n, List<Integer> incl, List<Integer> v) {\r\n\tList<Integer> v1 = new ArrayList<>();\r\n\tList<Integer> v2 = new ArrayList<>();\r\n\t// Base Case\r\n\tif (n == 0 || W == 0)\r\n\t return 0;\r\n\t// If weight of the nth item is more than Knapsack capacity W, then\r\n\t// this item cannot be included in the optimal solution\r\n\tif (wt[n - 1] > W) {\r\n\t return knapSack(W, wt, val, n - 1, incl, v1);\r\n\t}\r\n\r\n\t// Return the maximum of two cases:\r\n\t// (1) nth item included\r\n\t// (2) not included\r\n\telse {\r\n\t System.out.println(wt[n - 1]);\r\n\t v1.add(n - 1);\r\n\t int m = val[n - 1] + knapSack(W - wt[n - 1], wt, val, n - 1, incl, v1);\r\n\t int n1 = knapSack(W, wt, val, n - 1, incl, v2);\r\n\t if (Math.max(m, n1) == m) {\r\n\t\tv.addAll(v1);\r\n\t } else {\r\n\t\tv.addAll(v2);\r\n\t }\r\n\t return Math.max(m, n1);\r\n\t}\r\n }", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "public Bag(String name, int weightCapacity, int lowerFit, int upperFit) {\n\t\tthis.name = name;\n\t\tthis.weightCapacity = weightCapacity;\n\t\tthis.lowerFit = lowerFit;\n\t\tthis.upperFit = upperFit;\n\t}", "public Item() {\n\t\tthis(rand.nextDouble() * GameManager.NATIVE_WIDTH, -30.0, PowerUp[new Random().nextInt(PowerUp.length)]);\n\t}", "public Market(LegendsGame game) {\n\t\tthis.game = game;\n\t\t\n\t\tRandom r = new Random();\n\t\t\n\t\tr.nextInt(itemCap);\n\t\t\n\t\titems = new ArrayList<>();\n\t\t\n\t\tthis.addNumItems(r.nextInt(itemCap-1) + 1);\n\t\t\n\t}", "public void\tgetData() throws IOException{\n\t\tint i,j, val;\n\t\tint profitOfItems[], weight[];\n\t\t\n\t\tSystem.out.println(\"Enter the weight of the Knapsack ( must be positive):\");\n\t\tknapsackWeight = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tSystem.out.println(\"\\nEnter the number of items to put in knapsack ( must be positive):\");\n\t\tnumberOfItems = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tprofitOfItems = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter profit of item \" + String.valueOf(i));\n\t\t\tprofitOfItems[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tweight = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter weight of item \" + String.valueOf(i));\n\t\t\tweight[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tProfit = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\tDir\t = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\t\n\t\tfor ( j = 0 ; j <= knapsackWeight; j++) {\n\t\t\tProfit[0][j] = 0;\t\n\t\t}\t\n\t\tfor ( i = 0 ; i <= numberOfItems; i++) {\n\t\t\tProfit[i][0] = 0;\t\n\t\t}\n\t\tfor ( i = 1 ; i <= numberOfItems; i++) { \n\t\t\tfor ( j = 1 ; j <= knapsackWeight; j++) {\n\t\t\t\tif ( weight[i] > j) {\n\t\t\t\t\tProfit[i][j] = Profit[i-1][j];\n\t\t\t\t\tDir[i][j] = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tval = profitOfItems[i] + Profit[i-1][j - weight[i]];\n\t\t\t\t\tProfit[i][j] = Find_Max( Profit[i-1][j] , val); \n\t\t\t\t\tif ( Profit[i][j] == val)\n\t\t\t\t\t\tDir[i][j] = 2;\n\t\t\t\t\telse\n\t\t\t\t\t\tDir[i][j] = 1;\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Maximum profit that can fit in the knapsack is :\" + Profit[numberOfItems][knapsackWeight]);\n\t\tPrint_KnapsackItems(Dir,weight);\t\t\n\t}", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "static void knapsack(int problem, int i, int profit, int weight) {\r\n\t\tif(weight <= capacities.get(problem) && profit > maxProfit) {\r\n\t\t\tmaxProfit = profit;\r\n\t\t\tnumbest = i;\r\n\t\t\tfor(int j = 0; j < include.length; j++){\r\n\t\t\t\tbestset[j] = include[j];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(promising(problem, weight, profit, i)) {\r\n\t\t\tinclude[i+1] = \"yes\";\r\n\t\t\tknapsack(problem, i+1, profit + profits[i+1], weight + weights[i+1]);\r\n\t\t\tinclude[i+1] = \"no\";\r\n\t\t\tknapsack(problem, i+1, profit, weight);\r\n\t\t}\r\n\t}", "static int knapsack(int[] weight, int[] value, int n, int maxWeight) {\n int[][] dp = new int[n+1][maxWeight+1];\n for (int i=0;i<=n;i++) {\n for (int j =0;j<=maxWeight;j++) {\n dp[i][j] = -1;\n }\n }\n int ans= knapsack(weight,value,n,maxWeight,dp);\n return ans;\n\n }", "@Override\n protected void dropFewItems(boolean hit, int looting) {\n super.dropFewItems(hit, looting);\n if (hit && (this.rand.nextInt(3) == 0 || this.rand.nextInt(1 + looting) > 0)) {\n Item drop = null;\n switch (this.rand.nextInt(5)) {\n case 0:\n drop = Items.gunpowder;\n break;\n case 1:\n drop = Items.sugar;\n break;\n case 2:\n drop = Items.spider_eye;\n break;\n case 3:\n drop = Items.fermented_spider_eye;\n break;\n case 4:\n drop = Items.speckled_melon;\n break;\n }\n if (drop != null) {\n this.dropItem(drop, 1);\n }\n }\n }", "public Basket(Inventory inventory){\n myBasket = new HashMap<>();\n totalCost = 0;\n isPaid = false;\n Random randomGenerator = new Random();\n invoiceNumber = randomGenerator.nextInt(30000) + 1;\n this.inventory = inventory;\n }", "static void selectKItems(int stream[], int n, int k)\n {\n int i; // index for elements in stream[]\n\n // reservoir[] is the output array. Initialize it with\n // first k elements from stream[]\n int reservoir[] = new int[k];\n for (i = 0; i < k; i++)\n reservoir[i] = stream[i];\n Random r = new Random();\n // Iterate from the (k+1)th element to nth element\n for (; i < n; i++)\n {\n // Pick a random index from 0 to i.\n int j = r.nextInt(i + 1);\n\n // If the randomly picked index is smaller than k,\n // then replace the element present at the index\n // with new element from stream\n if(j < k)\n reservoir[j] = stream[i];\n }\n System.out.println(\"Following are k randomly selected items\");\n System.out.println(Arrays.toString(reservoir));\n }", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "public Adapter() {\n super();\n this.listItemsBT = new ArrayList<>();\n /*Random random = new Random();\n for(int i = 0; i<50;i++){\n listItemsBT.add(new ItemBT(\"El vic xd\" + i, \"10:12:... NUMBER: \"+i, random.nextBoolean()));\n }*/\n }", "public static Items initialVendingMachine() {\n Items items = new Items();\n Item cola = new Item(R.drawable.cola, \"Cola\", 30, 100, 3000, 0);\n Item chips = new Item(R.drawable.chips, \"Chips\", 30, 50, 3000, 0);\n Item candy = new Item(R.drawable.candy, \"Candy\", 30, 65, 3000, 0);\n items.addItem(cola);\n items.addItem(chips);\n items.addItem(candy);\n items.addMachineCredit(5000);\n return items;\n }", "public RandomizedQueue() {\n this.capacity = 2;\n this.numberOfItems = 0;\n\n this.queue = (Item[]) new Object[capacity];\n }", "static int knapsackDP(int weights[],int values[],int noOFitems,int capacityOfKnapsack){\n int dp[][] = new int[noOFitems+1][capacityOfKnapsack+1];\n\n for(int i=1;i<noOFitems+1;i++){\n for(int w=1;w<capacityOfKnapsack+1;w++){\n\n int inc = 0;\t\n if(weights[i] <= w){\n inc = values[i] + dp[i-1][w-weights[i]];\n }\n int exc = dp[i-1][w];\n dp[i][w] = Math.max(inc,exc);\n\n }\n }\n \n for (int i = 0; i < noOFitems+1; i++) {\n\t\t\tfor (int j = 0; j < capacityOfKnapsack+1; j++) {\n\t\t\t\tSystem.out.print(dp[i][j]+ \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n \n return dp[noOFitems][capacityOfKnapsack];\n\t}", "public Item sample() {\n\t\t\n\t\tif(isEmpty()) throw new NoSuchElementException();\n\t\t\n\t\tint index = StdRandom.uniform(N);\n\t\t\t\n\t\t\t/*while(items[index] == null) {\n\t\t\t\tindex = StdRandom.uniform(length());\n\t\t\t}*/\n\n\t\treturn items[index];\n\t}", "public Chromosome doExchangeMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.swap(newSelection, allele1, allele2);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public ItemCollection()\n\t{\n\t\t/*\n\t\t * master list of all consumable/miscellaneous items in the game\n\t\t * \n\t\t * to add a new item to the game, add the item to the itemCollections, and if it is a consumable,\n\t\t * add the effect to the useItem method in the switch statement. If it has no effect, don't add anything.\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE\n\t\t */\n\t\t\n\t\t//CONSUMABLES\n\t\titemCollections.add(new Item(\"Polar Pop\", 1, \"Do you ever drink water?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Klondike Bar\", 20, \"What would you do for this?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Big tiddy goth GF\", 666, \"Vore.\", \"Consumable\"));\n\t\t\n\t\t//MISC, i.e. NO STATUS EFFECT\n\t\titemCollections.add(new Item(\"Sippy Cup\", 9, \"Somebody otta get their child their sippy cup back.\", \"Misc\"));\n\t\t\n\t\t/*\n\t\t * master list of equipment items in the game\n\t\t * \n\t\t * same as above\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE, DAMAGE, DEFENSE, VITALITY, INTELLIGENCE, STRENGTH, WISDOM\n\t\t */\n\t\t\n\t\t//2H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"A Big Boy's Sword\", 69, \"A two- handed sword for a big boy like you... You're growing up so fast!\", \"2H-Weapon\", 10, 0, 0, 0, 0, 0));\n\t\t\n\t\t//1H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"Red Copper Pan\", 300, \"Hey there mothafuckas it's ya girl cathy, I got some brand new shit\", \"1H-Weapon\", 250, 0, 25, 3, 25, 3));\n\t\t\n\t\t//HEAD\n\t\tequipmentCollections.add(new Equipment(\"Broken Helmet\", 1, \"Leather helmet broken from thousands of years of war and abuse\", \"Head\", 0, 3, 0, 0, 0, 0));\n\t\t\n\t\t//TORSO\n\t\tequipmentCollections.add(new Equipment(\"Bloodied Tunic\", 1, \"Tunic covered in your own blood, you can see your wounds through its holes\", \"Torso\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//ARMS\n\t\tequipmentCollections.add(new Equipment(\"Torn Gloves\", 1, \"Gloves so torn they hardly protect your hands\", \"Arms\", 0, 1, 0, 0, 0, 0));\n\t\t\n\t\t//LEGS\n\t\tequipmentCollections.add(new Equipment(\"Muddy Pants\", 1, \"Cloth pants soiled in mud\", \"Legs\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//FEET\n\t\tequipmentCollections.add(new Equipment(\"Worn Boot\", 1, \"A boot with a hole in it, but where is the other one?\", \"Feet\", 0, 1, 0, 0, 0, 0));\n\t}", "public List<Integer> pickRandom(int n, int k) {\n\t\tList<Integer> wynik = new ArrayList<Integer>();\n\t Random random = new Random();\n\t Set<Integer> picked = new HashSet<>();\n\t while(picked.size() < n) {\n\t \tint sizeNaPoczatku = picked.size();\n\t \tint znaleziona = random.nextInt(k);\n\t picked.add(znaleziona);\n\t int sizeNaKoncu = picked.size();\n\t if(sizeNaPoczatku != sizeNaKoncu) {\n\t \twynik.add(znaleziona);\n\t }\n\t }\n\t return wynik;\n\t}", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "public static void main(String[] args) {\n\n int count = 0;\n int randomNo;\n int numberOfNoItemSelected;\n double oneOrderPrice = 0;\n double totalOrderPrice = 0;\n\n\n ArrayList<String> selectedIteams = new ArrayList<>();\n\n int whiteRice = 0, brownRice = 0, chicken = 0, steak = 0, carnidas = 0, chorizo = 0, sofritas = 0, veggieMeat = 0,\n pintoBeans = 0, blackBeans = 0, mildSauce = 0, mediumSauce = 0, hotSouce = 0, lettuce = 0, fajitaVeggies = 0,\n cheesein = 0, guacumole = 0, quesoin = 0, sourCreamin = 0;\n String [] arraySentence;\n\n String sentence,randomRice, randomMeat, randomBean, randomSalsa, randomVeggies, randomCheese,\n randomGuac, randomQueso, randomSourCream;\n\n\n \n String rice [] ={\"White-rice\", \"Brown-rice\", \"no-rice\", \"All-rice\"};\n String meat[] = {\"Chicken\", \"Steak\", \"Carnidas\", \"Chorizo\", \"Sofritas\", \"Veggie-Meat\", \"no-meat\", \"All-meat\"};\n String beans[] = {\"Pinto-beans\", \"Black-beans\", \"no-bean\", \"All-beans\"};\n String salsa[] = {\"Mild-sauce\", \"Medium-sauce\", \"Hot-sauce\", \"no-salsa\", \"All-salsa\"};\n String veggies[] = {\"Lettuce\", \"Fajita-Veggies\", \"no-veggies\", \"All-veggies\"};\n String cheese[] = {\"Cheese\", \"no-cheese\"};\n String guac[] = {\"Guacumole\", \"no-guac\"};\n String queso[] = {\"Queso\", \"no-queso\"};\n String sourCream[] = {\"Sour-Cream\", \"no-sour-cream\"};\n\n Random run = new Random();\n //Scanner in = new Scanner(System.in);\n\n System.out.println(\"List of 25 burrito combination.\");\n while (count < 25) {\n\n count++;\n numberOfNoItemSelected = 0;\n oneOrderPrice = 3;\n\n randomNo = run.nextInt(9); // generate random number 0 - 8\n\n randomRice = checkIndex(randomNo, rice); // store the item selected using the random number\n selectedIteams.add(randomRice);\n numberOfNoItemSelected = countNoItemSelected(randomRice, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomRice, oneOrderPrice); // calculate the total price based on the item selected.\n\n\n randomMeat = checkIndex(randomNo, meat);\n selectedIteams.add(randomMeat);\n numberOfNoItemSelected = countNoItemSelected(randomMeat, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomMeat, oneOrderPrice);\n\n\n randomBean = checkIndex(randomNo, beans);\n selectedIteams.add(randomBean);\n numberOfNoItemSelected = countNoItemSelected(randomBean, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomBean, oneOrderPrice);\n\n\n randomSalsa = checkIndex(randomNo, salsa);\n selectedIteams.add(randomSalsa);\n numberOfNoItemSelected = countNoItemSelected(randomSalsa, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomSalsa, oneOrderPrice);\n\n\n randomVeggies = checkIndex(randomNo, veggies);\n selectedIteams.add(randomVeggies);\n numberOfNoItemSelected = countNoItemSelected(randomVeggies, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomVeggies, oneOrderPrice);\n\n\n randomCheese = checkIndex(randomNo, cheese);\n selectedIteams.add(randomCheese);\n numberOfNoItemSelected = countNoItemSelected(randomCheese, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomCheese, oneOrderPrice);\n\n\n randomGuac = checkIndex(randomNo, guac);\n selectedIteams.add(randomGuac);\n numberOfNoItemSelected = countNoItemSelected(randomGuac, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomGuac, oneOrderPrice);\n\n\n randomQueso = checkIndex(randomNo, queso);\n selectedIteams.add(randomQueso);\n numberOfNoItemSelected = countNoItemSelected(randomQueso, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomQueso, oneOrderPrice);\n\n\n randomSourCream = checkIndex(randomNo, sourCream);\n selectedIteams.add(randomSourCream);\n numberOfNoItemSelected = countNoItemSelected(randomSourCream, numberOfNoItemSelected);\n oneOrderPrice = priceCalculator(randomSourCream, oneOrderPrice);\n\n if (numberOfNoItemSelected < 5) {\n // print all selected item from the arrays and the total price\n System.out.println(\"Burrito \" + count + \":\" + randomRice + \" \" + randomMeat + \" \" +\n randomBean + \" \" + randomSalsa + \" \" + randomVeggies + \" \" + randomCheese +\n \" \" + randomGuac + \" \" + randomQueso + \" \" + randomSourCream);\n\n System.out.println(\"$\" + oneOrderPrice);\n\n totalOrderPrice += oneOrderPrice;\n } else {\n count--;\n }\n }\n\n // count each selected ingredients.\n for (int i = 0; i < selectedIteams.size(); i++) {\n if (selectedIteams.get(i).equalsIgnoreCase(\"White-rice\")) {\n whiteRice++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Brown-rice\")) {\n brownRice++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Chicken\")) {\n chicken++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Steak\")) {\n steak++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Carnidas\")) {\n carnidas++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Chorizo\")) {\n chorizo++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Sofritas\")) {\n sofritas++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Veggie-Meat\")) {\n veggieMeat++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Pinto-beans\")) {\n pintoBeans++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Black-beans\")) {\n blackBeans++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Mild-sauce\")) {\n mildSauce++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Medium-sauce\")) {\n mediumSauce++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Hot-sauce\")) {\n hotSouce++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Lettuce\")) {\n lettuce++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Fajita-Veggies\")) {\n fajitaVeggies++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Cheese\")) {\n cheesein++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Guacumole\")) {\n guacumole++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Queso\")) {\n quesoin++;\n } else if (selectedIteams.get(i).equalsIgnoreCase(\"Sour-Cream\")) {\n sourCreamin++;\n }\n }\n\n sentence = \"This order has \" + whiteRice + \" white rice, \" + brownRice + \" brown rice, \" + chicken +\n \" chicken, \" + steak + \" steak, \" + carnidas + \" carnitas, \" + chorizo + \" chorizo, \" + sofritas + \" sofritas, \" +\n veggieMeat + \" veggies(as meat option), \" + blackBeans + \" black beans,\" + pintoBeans + \" pinto beans, \"\n + mildSauce + \" mild salsa, \" + mediumSauce + \" med salsa,\" + hotSouce + \" hot salsa, \" + fajitaVeggies +\n \" fajitas, \" + lettuce + \" lettuce, \" + cheesein + \" cheese, \" + guacumole + \" guac, \" + quesoin + \" queso, \" +\n sourCreamin + \" sour cream and total price is $\" + totalOrderPrice;\n arraySentence = sentence.split(\" \");\n count = 0;\n for (int i = 0; i < arraySentence.length; i++) {\n if(count > 50){\n count = 0;\n System.out.println();\n }\n count += arraySentence[i].length();\n System.out.print(arraySentence[i] + \" \");\n }\n\n }", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public Chromosome doInversionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.reverse(newSelection.subList(Math.min(allele1, allele2), Math.max(allele1, allele2)));\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "private static long calculateBestPickWithoutRepetition(int weight, Item[] items, long[][] DP) {\n\n for(int w = 1; w <= weight; w++) {\n for(int i = 1; i <= items.length; i++) {\n DP[w][i] = DP[w][i-1];\n Item item = items[i-1];\n\n if (item.getWeight() <= w) {\n DP[w][i] = Math.max(DP[w][i], DP[w - item.getWeight() ][i-1] + item.getValue());\n }\n }\n }\n\n return DP[DP.length -1][DP[0].length - 1];\n }", "public static void main(String args[]) {\r\n\tList<Integer> list = new ArrayList<>();\r\n\tint id[] = new int[] { 38, 21, 13, 15 };\r\n\tint val[] = new int[] { 500, 1800, 1500, 50 };\r\n\tint wt[] = new int[] { 130, 280, 120, 50 };\r\n\tint W = 300;\r\n\tint n = val.length;\r\n\tSystem.out.println(knapSack(W, wt, val, n, list, list));\r\n\tSystem.out.println(Arrays.toString(list.toArray()));\r\n }", "public Population(int size, ArrayList<Individual> KIS){\n this.size = size;\n this.individuals = KIS;\n }", "public RandomizedQueue() {\n \t\titems = new Object[MIN_COUNT];\n \t\tsize = 0;\n \t}", "public Item sample(){\n if(size == 0){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Iterator<Item> it = this.iterator();\n \n for(int i = 0; i < ri; i++){\n it.next();\n }\n \n return it.next();\n }", "public RandomizedSet() {\r\n\t\tbucket = new BucketItem[BUCKET_SIZE];\r\n\t}", "@Test\n\tpublic void when_provided_maximum_size_list_with_all_elements_that_can_be_added_then_return_sum_in_allowable_amount_of_time() {\n\t\tfinal int[] elements = Fixture.initializeRandomList(MAX_NUM_ELEMENTS, MIN_ELEMENT_SIZE, 5);\n\t\tfinal int elementSum = IntStream.of(elements).sum();\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal int result = Knapsack.getOptimalWeight(elementSum, elements);\n\n\t\tassertThat(result, is(elementSum));\n\t\tassertThat(System.currentTimeMillis() - startTime < Fixture.MAX_ALLOWABLE_CALCULATION_TIME, is(true));\n\t}", "public Item sample() {\n \t\tif (size == 0) {\n \t\t\tthrow new NoSuchElementException();\n \t\t}\n \t\treturn (Item) items[StdRandom.uniform(size)];\n \t}", "@Override\r\n public Collection<Item> roll() {\r\n Collection<Item> dropItems = new ArrayList();\r\n \r\n for (LootTableItem item : this.items) {\r\n if (random.nextDouble() <= 1 / item.getChance()) {\r\n dropItems.add(item.create());\r\n }\r\n if (dropItems.size() == amount) break;\r\n }\r\n \r\n return dropItems;\r\n }", "public ArrayList<Item> drop()\n {\n ArrayList<Item> drop = new ArrayList<>();\n for( Pair<Enums.ItemName, Integer> possibleDrop : dropTable)\n {\n if(ThreadLocalRandom.current().nextInt(100) < possibleDrop.getY())\n drop.add(new Item(possibleDrop.getX()));\n }\n return drop;\n }", "IEquipableItem create(int power, int min, int max);", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "static int zeroOneKnapsack(int []val,int [] wt,int W){\n// initialize\n int[][] dp = new int[val.length+1][W+1];\n\n int n = val.length;\n for (int i = 0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i = 1;i<=n;i++){\n for(int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(val[i-1] + dp[i-1][j - wt[i-1]], dp[i-1][j]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "public Recipes()\n {\n\t\titems = new ArrayList<food>();\n }", "private static <Item extends Comparable> Item getRandomB(List<Item> items) {\n int pivotIndex = (int) (Math.random() * items.size());\n Item pivot = null;\n // Walk through the queue to find the item at the given index.\n for (Item item : items) {\n if (pivotIndex == 0) {\n pivot = item;\n break;\n }\n pivotIndex--;\n }\n return pivot;\n }", "public RandomizedQueue() {\n size = 0;\n items = (Item[]) new Object[1];\n }", "public static int knapsack(int[] weights, int[] values, int n, int maxWeight) {\n return knapSack(maxWeight, weights, values, n);\r\n }", "Item(long ID, DukatAmount price){\r\n\t\tthis(ID, new Weight(5), price);\r\n\t}", "private void setWinningTuples() {\n\t\tWINS = new ArrayList<Set<CMNMove>>();\n\t\tSet<CMNMove> winSet = new TreeSet<CMNMove>();\n\t\tfor (int i = MM; i > 0; i--) {\n\t\t\tknapsack(winSet, CC, i, NN);\n\t\t}// end for\n\n\t}", "static ArrayList<Integer> generateQuestion(ArrayList<Integer> remainingSongsIds)\n {\n //shuffle the ids\n Collections.shuffle(remainingSongsIds);\n\n ArrayList<Integer> options = new ArrayList<>();\n\n //pick the random first fours sample ids\n for(int i=0;i<NUM_OPTIONS;i++)\n {\n if(i<remainingSongsIds.size())\n {\n options.add(remainingSongsIds.get(i));\n }\n }\n return options;\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public RandomizedQueue(){\n itemCount = 0;\n array = (Item[]) new Object[8]; // initial size of 8 just to not keep resizing in the early stages\n }", "public static void main(String[] args) {\n Scanner keyboard = new Scanner(System.in);\n//Create an object of the Bag class refer to this object as myBag\n Bag myBag = new Bag();\n//declare a variable called option of type int\n int option;\n//Open a do/while loop\n do {\n//Prompt the user to pick one of the following options:\n//Press 1 to change the name of the bag\n//Press 2 to add an item to the bag\n//Press 3 to change the maximum weight of the bag\n//Press 4 to view all information about the bag\n//Press 5 to end the program\n System.out.println(\"Pick an option. \" +\n \"\\nPress 1 to change the name of the bag. \" +\n \"\\nPress 2 to add an item to the bag. \" +\n \"\\nPress 3 to change the maximum weight of the bag. \" +\n \"\\nPress 4 to view all information about the bag. \" +\n \"\\nPress 5 to end the program.\");\n//Save the user’s input into the option variable\n option = keyboard.nextInt();\n keyboard.nextLine();\n//if the user picks option 1, prompt the user for the name of the bag\n//then save the name of the bag in a variable called newName\n//change the name of the bag to newName\n if (option == 1) {\n System.out.println(\"What should the name of the bag be?\");\n String newName = keyboard.nextLine();\n myBag.setName(newName);\n//else if the user picks option 2, prompt the user for the weight\n//of the item and then save the weight of the item in a variable\n//called newWeight\n//add the new item to the bag\n }else if (option == 2) {\n System.out.println(\"What is the weight of the item?\");\n double newWeight = keyboard.nextDouble();\n myBag.addItem(newWeight);\n//else if the user picks option 3, prompt the user for the new maximum\n//weight of the bag and save the new maximum weight in a variable\n//called newMaximumWeight\n//change the maximum weight of the bag to newMaximumWeight\n }else if (option == 3) {\n System.out.println(\"What should the new maximum weight of the bag be?\");\n double newMaximumWeight = keyboard.nextDouble();\n myBag.setMaximumWeight(newMaximumWeight);\n//else if the user picks option 4, display to the screen the name of\n//the bag, the current weight of the bag, and the maximum weight\n//of the bag\n }else if (option == 4) {\n System.out.println(\"The name of your bag is: \" + myBag.getName() + \"\\nThe current weight is: \" + myBag.getCurrentWeight() + \"\\nThe maximum weight is: \" + myBag.getMaximumWeight());\n//else if the user picks option 5, display Goodbye.\n }else if (option == 5) {\n//else if the user picks any other option, display Error!\n }else {\n System.out.println(\"Error!\");\n }\n//close the do/while loop and make it so that it continues to run as\n//long as the user does not pick option 5\n } while (option !=5 );\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "public Chromosome doInsertionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n boolean value = newSelection.get(allele2);\n\n newSelection.remove(allele2);\n try{\n newSelection.add(allele1 + 1, value);\n }\n catch(IndexOutOfBoundsException e){\n newSelection.add(value);\n }\n \n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public Bag getGreedyBag() {\r\n bag = super.getBag();\r\n List<Integer> auxiliarHand = new LinkedList<Integer>(hand);\r\n\r\n for (int i = 0; i < bag.getCardsIds().size(); i++) {\r\n if (auxiliarHand.contains(bag.getCardsIds().get(i))) {\r\n auxiliarHand.remove(bag.getCardsIds().get(i));\r\n }\r\n }\r\n\r\n if (this.roundNumber % 2 == 0) {\r\n highestProfitIllegalCard = 0;\r\n if (bag.getCards().size() < MAX_CARDS_IN_BAG) {\r\n for (Integer cardId : auxiliarHand) {\r\n if (cardId > MAX_LEGAL_INDEX\r\n && goodsFactory.getGoodsById(cardId).getProfit()\r\n > goodsFactory.getGoodsById(highestProfitIllegalCard).getProfit()) {\r\n highestProfitIllegalCard = cardId;\r\n }\r\n }\r\n if (highestProfitIllegalCard != 0\r\n && (coins - goodsFactory\r\n .getGoodsById(highestProfitIllegalCard)\r\n .getPenalty()) > 0) {\r\n bag.addCard(goodsFactory.getGoodsById(highestProfitIllegalCard));\r\n }\r\n }\r\n }\r\n return bag;\r\n }", "public Item sample() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn queue[StdRandom.uniform(0,n)];\r\n\t\t}\r\n\t}", "public RandomizedSet() {\n // public RandomizedSet1() {\n lst = new ArrayList<>();\n rand = new Random();\n map = new HashMap<>();\n }", "@Override\n public int quantityDroppedWithBonus(int par1, Random par2Random)\n {\n return 1 + par2Random.nextInt(par1 * 2 + 1);\n }" ]
[ "0.6405514", "0.6043645", "0.60018057", "0.59579", "0.59561545", "0.5945824", "0.59172046", "0.5912261", "0.59023273", "0.5892986", "0.5819335", "0.57936543", "0.57679087", "0.57325804", "0.5721424", "0.57157755", "0.5701943", "0.5648689", "0.5611792", "0.56088376", "0.56018203", "0.5568221", "0.55655205", "0.5561622", "0.5552248", "0.5539808", "0.54615396", "0.545932", "0.54504496", "0.54467344", "0.54467344", "0.5442816", "0.5436598", "0.543546", "0.5420319", "0.5417497", "0.5409565", "0.5391688", "0.5364536", "0.53558075", "0.53490746", "0.53454334", "0.53161734", "0.52900374", "0.52808005", "0.52316993", "0.52304834", "0.5222795", "0.52191323", "0.52143127", "0.51878756", "0.5173992", "0.5171806", "0.51607823", "0.5159163", "0.5151562", "0.51411945", "0.5140962", "0.5140479", "0.5138155", "0.5133918", "0.51305026", "0.5129652", "0.512815", "0.51081795", "0.5097294", "0.5093933", "0.5057677", "0.50458246", "0.5042876", "0.5032583", "0.50285596", "0.5024106", "0.50200427", "0.50189835", "0.5018955", "0.5012864", "0.5011842", "0.5002703", "0.49918973", "0.4991788", "0.49879995", "0.49871975", "0.49818784", "0.49703732", "0.49702793", "0.4958855", "0.49571583", "0.49566835", "0.49564698", "0.4955089", "0.4952786", "0.4951653", "0.4949948", "0.4948726", "0.4946306", "0.49430427", "0.49397138", "0.49387667", "0.4932932" ]
0.776219
0
For chaining with constructor to include a fitness calculation.
public Chromosome withFitnessCalculated() { this.fitness = calculateFitness(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fitnessFunction()\n\t{\n\t\t\n\t}", "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "protected float getFitness()\t\t\t{\treturn fitness;\t\t}", "public int getFitness(){\n return fitness;\n }", "public GAIndividual()\n {\n m_fitness = 0;\n m_genome = new ArrayList<Integer>();\n }", "public void setFitness(float fitness)\r\n\t{\r\n\t\tthis.fitness = fitness;\r\n\t}", "void setFitness(double fitness) throws UnsupportedOperationException;", "public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}", "public Genetic() {\r\n }", "public abstract double evaluateFitness();", "public abstract double getAestheticFitness();", "public abstract double getFitness(Genotype genotype);", "public void setFitness(int f){\n this.fitness = f;\n }", "public int getFitness()\n {\n return this.fitness;\n }", "public GeneticEngine() {\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n population = null;\n crossoverProbability = 0.07;\n mutationProbability = 0.001;\n maxGenerations = Integer.MAX_VALUE;\n }", "private Fitness getFitnessObject() throws Exception{\n String fitnessClassname = \"\";\n try {\n fitnessClassname = getStringProperty(ParameterList.FITNESS_FUNCTION, false).replaceAll(\"\\\\s\", \"\");\n Class<?> fitnessClass = Class.forName(fitnessClassname);\n return (Fitness)fitnessClass.newInstance();\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the fitness function. Class \" + fitnessClassname + \" not found\", e);\n } \n }", "protected FitnessAssignmentProcess() {\r\n super();\r\n }", "public Particle(FitnessFunction fitnessFunc){\n rnd = new Random();\n position = new double[2];\n position[0] = rnd.nextDouble()*(upperp - lowerp) + lowerp;\n position[1] = rnd.nextDouble()*(upperp - lowerp) + lowerp;\n pbest = position;\n v = new double[2];\n v[0] = rnd.nextDouble()*(upperv - lowerv) + lowerv;\n v[1] = rnd.nextDouble()*(upperv - lowerv) + lowerv;\n this.fitnessFunction = fitnessFunc;\n }", "@Override\n\tpublic double valuta_figli() {\n\t\treturn simple_fitness();\n\t}", "public interface GAIndividual\r\n{\r\n public void mutate(double rate);\r\n public GAIndividual directReproduce();\r\n public GAIndividual reproduce( GAIndividual i );\r\n \r\n public int getFitness();\r\n public void setFitness ( int fitness );\r\n public void setRoulette (int start, int finish);\r\n public boolean hasRouletteNumber (int winner);\r\n public String toString();\r\n}", "double getFitnessScore(){\n return fitnessScore;\n }", "void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }", "public Guppy() {\n this(DEFAULT_GENUS, DEFAULT_SPECIES, 0, true, 0,\n DEFAULT_HEALTH_COEFFICIENT);\n }", "public int fitness() {\n\t\t//System.out.println(\"/!\\\\ WARNING: Full fitness() called!\");\n\t\tint fitness = 0;\n\t\tint fitnessCases = (int) Math.pow(2, circuit.order);\n\t\tfor (int i=0; i<fitnessCases; i++) {\n\t\t\tValuation v = new Valuation(i, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = null;\n\t\t\n\t\treturn fitness;\n\t}", "public void incrementFitness()\n {\n this.fitness++;\n }", "public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\r\n fit+=distancias[this.genotipo[x]][this.genotipo[x+1]];\r\n }else{\r\n fit+=distancias[this.genotipo[x]][this.genotipo[0]];\r\n }\r\n }\r\n this.fitness = fit;\r\n }", "public Heuristic() {\n this(HeuristicUtils.defaultValues);\n }", "public double getFitness(){\n return averageFitness;\n }", "protected Individual(float[] _genes)\n\t\t{\tgenes = _genes;\n\t\t\tcreateMe();\n\t\t\twait = 0;\n\t\t\tmove = 0;\n\t\t}", "public FireflyOptimization(){\n this(25, 1000);\n }", "public abstract double getConstraintFitness();", "private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}", "public Gene(double value){\n\t\tthis(value, -1, 1, 1);\n\t}", "public void setFitness(int fit)\n {\n this.fitness=fit;\n }", "void setFitnessScore(double score){\n fitnessScore = score;\n }", "public double getFitness() {\n if (fitness == 0) {\n fitness = 1/(double)getDistance();\n }\n return fitness;\n }", "public interface Population {\n public List<Individual> selectRandomIndividuals(int n, boolean withReplacement);\n\n public void evaluateFitnesses();\n\n public Individual crossoverOnePoint(Individual a, Individual b);\n\n public Individual crossoverTwoPoint(Individual a, Individual b);\n\n public Individual crossoverUniform(Individual a, Individual b);\n\n public void evolveMuLambda(int numParents, int numChildren, double mean, double variance);\n\n public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double mutationRate);\n\n public void evolveGeneticAlgorithm();\n\n public void saveIndividualsAsPlayersInDb();\n\n public void addListener(EvolutionCompleteListener listener);\n\n}", "public Candidate(ContestEvaluation evaluation, int generation, player20 p) {\r\n\t\tevaluation_ = evaluation;\r\n\t\tgeneration_ = generation;\r\n\t\tparameters_ = new double[dimensions_];\r\n\t\tstDevs_ = new double[dimensions_];\r\n\t\trnd_ = new Random();\r\n\t\trnd_.setSeed(System.nanoTime());\r\n\t\tfor (int index = 0; index < dimensions_; index++) {\r\n\t\t\tparameters_[index] = rangeMin_\r\n\t\t\t\t\t+ ((rangeMax_ - rangeMin_) * rnd_.nextDouble());\r\n\t\t\tstDevs_[index] = 1;\r\n\t\t}\r\n\t\tfitness_ = (Double) evaluation_.evaluate(parameters_);\r\n\t\tp.evals_++;\r\n\t}", "public void setFitness(double fit) {\n fitness = fit;\n }", "public void setFitness(int newFitness) {\n fitness = newFitness;\n }", "public FireflyOptimization(int population, int generations){\n this(population, generations, 0.2, 2, 1);\n }", "protected void setFitness(float fit)\t{\tfitness = fit;\t\t}", "public Gov() {\n }", "public FVectorGene() {\n\t\t\n\t}", "public Population(ArrayList<Chromosome> c, int selMethod, int selPara, \r\n\t\t int crossMethod, double crossPara, int mutMethod,\r\n\t\t double mutPara, int replaceMethod, int replacePara,\r\n\t\t double powerStep, double tourStep, FitnessFunction fitnessFunction)\r\n {\r\n\tthis(selMethod, selPara, crossMethod, crossPara, mutMethod, mutPara, \r\n\t replaceMethod, replacePara, powerStep, tourStep, fitnessFunction);\r\n\r\n\tchromos = c;\r\n\r\n\tinitialize();\r\n }", "private Double fitness(Term $f) {\n\t\t// Using a lambda to transform a formula to a function.\n\t\tFx g = x -> {this.x=x; return (Double)$abs.apply($sub.apply($f,$target)).evaluate();};\n\t\treturn integral(LOWER_BOUND, UPPER_BOUND, Fx.$f.bind(g));\n\t}", "protected Gene newGeneInternal() {\n try {\n \tFloatGene result = new FloatGene(getConfiguration(), m_lowerBound,\n m_upperBound);\n return result;\n }\n catch (InvalidConfigurationException iex) {\n throw new IllegalStateException(iex.getMessage());\n }\n }", "void ComputeFitness(){\n\t\tint i, pos;\n\t\t// individual t;\n\t\tdouble min, sum = 0, sumSize = 0, tm;\n\t\t// First Compute Raw fitness\n\t\tfor(i = 0; i < poplen; i++)\n\t\t{\n\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t}\n\t\t\t\n\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t}\n\t\t//tim individual co fitness be nhat\n\t\tmin = oldpop[0].fitness;\n\t\tpos = 0;\n\t\tsum = oldpop[0].fitness;\n\t\tsumSize = oldpop[0].size;\n\t\t\n\t\tfor(i = 1; i < poplen; i++) {\n\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\tmin = oldpop[i].fitness;\n\t\t\t\tpos = i;\n\t\t\t}\n\t\t\tsum += oldpop[i].fitness;\n\t\t\tsumSize += oldpop[i].size;\n//\t\t\tpopSize[gen][i]= oldpop[i].size;\n\t\t}\n\t\t// copy the best and average\n\t\tbestcurrent[gen] = new individual();\n\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n\t\taverage[gen] = sum /poplen;\n\t\taverageSize[gen] = sumSize /poplen;\n\t\t// Third Compute Adjusted fitness\n\t\tAdjustFitness();\n\t\t// Finally Compute nomarlized fitness\n \t\tNormalizeFitness();\n\t}", "private static double fitness(PMCGenotype gene, int trials)\n\t{\n\t\tController<MOVE> btc = new PacManBTController(decode(gene));\n\t\treturn runExperiment(btc, ghostController, trials);\n\t}", "public FitRealFunction() {\t\t\r\n\t}", "public double calculateFitness(DNA dna);", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "public interface NeatFitness {\n\n\tpublic double calculate(Network network);\n\t\n}", "public Object eval(Individual ind)\r\n {\r\n BinaryIndividual bi = (BinaryIndividual)ind;\r\n int partialFitness = 0;\r\n int distance = 0;\r\n double fitness = 0.0;\r\n\r\n\t for (int i=0; i<100; i++){\r\n\r\n\t distance = 0;\r\n\r\n\t for (int j=0; j<100; j++){\r\n\t if (!((BinaryIndividual)target[i]).getBooleanAllele(j)^bi.getBooleanAllele(j)) { \r\n\t\t distance++;\r\n\t }\r\n \r\n\t if (distance > partialFitness) {\r\n\t partialFitness = distance;\r\n\t }\r\n\t }\r\n }\r\n\r\n fitness = (double)partialFitness/100.0;\r\n return new Double(fitness);\r\n \r\n\r\n }", "public Population (Coordinate location){\n this.location = location;\n }", "public double bestFitness()\r\n {\r\n\treturn bestFitness;\r\n }", "String getFitnessFunction();", "public Population(Graph graph)\r\n/* 13: */ {\r\n/* 14:36 */ g = graph.cloneGraph();\r\n/* 15: */ }", "public GeneticEngine(int popSize, double crossoverRate,\n double mutationRate, int maxGen, int chromosomeLength) {\n\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n populationSize = popSize;\n crossoverProbability = crossoverRate;\n mutationProbability = mutationRate;\n maxGenerations = maxGen;\n chromosomeSize = chromosomeLength;\n initializePopulation();\n }", "public interface Population {\n\n /**\n * Add the specified chromosome to the population.\n * If the size of the population has reached to maxSize, eviction is done\n * removing chromosomes with the worst fitness\n * @param chromosome\n */\n void addChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return a random chromosome\n * @return\n */\n Chromosome getRandom();\n\n\n /**\n * Return a random chromosome among the first limit fittest chromosomes\n * @param limit Nth fittest chromosome\n * @return\n */\n Chromosome getRandomAmongFittest(int limit);\n\n /**\n * Remove the specified chromosome from the population\n * @param chromosome\n */\n boolean removeChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return the fittest chromosome\n * @return\n */\n Chromosome fittestChromosome();\n\n /**\n * Number of chromosome in the population\n * @return\n */\n int size();\n\n /**\n * Return the hits of each chromosomes\n * @return\n */\n Map<String, Long> hits();\n}", "public interface FitnessCalc1 {\n public double utilityFunction(Individual X);\n public double function(double x, Individual X);\n}", "public Population (float longitude, float latitude){\n this.location = new Coordinate (longitude,latitude);\n }", "public SimpleRegression() {\n this(new TDistributionImpl(1.0));\n }", "public interface GeneticOptimizer {\r\n\tpublic int getGenPopulation();\r\n\tpublic void setGenPopulation(Integer popSize);\r\n\tpublic int getGenIterations();\r\n\tpublic void setGenIterations(Integer iterations);\r\n\r\n}", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "public float AssignFitness() {\n\t\t\n\t\tfitness = 0;\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn fitness;\n\t\t}\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tfitness += ptr.s.weight;\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfitness /= sample_map.size();\n\t\treturn fitness;\n\t}", "public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }", "public FGDistanceStats()\r\n {\r\n \r\n }", "public AIAssign2(){\n \n Scanner console = new Scanner(System.in);\n \n System.out.print(\"Input population size \");\n popsize = console.nextInt();\n \n System.out.print(\"Input tournament size \");\n tournysize = console.nextInt();\n \n System.out.print(\"Input crossover chance (%) \");\n crossprob = console.nextDouble();\n \n System.out.print(\"Input mutation chance (%) \");\n mutaprob = console.nextDouble();\n \n System.out.print(\"Input max generation size \");\n maxgen = console.nextInt();\n \n System.out.print(\"Input problem width \");\n width = console.nextInt();\n \n System.out.print(\"Input problem height \");\n height = console.nextInt();\n \n System.out.print(\"Input start location x-1 \");\n startx = console.nextInt();\n \n System.out.print(\"Input start location y-1 \");\n starty = console.nextInt();\n \n System.out.print(\"Input seed value \");\n seed = console.nextLong();\n \n Random rnd = new Random(seed);\n \n population = new int[popsize][height*width];\n population2 = new int[popsize][height*width];\n popfitness = new int[popsize];\n \n for (int i = 0 ; i<popsize ; i++){\n for (int j = 0 ; j<population[0].length ; j++){\n population[i][j] = (rnd.nextInt(4));\n }\n }\n Print(population);\n \n //the generation loop\n for (int gen = 0 ; gen < maxgen ; gen++){\n \n //fitness of individuals is stored\n int btemp = 0;\n for (int i = 0 ; i < popsize ; i++){\n \n problem = new char[width][height];\n problem[startx][starty] = 'S';\n \n popfitness[i] = Fitness(population[i], problem, startx, starty, 0);\n \n if (popfitness[i] > btemp){ btemp = popfitness[i];}\n }\n bestavg = bestavg + btemp;\n \n String line=\"\";\n int avg=0;\n for (int i = 0 ; i < popsize ; i++){\n line = line + \"[\" + popfitness[i] + \"] \"; \n avg = avg + popfitness[i];\n }\n avg = avg/popsize;\n avgavg = avgavg + avg;\n bestavg = bestavg / (gen+1);\n avgavg = avgavg / (gen+1);\n System.out.println(\"Gen: \"+gen + \" Fitness: \"+ line + \" Avg: \"+ avg + \" BestAvg: \" + bestavg + \" AvgAvg: \" + avgavg);\n bestavg = bestavg * (gen+1);\n avgavg = avgavg * (gen+1);\n \n //Tournament selection\n for (int i = 0 ; i < popsize ; i++){\n int best = 0; \n int rand = (int)(rnd.nextInt(popsize));\n best = rand;\n \n for (int k = 0 ; k < tournysize ; k++){\n if (popfitness[rand] > popfitness[best]){\n best = rand;\n }\n \n rand = (int)(rnd.nextInt(popsize));\n }\n population2[i] = Copy(population[best]); \n }\n \n //single-focus-flip and block exchange mutations\n for (int i = 0 ; i < popsize-1 ; i++){\n if (crossprob > rnd.nextInt(100)){\n int temp; \n for (int a = 0 ; a < 5 ; a++){\n temp = population2[i][a];\n population2[i][a] = population2[i+1][a];\n population2[i+1][a] = temp;\n }\n }\n }\n \n for (int i = 0 ; i < popsize ; i++){\n if (mutaprob > rnd.nextInt(200)){\n int temp = (int) (rnd.nextInt(population2[0].length)); \n population2[i][temp] = (int)(rnd.nextInt(4));\n }\n else if (mutaprob > rnd.nextInt(200)){\n for (int j = 0 ; j < population2[0].length/2 ; j++){\n int temp = population2[i][j];\n population2[i][j] = population2[i][population2[0].length-1-j];\n population2[i][population2[0].length-1-j] = temp;\n }\n }\n }\n \n population = population2;\n population2 = new int[popsize][population[0].length];\n \n }\n \n bestavg = bestavg / maxgen;\n avgavg = avgavg / maxgen;\n Print(population);\n System.out.println(\"Best Avg: \" + bestavg + \" Average of Avg: \" + avgavg);\n }", "protected void initializeUniformWeight() {\n\n if(CrashProperties.fitnessFunctions.length == 2){\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = 1 - (a);\n }\n }else {\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = (1 - (a))/2;\n lambda[n][2] = (1 - (a))/2;\n }\n }\n\n }", "public Evaluador() {\n aL = new Arguments();\n }", "public MOData ( Individual program, int id ) {\n\n this.ID = id;\n this.program = program;\n\n int length = param.Parameters.FITNESS_FUNCTIONS.size();\n\n BufferedImage img = getImage();\n\n Response r = new Response(img);\n double fitn[];\n\n this.fitness = new double[length];\n this.raw = new double[length];\n this.ranks = new int[length];\n\n // Calculates fitnesses\n for ( int i = 0; i < length; i++ ) {\n FitnessFunction f =\n ((FitnessFunction)param.Parameters.FITNESS_FUNCTIONS.get(i));\n fitn = f.calculateFitness(r, img, param.Parameters.SOURCE);\n fitness[i] = fitn[0];\n raw[i] = fitn[1];\n }\n\n stats();\n \n }", "public Candidate(ContestEvaluation evaluation, int generation, player20 p,\r\n\t\t\tdouble[] parameters, double[] stDevs) {\r\n\t\tevaluation_ = evaluation;\r\n\t\tgeneration_ = generation;\r\n\t\tparameters_ = parameters;\r\n\t\tstDevs_ = stDevs;\r\n\t\tfitness_ = (Double) evaluation_.evaluate(parameters_);\r\n\t\tp.evals_++;\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tint p = 8;\n\t\t// r is the fraction of the population to be replaced by Crossover at\n\t\t// each step\n//\t\tdouble r = Double.valueOf(8).doubleValue();\n\t\tdouble r = 8;\n\t\t// m is the rate of mutation\n//\t\tdouble m = Double.valueOf(8).doubleValue();\n\t\tdouble m = 8;\n\n\t\t// Write into files...\n\t\tFile outputFile = new File(\"testGA.txt\");\n\t\tFileWriter out = new FileWriter(outputFile);\n\n\t\t////////////////////////\n\t\tp = 33;\n\t\tr = 0.6;\n\t\tm = 0.1;\n\n\t\t// Report the population size, crossover rate and mutation rate\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Learning the 8-queens problem with a Genetic Algorithm\");\n\t\tSystem.out.println(\"Population Size: \" + p);\n\t\tSystem.out.println(\"Crossover Rate: \" + r);\n\t\tSystem.out.println(\"Mutation Rate: \" + m);\n\t\tSystem.out.println();\n\t\tout.write(\"Parameters are p=\" + p + \", \" + \"r=\" + r + \" and m=\" + m + \"\\r\");\n\n\t\t// The genetic algorithm\n\t\tint iterationNum = 0;\n\t\tHypothesis bestIndividual;\n\t\tint bestFitness;\n\t\tdouble aveFitness;\n\t\t// Randomly generate initial population\n\t\tGA algorithm = new GA(p, r, m);\n\t\t// For each individual compute fitness\n\t\talgorithm.computeFitness();\n\t\t// Get the best individual\n\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\tbestFitness = bestIndividual.getFitness();\n\t\taveFitness = algorithm.computeAveFitness();\n\t\t// Iterate till we get the very best individual\n\t\twhile (bestFitness != 0) {\n\t\t\t// Select the very best members of the population to survive\n\t\t\talgorithm.select();\n\t\t\t// Make the best members reproduce themselves\n\t\t\talgorithm.crossover();\n\t\t\t// Add some mutations to new population\n\t\t\talgorithm.mutate();\n\t\t\t// The successor population becomes the current population\n\t\t\talgorithm.setNextGeneration();\n\t\t\t// For each individual compute fitness\n\t\t\talgorithm.computeFitness();\n\t\t\t// Get the best individual\n\t\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\t\tbestFitness = bestIndividual.getFitness();\n\t\t\taveFitness = algorithm.computeAveFitness();\n\t\t\t// Report best results to the user at every five iterations\n\t\t\tif (iterationNum % 5 == 0) {\n\t\t\t\tSystem.out.println(\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness\n\t\t\t\t\t\t+ \" Average Fitness \" + aveFitness);\n\t\t\t\tSystem.out.println(\"Best solution: \" + bestIndividual.toString());\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\t\t}\n\t\t\titerationNum++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness + \" Average Fitness \" + aveFitness);\n\t\tSystem.out.println(\"Solution is \" + bestIndividual.toString());\n\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\tout.close();\n\t}", "public void updateFitness ( ) {\n\n KozaFitness f = ((KozaFitness)program.fitness);\n\n f.setStandardizedFitness(param.Parameters.STATE, this.fit);\n\n }", "private RegressionPrior() { \n /* empty constructor */\n }", "public HypergeometricDistribution(){\n\t\tthis(100, 50, 10);\n\t}", "private void setnewFitnessValue(double fitnessValue) {\n this.newfitnessValue = fitnessValue;\r\n }", "public int getFitness(){\n\t\treturn getEnergy()*-1; \n\t}", "public StrategyByGA(double ProbabilityOfCooperatingGivenCooperation,\n double ProbabilityOfCooperatingGivenDefection) {\n\n name = \"Strategy Developed by the Genetic Algorithm\";\n opponentLastMove = 1;\n proCoopGivCoop = ProbabilityOfCooperatingGivenCooperation;\n proCoopGivDef = ProbabilityOfCooperatingGivenDefection;\n }", "public abstract void updateFitness();", "public Gene(double min, double max, double scalar){\n\t\tthis(min + (max - min) * Math.random(), min, max, scalar);\n\t}", "GuppySet(int numberOfGuppies, int minAge, int maxAge,\n double minHealthCoefficient, double maxHealthCoefficient) {\n this.numberOfGuppies = numberOfGuppies;\n this.minAge = minAge;\n this.maxAge = maxAge;\n this.minHealthCoefficient = minHealthCoefficient;\n this.maxHealthCoefficient = maxHealthCoefficient;\n }", "public Population(int capacity) {\r\n Validate.positive(capacity, \"capacity\");\r\n this.capacity = capacity;\r\n }", "public GeneticComputer(Role role) {\n super(role);\n }", "void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }", "public Statistic() {\n this(null, null);\n }", "public AdvancedSolution(int[] state, int fitness, int nbIterations) {\n\t\tsuper(state, fitness);\n\t\tthis.nbIterations = nbIterations;\n\t}", "double fitness(int gene) {\r\n \tint sum = 0;\r\n \tint prod= 1;\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tif (oldpop[gene][j]==0) {\r\n \t\t\tsum += (j+1);\r\n \t\t} else {\r\n \t\t\tprod *= (j+1);\r\n \t\t}\r\n \t}\r\n \treturn Math.abs(sum - SUMTARG)/SUMTARG \r\n \t + Math.abs(prod - PRODTARG)/PRODTARG;\r\n }", "@Override\n public void evaluate(Solution solution) throws JMException {\n\n int[] tour = new int[numberOfNodes + 1];\n int firstCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[0];\n int lastCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[numberOfNodes - 1];\n\n double fitness1_td = 0.0;\n\n // Calculate fitness 1 - total distance\n for (int i = 0; i < numberOfNodes - 1; i++) {\n int x = ((Permutation) solution.getDecisionVariables()[0]).vector_[i];\n int y = ((Permutation) solution.getDecisionVariables()[0]).vector_[i+1];\n\n tour[i] = x;\n tour[i+1] = y;\n\n fitness1_td += calDistances(x, y);\n }\n // generate tour with same start city and end city\n tour[numberOfNodes] = tour[0];\n\n fitness1_td += calDistances(firstCity, lastCity);\n\n\n // Correctness check: does the tour start and end in the same city\n if(tour[0] != tour[tour.length - 1]) {\n System.err.println(\"ERROR: The last city must be the same as the first city\");\n System.exit(1);\n }\n\n /*for (int i = 0; i < tour.length; i++) {\n System.out.print(tour[i] + \" \");\n }*/\n //System.out.println(\"\\n\" + tour.length);\n\n // Calculate fitness 2 - objective value of a given tour\n ArrayInt z = (ArrayInt) solution.getDecisionVariables()[1];\n //System.out.println(z.getLength());\n\n double fitness2_ob;\n double wc = 0.0;\n double ft = 0.0;\n double fp = 0.0;\n\n //the following is used for a different interpretation of \"packingPlan\"\n int itemsPerCity = z.getLength() / (tour.length - 2);\n //System.out.println(itemsPerCity);\n\n for (int i = 0; i < tour.length - 1; i++) {\n\n int currentCityTEMP = tour[i];\n // what's the current city? --> but the items start at city 2 in the TTP file, so I have to take another 1 off!\n int currentCity = currentCityTEMP - 1;\n\n if (i > 0) {\n\n if (currentCity == -1) {\n // No items in city 1\n wc += 0.0;\n fp += 0.0;\n\n } else {\n\n for (int itemNumber = 0; itemNumber < itemsPerCity; itemNumber++) {\n\n int indexOfPackingPlan = (i-1) * itemsPerCity + itemNumber;\n // what is the next item's index in items-array?\n int itemIndex = currentCity + itemNumber * (numberOfNodes - 1);\n //System.out.println(\"i: \" + i);\n\n if (z.getValue(indexOfPackingPlan) == 1) {\n // pack item\n //System.out.println(itemIndex);\n int currentWC = items[itemIndex][2];\n wc += currentWC;\n\n int currentFP = items[itemIndex][1];\n fp += currentFP;\n }\n }\n\n }\n\n int h = (i+1) % (tour.length-1); //h: next tour city index\n //System.out.println(\"h: \" + h);\n long distance = calDistances(i, h);\n // compute the adjusted (effective) distance\n ft += (distance / (1 - wc * (maxSpeed - minSpeed) / capacityOfKnapsack));\n }\n }\n\n wendUsed = wc;\n wend = capacityOfKnapsack - wc;\n fitness2_ob = fp - ft * rentingRatio;\n\n solution.setObjective(0, fitness1_td);\n solution.setObjective(1, -fitness2_ob); // Convert from maximum objective value to minimum objective value\n }", "public double calcFitness(int[] genes) {\n\t\treturn 0;\n\t}", "public ParentVertex(){\n Random rand = new Random();\n key = rand.nextInt(Integer.MAX_VALUE);\n xPos = rand.nextDouble();\n yPos = rand.nextDouble();\n connectedKeys = new ArrayList<>();\n degree = 0;\n fitness = 0;\n }", "public interface Heuristic\r\n{\r\n\r\n double calcStartToGoalCost(State currentState, State goalState);\r\n}", "public Statistics() {}", "public double[] getFitness() {\n return this.m_Fitness;\n }", "public FunctionBipolar()\r\n\t{\r\n\t\tsuper(-1, 1, true);\r\n\t}", "public void modifyFitness(Population population) {\n // prepare the calculation\n double[][] data = new double[population.size()][];\n for (int i = 0; i < data.length; i++) {\n data[i] = ((AbstractEAIndividual)population.get(i)).getFitness();\n }\n double min = Double.POSITIVE_INFINITY, fitnessSharing;\n double[] result = new double[data.length];\n AbstractEAIndividual tmpIndy;\n\n for (int x = 0; x < data[0].length; x++) {\n for (int i = 0; i < data.length; i++) data[i][x] = -data[i][x];\n for (int i = 0; i < data.length; i++) {\n if (data[i][x] < min) min = data[i][x];\n }\n\n for (int i = 0; i < data.length; i++) {\n // This will cause the worst individual to have no chance of being selected\n // also note that if all individual achieve equal fitness the sum will be zero\n result[i] = data[i][x] -min + 0.1;\n }\n\n for (int i = 0; i < population.size(); i++) {\n tmpIndy = (AbstractEAIndividual)population.get(i);\n fitnessSharing = 0;\n for (int j = 0; j < population.size(); j++) {\n if (this.m_SharingDistance < this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))) {\n fitnessSharing += 1 - (this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))/this.m_SharingDistance);\n }\n }\n result[i] = result[i]/fitnessSharing;\n }\n\n for (int i = 0; i < population.size(); i++) {\n ((AbstractEAIndividual)population.get(i)).SetFitness(x, result[i]);\n }\n }\n }", "public WeightedGraph() {\n super();\n }", "static double fitness(vmnode[] vms, jobnode[] jobs, int[] assigned, HashMap<Integer, Integer> map, double[][] ect) {\n double libd = LIBD(vms, jobs, assigned);\n double makesp = calcmakespan(map, ect);\n return libd * makesp;\n }", "public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, List<BlockPosition> paramList)\r\n/* 26: */ {\r\n/* 27: 44 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, false, true, paramList);\r\n/* 28: */ }" ]
[ "0.70822215", "0.6958052", "0.6690591", "0.6611006", "0.6487883", "0.6459618", "0.64049596", "0.6400137", "0.637761", "0.62450635", "0.6240538", "0.62371355", "0.62364036", "0.622783", "0.6166152", "0.6161958", "0.6157969", "0.6150675", "0.60912293", "0.6057809", "0.5990118", "0.5981996", "0.595019", "0.59383935", "0.59381074", "0.58977526", "0.58957016", "0.5854606", "0.5811583", "0.5811399", "0.58043563", "0.5785668", "0.5771449", "0.57400995", "0.57395726", "0.5727912", "0.57272464", "0.5698499", "0.5674041", "0.5663018", "0.56621885", "0.5648004", "0.56295466", "0.5605791", "0.5604259", "0.5600985", "0.55876136", "0.55837315", "0.5563802", "0.5556038", "0.55525243", "0.55521345", "0.5547573", "0.5536585", "0.553381", "0.5529414", "0.5527999", "0.5501267", "0.5495511", "0.54933596", "0.54883444", "0.54881203", "0.54824185", "0.54750913", "0.5474019", "0.54731506", "0.547235", "0.5469672", "0.54323596", "0.54256874", "0.54206944", "0.5416943", "0.540759", "0.540288", "0.5400029", "0.539484", "0.53889316", "0.536659", "0.53646636", "0.5354394", "0.5351214", "0.53376377", "0.5331772", "0.5315595", "0.5296253", "0.52793", "0.5273759", "0.5267091", "0.5266879", "0.52666956", "0.52585346", "0.5249883", "0.52483636", "0.5247711", "0.52476734", "0.52471036", "0.52463204", "0.524015", "0.5235991", "0.5222291" ]
0.6398263
8
///////////////////////// // Genetic Operators //// ///////////////////////// One and Two Point Crossover Operations
public List<Chromosome> doCrossover(Chromosome other, String crossoverType){ int geneSize = this.knapsackSelection.size(); ArrayList<Chromosome> children = new ArrayList<>(); //Allow for multiple crossover attempts to better the chance of a valid crossover. //Note that this can be disabled by setting GAConfiguration.CONCEPTION_ATTEMPTS = 1. for(int i = 0; i < PopulationConfiguration.CONCEPTION_ATTEMPTS; i++){ //Set first crossover point to 0 if 1PX Crossover. int crossPoint1 = crossoverType.equals("1PX") ? 0 : Configuration.RANDOM_GENERATOR.nextInt(geneSize); int crossPoint2 = Configuration.RANDOM_GENERATOR.nextInt(geneSize - crossPoint1) + crossPoint1; ArrayList<Boolean> c1 = new ArrayList<>(); ArrayList<Boolean> c2 = new ArrayList<>(); c1.addAll(this.knapsackSelection.subList(0, crossPoint1)); c1.addAll(other.getKnapsackSelection().subList(crossPoint1, crossPoint2)); c1.addAll(this.knapsackSelection.subList(crossPoint2, geneSize)); Chromosome child1 = new Chromosome(c1).withFitnessCalculated(); c2.addAll(other.getKnapsackSelection().subList(0, crossPoint1)); c2.addAll(this.knapsackSelection.subList(crossPoint1, crossPoint2)); c2.addAll(other.getKnapsackSelection().subList(crossPoint2, geneSize)); Chromosome child2 = new Chromosome(c2).withFitnessCalculated(); if(child1.isValid() && children.size() < 2){ children.add(child1); } if(child2.isValid() && children.size() < 2){ children.add(child2); } if(children.size() == 2){ break; } } //If the crossover failed to generate a valid child, return the parents. if(children.size() == 0){ children.add(other); children.add(this); } else if(children.size() == 1){ children.add(this); } return children; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {\r\n\t\t\t\tArrayList<Integer> chr1 = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\t\tArrayList<Integer> chr2 = (ArrayList<Integer>) this.chromosomes.get(i+1);\r\n\t\t\t\t// Uniform crossover\r\n\t\t\t\tif (!chr1.equals(chr2)) {\r\n\t\t\t\t\tfor (int j=0; j<this.nViaPoints; j=j+2) {\r\n\t\t\t\t\t\t// swap via points between 2 chromosomes\r\n\t\t\t\t\t\tInteger tmp = chr2.get(j);\r\n\t\t\t\t\t\tchr2.remove(j);\r\n\t\t\t\t\t\tchr2.add(j, chr1.get(j));\r\n\t\t\t\t\t\tchr1.remove(j);\r\n\t\t\t\t\t\tchr1.add(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.printChromosomes(\"After crossover\");\r\n\t}", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "public abstract Individual doCrossover(Individual ind1, Individual ind2, MOEAD init);", "public void simulatedBinaryCrossover(MersenneTwisterFast random, TraceableFloatVectorIndividual other, float eta_c)\n {\n final double EPS = FloatVectorSpecies.SIMULATED_BINARY_CROSSOVER_EPS;\n FloatVectorSpecies s = (FloatVectorSpecies) species;\n TraceableFloat[] parent1 = genome;\n TraceableFloat[] parent2 = other.genome;\n // double[] min_realvar = s.minGenes;\n // double[] max_realvar = s.maxGenes;\n \n \n double y1, y2, yl, yu;\n double c1, c2;\n double alpha, beta, betaq;\n double rand;\n \n for(int i = 0; i < parent1.length; i++)\n {\n if (random.nextBoolean()) // 0.5f\n {\n if (Math.abs(parent1[i].getValue() - parent2[i].getValue()) > EPS)\n {\n if (parent1[i].getValue() < parent2[i].getValue())\n {\n y1 = parent1[i].getValue();\n y2 = parent2[i].getValue();\n }\n else\n {\n y1 = parent2[i].getValue();\n y2 = parent1[i].getValue();\n }\n yl = s.minGene(i); //min_realvar[i];\n yu = s.maxGene(i); //max_realvar[i]; \n rand = random.nextFloat();\n beta = 1.0 + (2.0*(y1-yl)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c1 = 0.5*((y1+y2)-betaq*(y2-y1));\n beta = 1.0 + (2.0*(yu-y2)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c2 = 0.5*((y1+y2)+betaq*(y2-y1));\n if (c1<yl)\n c1=yl;\n if (c2<yl)\n c2=yl;\n if (c1>yu)\n c1=yu;\n if (c2>yu)\n c2=yu;\n if (random.nextBoolean())\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n else\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n }\n else\n {\n // do nothing\n }\n }\n else\n {\n // do nothing\n }\n }\n }", "public Population doCrossover(Population p) {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"Performing 1 point crossover for config1's selection population.\");\n\t\tSystem.out.println(\"Selecting bits to crossover.\");\n\t\tSystem.out.println(\"Completed.\");\n\t\treturn p;\n\t }", "public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;", "private Vector crossover(Individual mother, Individual father) {\n \n //don't want to do crossover on two chromosomes that are equal\n if(mother.equals(father)) {\n Vector to_return = new Vector();\n to_return.add(mother);\n to_return.add(father);\n return to_return;\n }\n \n println(\"crossover\", 1);\n int[] mom = mother.getChromosome();\n int[] dad = father.getChromosome();\n int[] child1 = new int[num_shipping_points]; \n int[] child2 = new int[num_shipping_points]; \n \n println(\"mother is\", 1);\n displayChromosome(mother, 1);\n println(\"father is\", 1);\n displayChromosome(father, 1);\n \n int breakpoint = (int)(Math.random() * num_shipping_points) + 3;\n println(\"breakpoint = \" + breakpoint, 1);\n \n int comparisons = 0;\n \n for(int i = 0; i < num_shipping_points; i++) {\n if(i < breakpoint) {\n child1[i] = mom[i];\n child2[i] = dad[i];\n }\n else {\n child1[i] = -1;\n child2[i] = -1;\n }\n } \n \n int j = breakpoint; //index on other chromosome\n\n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child2, mom[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n \n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint) //not supposed to happen, but it does\n break;\n }\n child2[i] = mom[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n\n }\n \n j = breakpoint;\n comparisons = 0; \n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child1, dad[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint)\n break;\n }\n child1[i] = dad[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n }\n \n Vector v = new Vector();\n Individual i1 = new Individual(child1, this);\n Individual i2 = new Individual(child2, this);\n //i1.setFitness(evaluateFitness(i1));\n //i2.setFitness(evaluateFitness(i1));\n v.add(i1);\n v.add(i2);\n println(\"kid1:\",1);\n displayChromosome(i1, 1);\n println(\"kid2:\", 1);\n displayChromosome(i2, 1);\n println(\"returning from crossover\",1);\n return v;\n }", "private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }", "public void doMutation(double probability, Solution offsbring) throws JMException {\r\n\t\r\n\t\r\n\t\t \r\n\t\t try {\r\n\t\t \t//System.out.println(offsbring.get);\r\n\t\t int chrmosomesize= offsbring.getCompositionService().size();\r\n\t\t //int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t if (random<probability){\r\n\t\t \t System.out.println(\" classs \"+offsbring.getCompositionService().get(random).getServiceClass());//getSeviceClass();\r\n\t\t\t \r\n\t\t \t String Sclass=(String) offsbring.getCompositionService().get(random).getServiceClass();//getSeviceClass();\r\n\t\t \r\n\t\t for (int i=0; i<z.ServicePool.size();i++){\r\n\t// if (z.ServicePool.get(i).getServiceFunctionality().equalsIgnoreCase(Sclass))\r\n\t\t \t if (z.ServicePool.get(i).getServiceClass().equalsIgnoreCase(Sclass))\r\n\t\t\tRequiredClass.add(z.ServicePool.get(i));\r\n\t\t }\r\n\t\t // z.ServicePool.get(9).\r\n\t\tint random2 = (PseudoRandom.randInt())%(RequiredClass.size());\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\r\n\t\t \t\t\r\n\t\t\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\t\t \t \r\n\t\t \r\n\t\t }\r\n\t\t } catch (ClassCastException e1) {\r\n\t\t Configuration.logger_.severe(\"SinglePointCrossover.doCrossover: Cannot perfom \" +\r\n\t\t \"SinglePointCrossover\");\r\n\t\t Class cls = java.lang.String.class;\r\n\t\t String name = cls.getName();\r\n\t\t throw new JMException(\"Exception in \" + name + \".doCrossover()\");\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t }", "public static void main(String args[]) {\n\t\t\n\t\tint populationSize = 5;\n\t\tint crossCount = (int)(populationSize * 0.9);\n\t\tint mutCount = (int)(populationSize * 0.05);\n\t\tint copyCount = populationSize - crossCount - mutCount;\n\n\t\t//90% through crossover\n\t\tfor(int i = 0; i < crossCount; i++) \n\t\t\tSystem.out.println(\"Cross: \" + i);\n\t\t\n\t\t//5% by copying\n\t\tfor(int i = crossCount; i < crossCount + copyCount; i++) \n\t\t\tSystem.out.println(\"Copy: \" + i);\n\t\t\n\t\t\n\t\t//5% by mutation\n\t\tfor(int i = crossCount + copyCount; i < populationSize; i++) \n\t\t\tSystem.out.println(\"Mut: \" + i);\n\t\t\n\t\tfor(int i = 0; i < 60; i++) {\n\t\t\t\n\t\t\tPoint p1 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //bot's point\n\t\t\tPoint p2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //enemy point\n\t\t\twhile(p2.equals(p1))\n\t\t\t\tp2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600));\n\t\t\t\n\t\t\tfloat angle = (float) Math.atan2(p2.y - p1.y, p2.x - p1.x);\n\t\t\tDecimalFormat df = new DecimalFormat(\"0.0000\");\n\t\t\tSystem.out.println(p1.x + \" \" + p1.y + \" \" + p2.x + \" \" + p2.y + \" \" + df.format(angle));\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void crossoverOX() {\n\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n ArrayList<Integer> crossPoints = getCrossoverPoints(Defines.cpMode);\n\n Collections.sort(crossPoints);\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspringOX(this.parents, crossPoints)));\n\n }", "public interface XoverOpIntf {\r\n /**\r\n * the operation accepts 2 chromosomes (not DGAIndividual objects, not\r\n * FunctionIntf() arguments), and combines them so as to produce two new\r\n * such chromosomes that are returned in a Pair object. The operation may\r\n * throw if any of the produced children are infeasible, assuming the operator\r\n * has enough knowledge of that fact.\r\n * @param chromosome1 Object\r\n * @param chromosome2 Object\r\n * @param params HashMap \r\n * @throws OptimizerException\r\n * @return Pair\r\n */\r\n public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;\r\n}", "public OnePointCrossoverOne(Population p) {\n\t\tdoCrossover(p);\n\t}", "public void origCrossover() {\n\n ArrayList<Integer> crossPoints;\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n // Choose random crossover points within the chromosome\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n crossPoints = new ArrayList<Integer>();\n for (int i = 0; i < Defines.crossoverPoints; i++) {\n crossPoints.add(Defines.randNum(0, Defines.chromosomeSize - 1));\n }\n } else {\n // Parents are used without crossover - no crossover points; \n crossPoints = null;\n }\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspring(this.parents, crossPoints)));\n }", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "@Test\r\n\tpublic final void testCross() throws GeneticProgrammingException {\r\n\t\tfinal int[] training = TestHelper.genertateTrainingDataSet(-100, 100);\r\n\t\tfinal double[] targetValues = TestHelper.calculateTargetValues(\r\n\t\t\t\t\"x*2-1/2\", training);\r\n\t\tfinal Node root = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree = new Tree(root, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator = new Node(root, \"-\", Node.LEFT, Node.OPERATOR);\r\n\t\tnewTree.addNode(minusOperator);\r\n\t\tfinal Node multiOperator = new Node(root, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree.addNode(multiOperator);\r\n\t\tnewTree.addNode(new Node(minusOperator, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(minusOperator, \"3\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"5\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(1-3)/(x*5)\",\r\n\t\t\t\tnewTree.getEquation().toString());\r\n\t\tfinal Node root2 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree2 = new Tree(root2, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator2 = new Node(root2, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(minusOperator2);\r\n\t\tfinal Node multiOperator2 = new Node(root2, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(multiOperator2);\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"8\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"9\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(x-7)/(8*9)\",\r\n\t\t\t\tnewTree2.getEquation().toString());\r\n\r\n\t\tfinal Node root3 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree3 = new Tree(root3, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator3 = new Node(root3, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(minusOperator3);\r\n\t\tfinal Node multiOperator3 = new Node(root3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator3);\r\n\t\tfinal Node multiOperator4 = new Node(multiOperator3, \"*\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator4);\r\n\t\tfinal Node multiOperator5 = new Node(multiOperator3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator5);\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"2\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"3\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"4\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\",\r\n\t\t\t\t\"(x-7)/(1*2)*(3*4)\", newTree3.getEquation().toString());\r\n\t\tfinal ArrayList<Tree> newTrees = new ArrayList<Tree>();\r\n\t\tnewTrees.add(newTree3);\r\n\t\tnewTrees.add(newTree2);\r\n\t\tnewTrees.add(newTree);\r\n\t\tassertEquals(\"Tree should have a size of 3 before the cross\", 3,\r\n\t\t\t\tnewTrees.size());\r\n\t\tCrossover.cross(newTrees, 1, 100, training, targetValues);\r\n\t\tfinal Iterator<Tree> iterator = newTrees.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\t// All five trees should be different\r\n\t\t\tfinal String firstTree = iterator.next().toString();\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 1\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 2\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 3\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 4\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t}\r\n\t\t// should be 5 trees after the crossover\r\n\t\tassertEquals(\"Tree should have a size of 5 but was not\", 5, newTrees\r\n\t\t\t\t.size());\r\n\t}", "abstract int[] crossOver();", "public void MultipointCrossoverCAN (TableVar Variables) {\r\n int i, mom, dad, xpoint1, xpoint2;\r\n \r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n \r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n Des.setCromElem (0, i, Inter.getCromElem(mom,i));\r\n Des.setCromElem (1, i, Inter.getCromElem(dad,i));\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n Des.setCromElem(mom, i, Inter.getCromElem(dad,i));\r\n Des.setCromElem(dad, i, Inter.getCromElem(mom,i));\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n \r\n }", "@Test\n\tpublic void testCrossover() {\n\t\tint pivot = 5;\n\t\tint size = g10.getUnits().size();\n\t\tArrayList<GenomeDouble> expectedWeights1;\n\t\tArrayList<GenomeDouble> expectedWeights2;\n\t\t\n\t\texpectedWeights1 = new ArrayList<GenomeDouble>(g10.getUnits().size());\n\t\texpectedWeights2 = new ArrayList<GenomeDouble>(g10_2.getUnits().size());\n\t\t\n\t\texpectedWeights1.addAll(g10.getUnits().subList(0, pivot));\n\t\texpectedWeights1.addAll(g10_2.getUnits().subList(pivot, size));\n\t\texpectedWeights2.addAll(g10_2.getUnits().subList(0, pivot));\n\t\texpectedWeights2.addAll(g10.getUnits().subList(pivot, size));\n\t\t\n\t\tList<Genome<GenomeDouble>> results = Genome.crossover(g10, g10_2, 0.7, 10);\n\t\tassertEquals(expectedWeights1, results.get(0).getUnits());\n\t\tassertEquals(expectedWeights2, results.get(1).getUnits());\n\t}", "public void MultipointCrossoverDNF (TableVar Variables) {\r\n int i, j, mom, dad, xpoint1, xpoint2;\r\n\r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n\r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(0, i, j, Inter.getCromElemGene(mom,i, j));\r\n Des.setCromElemGene (1, i, j, Inter.getCromElemGene(dad,i, j));\r\n }\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(mom, i, j, Inter.getCromElemGene(dad,i,j));\r\n Des.setCromElemGene(dad, i, j, Inter.getCromElemGene(mom,i,j));\r\n }\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n\r\n }", "private void mate(NeuralPlayer org1, NeuralPlayer org2, NeuralPlayer offspring)\n\t{\n\t\tBasicNetwork newGuy = (BasicNetwork)org1.net.clone();\n\t\tRandom g = new Random();\n\t\tdouble[] genome1 = NetworkCODEC.networkToArray(org1.net);\n\t\tdouble[] genome2 = NetworkCODEC.networkToArray(org2.net);\n\t\t\n\t\tint numCrosses = 1;//g.nextInt(20)+2;//g.nextInt(genome1.length/4)+1;\n\t\tfor (int j = 0; j< numCrosses; j++)\n\t\t{\n\t\t\tint crossIndex = g.nextInt(genome1.length);\n\t\t\t//int crossLength = g.nextInt(genome1.length)+1;//g.nextInt(50);\n\t\t\t//int stop = Math.min(crossIndex+crossLength,genome1.length);\n\t\t\tfor (int i = crossIndex; i<genome1.length; i++)\n\t\t\t\tgenome2[i] = genome1[i]; // 1 point crossover\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome2, newGuy);\n\t\toffspring.net = newGuy;\n\t}", "public List<Individual> crossover2Point2(Individual parent1, Individual parent2) {\n List <Individual> listOffsprings = new ArrayList<Individual>();\n Individual offspring1 = new Individual(parent1.getChromosomeLength());\n Individual offspring2 = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength() - 1);\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }\n }\n listOffsprings.add(offspring1);\n listOffsprings.add(offspring2);\n return listOffsprings;\n }", "public static Double[] crossover(Double[] g1, Double[] g2){\n\t\tRandom random = new Random();\n\t\tint start = random.nextInt(variableNum-1);\n\t\tint end = start + 1 + random.nextInt(variableNum-start);\n\t\t//which one is better, why\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i] + Math.random()*(g1[i]-g2[i]);\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i];\n\t\tfor(int i = start; i < end; i++) {\n\t\t\tg1[i] = g2[i] + (Math.random()*2-1)*(g1[i]-g2[i]);\n\t\t\tif(g1[i] > maxValue) g1[i] = maxValue;\n\t\t\tif(g1[i] < minValue) g1[i] = minValue;\n\t\t}\n\t\treturn Arrays.copyOf(g1, g1.length);\n\t}", "public void crossover() {\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n this.crossoverOX();\n } else {\n // randomly select one of the parents to copy without crossover\n int idx = Defines.randNum(0, this.parents.size() - 1);\n Chromosome newChild = this.parents.get(idx);\n this.offspring = new ArrayList<Chromosome>();\n this.offspring.add(newChild);\n }\n }", "private void crossover(Chromosome c1, Chromosome c2){\n int split = (int)(Math.random()*c1.getNumWeights());\n \n double[][] m1 = c1.getGeneData();\n double[][] m2 = c2.getGeneData();\n double store;\n \n //Begin the switch\n for(int r=0; r<m1.length; r++){\n //Stop spliting\n if(split <= 0){\n break;\n }\n for(int c=0; c<m1[r].length;c++){\n store = m1[r][c];\n m1[r][c] = m2[r][c];\n m2[r][c] = store;\n split--;\n //Stop spliting\n if(split <= 0){\n break;\n }\n }\n }\n }", "public static void crossover(Individual[] parent) {\n Individual[] children = new Individual[POP_SIZE];\n for (int i = 0; i < POP_SIZE; i += 2) {\n Individual child1 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child1.generateRulebase();\n Individual child2 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child2.generateRulebase();\n\n int crossOverPoint = new Random().nextInt(GENE_SIZE);\n for (int j = 0; j < crossOverPoint; j++) {\n child1.gene[j] = parent[i].gene[j];\n child2.gene[j] = parent[i + 1].gene[j];\n }\n\n for (int j = crossOverPoint; j < GENE_SIZE; j++) {\n child1.gene[j] = parent[i + 1].gene[j];\n child2.gene[j] = parent[i].gene[j];\n }\n\n child1.generateRulebase();\n child2.generateRulebase();\n children[i] = new Individual(child1);\n children[i + 1] = new Individual(child2);\n }\n\n matingPool = Arrays.copyOf(children, parent.length);\n }", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "public static void main(String[] args) throws IOException {\n\t\tint p = 8;\n\t\t// r is the fraction of the population to be replaced by Crossover at\n\t\t// each step\n//\t\tdouble r = Double.valueOf(8).doubleValue();\n\t\tdouble r = 8;\n\t\t// m is the rate of mutation\n//\t\tdouble m = Double.valueOf(8).doubleValue();\n\t\tdouble m = 8;\n\n\t\t// Write into files...\n\t\tFile outputFile = new File(\"testGA.txt\");\n\t\tFileWriter out = new FileWriter(outputFile);\n\n\t\t////////////////////////\n\t\tp = 33;\n\t\tr = 0.6;\n\t\tm = 0.1;\n\n\t\t// Report the population size, crossover rate and mutation rate\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Learning the 8-queens problem with a Genetic Algorithm\");\n\t\tSystem.out.println(\"Population Size: \" + p);\n\t\tSystem.out.println(\"Crossover Rate: \" + r);\n\t\tSystem.out.println(\"Mutation Rate: \" + m);\n\t\tSystem.out.println();\n\t\tout.write(\"Parameters are p=\" + p + \", \" + \"r=\" + r + \" and m=\" + m + \"\\r\");\n\n\t\t// The genetic algorithm\n\t\tint iterationNum = 0;\n\t\tHypothesis bestIndividual;\n\t\tint bestFitness;\n\t\tdouble aveFitness;\n\t\t// Randomly generate initial population\n\t\tGA algorithm = new GA(p, r, m);\n\t\t// For each individual compute fitness\n\t\talgorithm.computeFitness();\n\t\t// Get the best individual\n\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\tbestFitness = bestIndividual.getFitness();\n\t\taveFitness = algorithm.computeAveFitness();\n\t\t// Iterate till we get the very best individual\n\t\twhile (bestFitness != 0) {\n\t\t\t// Select the very best members of the population to survive\n\t\t\talgorithm.select();\n\t\t\t// Make the best members reproduce themselves\n\t\t\talgorithm.crossover();\n\t\t\t// Add some mutations to new population\n\t\t\talgorithm.mutate();\n\t\t\t// The successor population becomes the current population\n\t\t\talgorithm.setNextGeneration();\n\t\t\t// For each individual compute fitness\n\t\t\talgorithm.computeFitness();\n\t\t\t// Get the best individual\n\t\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\t\tbestFitness = bestIndividual.getFitness();\n\t\t\taveFitness = algorithm.computeAveFitness();\n\t\t\t// Report best results to the user at every five iterations\n\t\t\tif (iterationNum % 5 == 0) {\n\t\t\t\tSystem.out.println(\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness\n\t\t\t\t\t\t+ \" Average Fitness \" + aveFitness);\n\t\t\t\tSystem.out.println(\"Best solution: \" + bestIndividual.toString());\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\t\t}\n\t\t\titerationNum++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness + \" Average Fitness \" + aveFitness);\n\t\tSystem.out.println(\"Solution is \" + bestIndividual.toString());\n\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\tout.close();\n\t}", "public interface MonogamousCrossover {\r\n\r\n\tpublic Embryo mate(Individual mother, Individual father);\r\n}", "private int getCrossoverPoint(int mode) {\n int cPoint = 0;\n\n switch (mode) {\n case Defines.CP_PURE_RANDOM:\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n break;\n\n case Defines.CP_NO_BOUNDARY:\n do {\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n } while (cPoint % Defines.GROUP_SIZE == 0 || cPoint % Defines.GROUP_SIZE == 3);\n break;\n }\n\n return cPoint;\n }", "public int getCrossoverPoints() {\n\t\treturn 1;\r\n\t}", "private int[][] crossoverOnePoint(int[] parent1, int[] parent2) {\n\t\tint crossPoint1 = rand.nextInt(parent1.length);\n\n\t\tint[] child = new int[parent1.length];\n\t\tint[] child2 = new int[parent1.length];\n\t\tfor (int i = 0; i < crossPoint1; i++) {\n\t\t\tchild[i] = parent1[i]; //before cross point = p1\n\t\t\tchild2[i] = parent2[i]; //opposite for child2\n\t\t}\n\n\t\tfor (int i = crossPoint1; i < parent1.length; i++) {\n\t\t\tchild[i] = parent2[i]; //after and including crosspoint = p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child2\n\t\t}\n\t\treturn new int[][] { child, child2 };\n\n\t}", "public Individual crossover1Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint = Service.rand(0, parent1.getChromosomeLength());\n for (int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n // Use half of parent1's genes and half of parent2's genes\n if (crossoverPoint > geneIndex) {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n }\n }\n return offspring;\n }", "public static double getCrossoverProbability() { return crossoverProbability; }", "public Individual crossover2Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength());\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }\n }\n return offspring;\n }", "protected DNA NEATcross(DNA other) {\n\t\tDNA hifit;\n\t\tDNA lofit;\n\n\t\tif (this.fitness == null || other.fitness == null)\n\t\t\treturn null;\n\n\t\tDNA ret = new DNA(population, false);\n\n\t\t// Choose the genome with the higher fitness\n\t\tif (this.fitness > other.fitness) {\n\t\t\thifit = this;\n\t\t\tlofit = other;\n\t\t} else {\n\t\t\thifit = this;\n\t\t\tlofit = other;\n\t\t}\n\n\t\t// Populate gene list of ret\n\t\tfor (Integer i : hifit.getInnovations()) {\n\t\t\tGene submission;\n\t\t\tif (!lofit.hasGene(i)) {\n\t\t\t\tsubmission = hifit.getGene(i);\n\t\t\t} else {\n\t\t\t\tGene newgene;\n\t\t\t\tif (Braincraft\n\t\t\t\t\t\t.randomChance(population.inheritFromHigherFitRate))\n\t\t\t\t\tnewgene = new Gene(hifit.getGene(i));\n\t\t\t\telse\n\t\t\t\t\tnewgene = new Gene(lofit.getGene(i));\n\t\t\t\tif (!hifit.getGene(i).enabled || !lofit.getGene(i).enabled) {\n\t\t\t\t\tif (Braincraft.randomChance(population.disabledRate))\n\t\t\t\t\t\tnewgene.enabled = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tnewgene.enabled = true;\n\t\t\t\t}\n\t\t\t\tsubmission = newgene;\n\t\t\t}\n\t\t\tif (!ret.hasNode(submission.start)) {\n\t\t\t\tret.submitNewNode(hifit.getNode(submission.start));\n\t\t\t}\n\t\t\tif (!ret.hasNode(submission.end)) {\n\t\t\t\tret.submitNewNode(hifit.getNode(submission.end));\n\t\t\t}\n\t\t\tret.submitNewGene(submission);\n\t\t}\n\n\t\tif (Braincraft.randomChance(population.weightMutationRate))\n\t\t\tret.mutateWeights();\n\t\tif (Braincraft.randomChance(population.linkMutationRate))\n\t\t\tret.mutateAddLink();\n\t\tif (Braincraft.randomChance(population.nodeMutationRate))\n\t\t\tret.mutateAddNode();\n\t\tif (Braincraft.randomChance(population.linkDisableRate))\n\t\t\tret.mutateDisableLink();\n\n\t\treturn ret;\n\t}", "public static void GA(ArrayList<City> cities){\n int pathLength = cities.size();\n // the number of chromosomes which will be generated\n int populationSize = 100;\n // the number of chromosomes that will be generated from crossover as a percentage of the population\n double crossoverRate = 0.8;\n // the number of chromosomes that will be generated from crossover\n int crossoverSize = (int) (populationSize * crossoverRate);\n // the probability that a chromosome can have a random mutation\n double mutationRate = 0.05;\n // the number of generations\n int generations = 5000;\n\n // Initialising the distance matrix using the initialiseDistanceMatrix method\n initialiseDistanceMatrix(cities);\n\n // Generating the Initial Population\n ArrayList<Chromosome> population = generatePopulation(cities, pathLength, populationSize);\n\n // The following is done for each generation of the population\n for (int i = 0; i < generations; i++) {\n // calculating the fitness of every chromosome in the current generation\n calculateFitnessOfPopulation(population);\n // sort the population so that the chromosomes with the highest fitness are at the start of the list\n Collections.sort(population);\n // call the method which performs crossover on the population\n Set<Chromosome> children = crossoverPopulation(population, populationSize, crossoverSize);\n // carry out mutation on the children of the current population\n children.addAll( mutatePopulation(children, mutationRate) );\n\n // evolve the population\n population.addAll(children);\n ArrayList<Chromosome> currentGeneration = new ArrayList<>(population);\n ArrayList<Chromosome> nextGeneration = evolvePopulation(currentGeneration, populationSize, cities, pathLength);\n population = new ArrayList<>(nextGeneration);\n }\n\n // find the fittest chromosome\n Chromosome fittestChromosome = population.get(0);\n double maxFitness = population.get(0).fitness;\n for (Chromosome c : population) {\n if (c.fitness > maxFitness) {\n maxFitness = c.fitness;\n fittestChromosome = c;\n }\n }\n // display the path and distance of the fittest chromosome\n System.out.println(fittestChromosome.getPath());\n System.out.println(\"Total Route Distance: \" + routeDistance(fittestChromosome));\n\n //printPopulation(population);\n }", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }", "private void cross(String[] pop) {\n\t\tString temp1, temp2;\n\t\tfor (int i = (int) (ChrNum*survial_fraction); i < ChrNum; i+=2) {\n\t\t\tif (Math.random() < 0.60) {\n\t\t\t\tint pos = (int)(Math.random()*GENE)+1; \n\t\t\t\ttemp1 = pop[i].substring(0, pos) + pop[i + 1].substring(pos); \n\t\t\t\ttemp2 = pop[i + 1].substring(0, pos) + pop[i].substring(pos);\n\t\t\t\tpop[i] = temp1;\n\t\t\t\tpop[i + 1] = temp2;\n\t\t\t}\n\t\t}\n\t}", "private <T> List<Chromosome<T>> breedNewGeneration(List<Chromosome<T>> chromosomes){\n\t\tList<Chromosome<T>> selected = selection.apply(chromosomes);\n\t\tCollections.shuffle(selected);\n\n\t\tList<Chromosome<T>> crossedOver = Lists.newArrayList();\n\t\tfor(int i = 0; i < selected.size(); i+=2){\n\t\t\tChromosome<T>[] bred = crossover.apply(selected.get(i), selected.get(i+1));\n\t\t\tcrossedOver.add(bred[0]);\n\t\t\tcrossedOver.add(bred[1]);\n\t\t}\n\n\t\treturn crossedOver.stream().map(mutation::apply).collect(Collectors.toList());\n\t}", "private static Set<Chromosome> crossoverPopulation(ArrayList<Chromosome> population, int populationSize, int crossoverSize) {\n\n // declare a set of chromosomes which will store all thr chromosomes generated by the crossover operation\n Set<Chromosome> crossoverChromosomes = new HashSet<>();\n\n while (crossoverChromosomes.size() < crossoverSize) {\n // retrieve a set of chromosomes (of size 2) on which crossover will occur\n // using the Rank-Based Roulette Wheel Selection method\n Set<Chromosome> selectedChromosomes = rankBasedRouletteWheelSelection(population, populationSize);\n\n // store the 2 Chromosomes in parent 1 and parent 2\n Chromosome parent1 = selectedChromosomes.iterator().next();\n selectedChromosomes.remove(parent1);\n Chromosome parent2 = selectedChromosomes.iterator().next();\n\n // perform crossover using the crossoverChromosomes method\n // the method is called twice, switching the order of the parents for the second time, since SCX produces only\n // one child, however produces a different child when the parents are switched\n crossoverChromosomes.add(crossover(parent1, parent2));\n crossoverChromosomes.add(crossover(parent2, parent1));\n }\n\n return crossoverChromosomes;\n }", "public static void setCrossoverProbability(double value) { crossoverProbability = value; }", "private int[][] crossoverTwoPoint(int[] parent1, int[] parent2) {\n\t\tint crossPoint1 = rand.nextInt(parent1.length);\n\t\tint crossLength = rand.nextInt(parent1.length + 1 - crossPoint1);\n\t\tint crossPoint2 = crossPoint1 + crossLength;\n\n\t\tint[] child = new int[parent1.length];\n\t\tint[] child2 = new int[parent1.length];\n\t\tfor (int i = crossPoint1; i < crossPoint2; i++) {\n\t\t\tchild[i] = parent1[i]; //items between cross points are direct copied from p1\n\t\t\tchild2[i] = parent2[i]; //opposite for child 2\n\t\t}\n\t\tfor (int i = 0; i < crossPoint1; i++) {\n\t\t\tchild[i] = parent2[i]; //items on either side copied direct from p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child 2\n\t\t}\n\t\tfor (int i = crossPoint2; i < parent1.length; i++) {\n\t\t\tchild[i] = parent2[i]; //items on either side copied direct from p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child 2\n\t\t}\n\t\treturn new int[][] { child, child2 };\n\t}", "public Population crossoverPopulation(Population population, List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n Individual queen = population.getFittest(0);\n // Loop over current population by fitness\n for (int dronesIndex = 1; dronesIndex < (numberDrones + 1); dronesIndex++) {\n Individual husband = population.getFittest(dronesIndex);\n\n // Apply crossover to this individual?\n if (this.crossoverRate > Math.random()) {\n // Initialize offspring\n Individual offspring = new Individual(husband.getChromosomeLength());\n\n offspring = crossover2Point(husband, queen);\n\n if(husband.getFitness() <= calcFitness(offspring, fogDevices, cloudletList)\n && !doesPopupationIncludeIndividual(population, offspring)) {\n population.getPopulation().remove(husband);\n population.getPopulation().add(offspring);\n }\n }\n }\n return population;\n }", "private Individual[] crossOver(Individual father, Individual mother){\n\t\tIndividual[] children = problem.makeChild(mother, father);\r\n\t\treturn children;\r\n\t}", "private static void mating() {\n\t\tint getRand = 0;\n\t\tint parentA = 0;\n\t\tint parentB = 0;\n\t\tint newIndex1 = 0;\n\t\tint newIndex2 = 0;\n\t\tChromosome newChromo1 = null;\n\t\tChromosome newChromo2 = null;\n\n\t\tfor (int i = 0; i < OFFSPRING_PER_GENERATION; i++) {\n\t\t\tparentA = chooseParent();\n\t\t\t// Test probability of mating.\n\t\t\tgetRand = getRandomNumber(0, 100);\n\t\t\tif (getRand <= MATING_PROBABILITY * 100) {\n\t\t\t\tparentB = chooseParent(parentA);\n\t\t\t\tnewChromo1 = new Chromosome();\n\t\t\t\tnewChromo2 = new Chromosome();\n\t\t\t\tpopulation.add(newChromo1);\n\t\t\t\tnewIndex1 = population.indexOf(newChromo1);\n\t\t\t\tpopulation.add(newChromo2);\n\t\t\t\tnewIndex2 = population.indexOf(newChromo2);\n\n\t\t\t\t// Choose either, or both of these:\n\t\t\t\tpartiallyMappedCrossover(parentA, parentB, newIndex1, newIndex2);\n\t\t\t\t// positionBasedCrossover(parentA, parentB, newIndex1, newIndex2);\n\n\t\t\t\tif (childCount - 1 == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex1, 1);\n\t\t\t\t} else if (childCount == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex2, 1);\n\t\t\t\t}\n\n\t\t\t\tpopulation.get(newIndex1).computeConflicts();\n\t\t\t\tpopulation.get(newIndex2).computeConflicts();\n\n\t\t\t\tchildCount += 2;\n\n\t\t\t\t// Schedule next mutation.\n\t\t\t\tif (childCount % (int) Math.round(1.0 / MUTATION_RATE) == 0) {\n\t\t\t\t\tnextMutation = childCount + getRandomNumber(0, (int) Math.round(1.0 / MUTATION_RATE));\n\t\t\t\t}\n\t\t\t}\n\t\t} // i\n\t\treturn;\n\t}", "public AIAssign2(){\n \n Scanner console = new Scanner(System.in);\n \n System.out.print(\"Input population size \");\n popsize = console.nextInt();\n \n System.out.print(\"Input tournament size \");\n tournysize = console.nextInt();\n \n System.out.print(\"Input crossover chance (%) \");\n crossprob = console.nextDouble();\n \n System.out.print(\"Input mutation chance (%) \");\n mutaprob = console.nextDouble();\n \n System.out.print(\"Input max generation size \");\n maxgen = console.nextInt();\n \n System.out.print(\"Input problem width \");\n width = console.nextInt();\n \n System.out.print(\"Input problem height \");\n height = console.nextInt();\n \n System.out.print(\"Input start location x-1 \");\n startx = console.nextInt();\n \n System.out.print(\"Input start location y-1 \");\n starty = console.nextInt();\n \n System.out.print(\"Input seed value \");\n seed = console.nextLong();\n \n Random rnd = new Random(seed);\n \n population = new int[popsize][height*width];\n population2 = new int[popsize][height*width];\n popfitness = new int[popsize];\n \n for (int i = 0 ; i<popsize ; i++){\n for (int j = 0 ; j<population[0].length ; j++){\n population[i][j] = (rnd.nextInt(4));\n }\n }\n Print(population);\n \n //the generation loop\n for (int gen = 0 ; gen < maxgen ; gen++){\n \n //fitness of individuals is stored\n int btemp = 0;\n for (int i = 0 ; i < popsize ; i++){\n \n problem = new char[width][height];\n problem[startx][starty] = 'S';\n \n popfitness[i] = Fitness(population[i], problem, startx, starty, 0);\n \n if (popfitness[i] > btemp){ btemp = popfitness[i];}\n }\n bestavg = bestavg + btemp;\n \n String line=\"\";\n int avg=0;\n for (int i = 0 ; i < popsize ; i++){\n line = line + \"[\" + popfitness[i] + \"] \"; \n avg = avg + popfitness[i];\n }\n avg = avg/popsize;\n avgavg = avgavg + avg;\n bestavg = bestavg / (gen+1);\n avgavg = avgavg / (gen+1);\n System.out.println(\"Gen: \"+gen + \" Fitness: \"+ line + \" Avg: \"+ avg + \" BestAvg: \" + bestavg + \" AvgAvg: \" + avgavg);\n bestavg = bestavg * (gen+1);\n avgavg = avgavg * (gen+1);\n \n //Tournament selection\n for (int i = 0 ; i < popsize ; i++){\n int best = 0; \n int rand = (int)(rnd.nextInt(popsize));\n best = rand;\n \n for (int k = 0 ; k < tournysize ; k++){\n if (popfitness[rand] > popfitness[best]){\n best = rand;\n }\n \n rand = (int)(rnd.nextInt(popsize));\n }\n population2[i] = Copy(population[best]); \n }\n \n //single-focus-flip and block exchange mutations\n for (int i = 0 ; i < popsize-1 ; i++){\n if (crossprob > rnd.nextInt(100)){\n int temp; \n for (int a = 0 ; a < 5 ; a++){\n temp = population2[i][a];\n population2[i][a] = population2[i+1][a];\n population2[i+1][a] = temp;\n }\n }\n }\n \n for (int i = 0 ; i < popsize ; i++){\n if (mutaprob > rnd.nextInt(200)){\n int temp = (int) (rnd.nextInt(population2[0].length)); \n population2[i][temp] = (int)(rnd.nextInt(4));\n }\n else if (mutaprob > rnd.nextInt(200)){\n for (int j = 0 ; j < population2[0].length/2 ; j++){\n int temp = population2[i][j];\n population2[i][j] = population2[i][population2[0].length-1-j];\n population2[i][population2[0].length-1-j] = temp;\n }\n }\n }\n \n population = population2;\n population2 = new int[popsize][population[0].length];\n \n }\n \n bestavg = bestavg / maxgen;\n avgavg = avgavg / maxgen;\n Print(population);\n System.out.println(\"Best Avg: \" + bestavg + \" Average of Avg: \" + avgavg);\n }", "@SuppressWarnings({ \"unchecked\", \"deprecation\" })\n\tprivate static NeuralNetwork crossover(NeuralNetwork cross, NeuralNetwork over, Singleton s1) throws IOException, ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {\n\t\tEvolveSingleton s = (EvolveSingleton) s1;\n\t\t//determines which of the two networks was more fit and less fit\n\t\tClass<? extends NeuralNetwork> networkClass = (Class<? extends NeuralNetwork>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Network\");\n\t\tClass<? extends Layer> layerClass = (Class<? extends Layer>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Layer\");\n\t\tClass<? extends Neuron> neuronClass = (Class<? extends Neuron>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Neuron\");\n\t\tNeuralNetwork newnn = null;\n\t\tNeuralNetwork lessfit = null;\n\t\tNeuralNetwork morefit = null;\n\t\tif (cross.getFitness() > over.getFitness()){\n\t\t\tmorefit = cross;\n\t\t\tlessfit = over;\n\t\t}\n\t\telse{\n\t\t\tmorefit = over;\n\t\t\tlessfit = cross;\n\t\t}\n\t\t//creates the structure for the new network\n\t\tLayer[] puts = NetworkCreator.creator(s);\n\t\tClass<?>[] types2 = {Class.forName(\"BackEvolution.Layer\"),Class.forName(\"BackEvolution.Layer\")};\n\t\tConstructor<? extends NeuralNetwork> con2 = networkClass.getConstructor(types2);\n\t\tClass<? extends SpecialCreator> managerClass = (Class<? extends SpecialCreator>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Creator\");\n\t\tSpecialCreator manager = managerClass.newInstance();\n\t\tmanager.InputOutputcreator(puts);\n\t\tnewnn = con2.newInstance(puts[0],puts[1]);\n\t\tNetworkCreator.Neuraltracker(newnn);\n\t\t//pretty sure this is obsolete from when i tried to breed different layered networks but not sure if I can delete.\n\t\tArrayList<Layer> lesslayers = lessfit.getLayers();\n\t\tArrayList<Layer> morelayers = morefit.getLayers();\n\t\tint maxlayers = 1;\n\t\tif (lesslayers.size() > morelayers.size()){\n\t\t\tmaxlayers = lesslayers.size();\n\t\t}\n\t\telse { \n\t\t\tmaxlayers = morelayers.size();\n\t\t}\n\t\t//adds the neuron to each layer based on which network had the most neurons in that layer\n\t\tfor (int i = 1; i < maxlayers-1; i++){\n\t\t\tLayer lesslayer = null;\n\t\t\tLayer morelayer = null;\n\t\t\tint lessnum = 0;\n\t\t\tint morenum = 0;\n\t\t\ttry{\n\t\t\tlesslayer = lesslayers.get(i);\n\t\t\tlessnum = lesslayer.getNeurons().size();\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tmorelayer = morelayers.get(i);\n\t\t\t\tmorenum = morelayer.getNeurons().size();\n\t\t\t}\n\t\t\ttry{\n\t\t\tmorelayer = morelayers.get(i);\n\t\t\tmorenum = morelayer.getNeurons().size();\n\t\t\t}\n\t\t\tcatch (Exception e){\n\t\t\t}\n\t\t\tif (morelayer == null) morenum = 0;\n\t\t\telse if (morelayer.isOutput()){\n\t\t\t\tmorenum = 0;\n\t\t\t}\n\t\t\tif (lesslayer == null) lessnum = 0;\n\t\t\telse if (lesslayer.isOutput()){\n\t\t\t\tlessnum = 0;\n\t\t\t}\n\t\t\tClass<?>[] types = {boolean.class,boolean.class};\n\t\t\tConstructor<? extends Layer> con = layerClass.getConstructor(types);\n\t\t\tLayer newl = con.newInstance(false, false);\n\t\t\tnewnn.addLayer(newl);\n\t\t\tnewl.setNumber(newnn.getLayers().size()-1);\n\t\t\tfor (int j = 0; j < morenum || j < lessnum; j++){\n\t\t\t\tNeuron newn = neuronClass.newInstance();\n\t\t\t\tnewl.addNeuron(newn);\n\t\t\t\tnewn.setLayernumber(newl.getNumber());\n\t\t\t\tnewn.setNumber(newl.getNeurons().size()-1);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <=lesslayers.size(); i++){\n\t\t\tLayer l = lesslayers.get(i-1);\n\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\tn.setLayernumber(i);\n\t\t\t\t\n\t\t\t}\n\t\t\tl.setNumber(i);\n\t\t}\n\t\tfor (int i = 1; i <=morelayers.size(); i++){\n\t\t\tLayer l = lesslayers.get(i-1);\n\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\tn.setLayernumber(i);\n\t\t\t\t\n\t\t\t}\n\t\t\tl.setNumber(i);\t\n\t\t}\n\t\t//adds genes to the structure. if the same conection exists in the more fit network, it gets preference over the less fit network. if one or the other does not have this gene at all it gets added. currently more fit is always selected may add random chance that the less fit networks gene is selected.\n\t\t//gets all the data from the more fit layer.\n\t\tArrayList<double[]> geneIdentities = new ArrayList<double[]>();\n\t\tfor(Layer l : morelayers){\t\t\n\t\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\t\tfor(Gene g : n.getGenes()){\n\t\t\t\t\t\tdouble data[] = new double[5];\n\t\t\t\t\t\tdata[0] = l.getNumber();\n\t\t\t\t\t\tdata[1] = n.getNumber();\n\t\t\t\t\t\tdata[2] = g.getConnection().getNumber();\n\t\t\t\t\t\tif (morelayers.get(g.getConnection().getLayernumber()-1).isOutput()) data[3] = maxlayers;\n\t\t\t\t\t\telse data[3] = g.getConnection().getLayernumber();\n\t\t\t\t\t\tdata[4] = g.getWeight();\n\t\t\t\t\t\tgeneIdentities.add(data);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t}\n\t\t//gets all the gene data from the less fit layer.\n\t\tArrayList<double[]> geneIdentities2 = new ArrayList<double[]>();\n\t\tfor(Layer l : lesslayers){\n\t\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\t\tfor(Gene g : n.getGenes()){\n\t\t\t\t\t\tdouble data[] = new double[5];\n\t\t\t\t\t\tdata[0] = l.getNumber();\n\t\t\t\t\t\tdata[1] = n.getNumber();\n\t\t\t\t\t\tdata[2] = g.getConnection().getNumber();\n\t\t\t\t\t\tif (lesslayers.get(g.getConnection().getLayernumber()-1).isOutput()) data[3] = maxlayers;\n\t\t\t\t\t\telse data[3] = g.getConnection().getLayernumber();\n\t\t\t\t\t\tdata[4] = g.getWeight();\n\t\t\t\t\t\tgeneIdentities2.add(data);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\n\t\t}\n\t\t//if two genes connect the same neuron, it averages the weights of them and removes one leaving the other with the average weight\n\t\tfor (double[] nums : geneIdentities){\n\t\t\tfor (int i = 0; i < geneIdentities2.size(); i++){\n\t\t\t\tdouble[] nums2 = geneIdentities2.get(i);\n\t\t\t\tif (nums[0] == nums2[0] && nums[1] == nums2[1] && nums[2] == nums2[2] && nums[3] == nums2[3]){\n\t\t\t\t\tnums[4] = (nums[4] + nums2[4])/2;\n\t\t\t\t\tgeneIdentities2.remove(nums2);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//adds the new genes to the new neural network based on the gene data.\n\t\tfor(double[] nums : geneIdentities){\t\t\n\t\t\tGene newGene = new Gene(newnn.getLayers().get((int) nums[3]-1).getNeurons().get((int) nums[2]-1), nums[4]);\n\t\t\tNeuron newNeuron = newnn.getLayers().get((int) (nums[0]-1)).getNeurons().get((int) nums[1]-1);\n\t\t\tnewNeuron.AddGenes(newGene);\n\t\t\tnewGene.setInput(newNeuron);\t\t\t\n\t\t}\n\t\tfor(double[] nums : geneIdentities2){\t\t\t\n\t\t\tGene newGene = new Gene(newnn.getLayers().get((int) nums[3]-1).getNeurons().get((int) nums[2]-1), nums[4]);\n\t\t\tNeuron newNeuron = newnn.getLayers().get((int) (nums[0]-1)).getNeurons().get((int) nums[1]-1);\n\t\t\tnewNeuron.AddGenes(newGene);\n\t\t\tnewGene.setInput(newNeuron);\n\t\t}\n\t\t//returns mutated bred network\n\t\treturn mutate(newnn,s);\n\t}", "private void crossProduct() {\n BaseCandidateElement[] it = o.inputObject.firstStageCandidates.values().toArray(new BaseCandidateElement[0]);\n // logger.info(Arrays.toString(it));\n for (int i = 0; i < it.length; i++) {\n for (int j = i + 1; j < it.length; j++) {\n if (PrecisConfigProperties.HIERARCHY_DIMS_ENABLED && hierarchyDimsNegation.checkIfBelongToSameHierarchyGroup(it[i], it[j]))\n continue;\n if (it[i].xor(it[j]).cardinality() == 4) {\n BitSet b = it[i].or(it[j]);\n o.inputObject.addCandidate(b);\n }\n }\n }\n }", "public void tournamentWithElitism(){\n\t\tEvolvable spring[] = new Evolvable[populationSize];\n\t\t\n\t\t//elite individuals go directly to new population\n\t\tfor (int i = 0; i < SNSLearningAgent.elitism; i++){\n\t\t\tspring[i] = population[i];\t\n\t\t}\n\t\t\n\t\t//other individuals are selected via tournament\n\t\tfor (int i = SNSLearningAgent.elitism; i < populationSize; i+=2) {\n\t\t\t//parents selected via tournament\n\t\t\tint p1 = tournament(SNSLearningAgent.tournamentSize);\t\n\t\t\tint p2 = tournament(SNSLearningAgent.tournamentSize);\n\t\t\twhile(p1 == p2)\tp2 = tournament(SNSLearningAgent.tournamentSize);\n\t\t\t\n\t\t\t//performs crossover if probability is matched\n\t\t\tif(R.nextFloat() < SNSLearningAgent.crossoverProb){\n\t\t\t\tif (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\t\tint point = R.nextInt(SNSAgent.DNA_LENGTH);\n\t\t\t\t\t\n\t\t\t\t\tspring[i] = cross(population[p1], population[p2], point);\n\t\t\t\t\tif (i+1 < populationSize) spring[i+1] = cross(population[p2], population[p1], point);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tspring[i] = cross(population[p1], population[p2]);\n\t\t\t\t\tif (i+1 < populationSize) spring[i+1] = cross(population[p2], population[p1]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tspring[i] = population[p1];\n\t\t\t\tif (i+1 < populationSize) spring[i+1] = population[p2];\n\t\t\t}\n\t\t\t\n\t\t\t//performs mutation if probability is reached\n\t\t\tif(R.nextFloat() < SNSLearningAgent.mutationProb){\n\t\t\t\tspring[i].mutate();\n\t\t\t}\n\t\t\tif(i+1 < populationSize && R.nextFloat() < SNSLearningAgent.mutationProb){\n\t\t\t\tspring[i+1].mutate();\n\t\t\t}\n\t }\n\t\t\n\t\t//replaces old population with the new one\n\t\tfor(int i = 1; i < populationSize; i++) {\n\t\t\tpopulation[i] = spring[i];\n\t\t}\n\t}", "public StrategyByGA(double ProbabilityOfCooperatingGivenCooperation,\n double ProbabilityOfCooperatingGivenDefection) {\n\n name = \"Strategy Developed by the Genetic Algorithm\";\n opponentLastMove = 1;\n proCoopGivCoop = ProbabilityOfCooperatingGivenCooperation;\n proCoopGivDef = ProbabilityOfCooperatingGivenDefection;\n }", "void EvolutionWithElitism(){\n\t\t \tint i, j, l, k;\n\t\t\t//individual[] temp;\n\t\t\tbyte _flippc=0,_flippm=0;\n//\t\t\tString _temp1=\"\", _temp2=\"\";\n\t\t\tint[] _cp;\n\t\t\tnode[] _nd,_nm;\n\t\t\t// Khoi tao quan the dau tien \n\t\t\tRampedInit(6, 0.5);\n\t\t\t//RampedInitOffLine(6, 0.5,15);\n\t\t\t\n//\t\t\tconstructiveRate = new double[NUMGEN];\n//\t\t\tsemanticDistance = new double[NUMGEN];\n\t\t\t\n\t\t\tgen = 0;\n\t\t\twhile(gen < generation) {\n\t\t\t\t\n\t\t\t\tComputeFitness();\n\t\t\t\t\n//\t\t\t\tint g_ncross = 0;\n//\t\t\t\tdouble g_sd = 0;\n//\t\t\t\tPrintToFile();\n\t//----------------------\n//\t\t\t\tFileInputStream instream = null;\n//\t\t\t\tPrintStream outstream = null;\n//\t\t\t\tPrintStream console = System.out;\n//\t\t\t\ttry {\n//\t\t\t\t\toutstream = new PrintStream(new FileOutputStream(\"c:/result/\" + \"detail_\"+ gen + \".txt\"));\n//\t\t\t\t\tSystem.setOut(outstream);\n//\t\t\t\t} catch(Exception e) {\n//\t\t\t\t\tSystem.err.println(\"Error Occurred.\");\n//\t\t\t\t}\n//\t\t\t\tfor(i = 0; i < poplen; i++) {\n//\t\t\t\t\tSystem.out.printf(\"%3.5f \",oldpop[i].fitness);\n//\t\t\t\t\tif((i+1) % 10 == 0) {\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tfor(int ii = 0; ii < poplen; ii++) {\t\t\t\n//\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t_temp1=oldpop[ii].chrom.TreeToStringN(oldpop[ii].chrom);\n//\t\t\t\t\tSystem.out.printf(\"%s\",ii+\" \"+ _temp1);\t\t\t\n//\t\t\t\t\tSystem.out.println();\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// copy anh tot nhat sang the he sau\t \t\n\t\t\t\tnewpop[0].CopyIndividual(bestcurrent[gen], TRUE);\n\t\t\t\t// dot bien anh thu 2\n\t\t\t \n\t\t\t\tl=1;\t\n\t\t\t\ti = TourSelect(TOURSIZE);\n//\t\t\t\t\n\t\t\t\t\n\t\t\t newpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\tindividual[] m_individual0=new individual[1];\n\t\t\t\tint[] _mt0=new int[1];\n\t\t\t\t_nm=new node[1];\n\t\t\t\tthis.ReplaceSubTree(newpop[l], m_individual0, 15, TRUE,_mt0,_nm);\n\t\t\t\tnewpop[l]=new individual();\n\t\t\t\tnewpop[l].CopyIndividual(m_individual0[0], TRUE);\t\t\t\n\t\t\t\tnewpop[l].evaluated=FALSE;\t\t\n//\t\t\t\t\n//\t\t\t\tm_individual0=null;\n\t\t\t\t\n\t//------------------------\t\t\n\t\t\t\tl = 2;\t\t\t\n\t\t\t\twhile(l < poplen) {\n\t\t\t\t//\tSystem.out.println(\"Generation \"+ String.valueOf(gen)+\":\");\n\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\n\t\t\t\t\ti = TourSelect(TOURSIZE);\n\t\t\t\t\tj = TourSelect(TOURSIZE);\n\t\t\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t _flippc=Flip(pcross);\n//\t\t\t\t System.out.printf(\"pcross:%d\", _flippc);\n//\t\t\t\t System.out.println();\n\t\t\t\t\tif(_flippc == 1) {\t\t\t\t\t\n\t\t\t\t\t\tindividual[] i_temp=new individual[2];\n\t\t\t\t\t\t_cp=new int[2];\n\t\t\t\t\t\t_nd=new node[2];\n\t\t\t\t//\t\n\t\t\t\t//\t\tif(SubTreeSwapWithTTest(oldpop[i], oldpop[j], i_temp,_cp,_nd) == TRUE)\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(SubTreeSwap(oldpop[i], oldpop[j], i_temp,_cp,_nd) == TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewpop[l].CopyIndividual(i_temp[0],TRUE);\n\t\t\t\t\t\t\tnewpop[l+1].CopyIndividual(i_temp[1],TRUE);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewpop[l].evaluated=FALSE;\n\t\t\t\t\t\t\tnewpop[l+1].evaluated=FALSE;\n//\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tncross++;\n\t\t\t\t\t\t\ti_temp=null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// semantic distance\n//\t\t\t\t\t\t\tg_sd += newpop[l].getSemanticDistance(oldpop[i]);\n//\t\t\t\t\t\t\tg_sd += newpop[l+1].getSemanticDistance(oldpop[j]);\t\t\t\t\t\n//\t\t\t\t\t\t\tg_ncross++;\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tg_sd += oldpop[i].getSemanticDistance(oldpop[j]);\t\t\t\t\t\n//\t\t\t\t\t\t\tg_ncross++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\t\t\t\tnewpop[l + 1].CopyIndividual(oldpop[j],TRUE);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\",\"reproduction\");\n//\t\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\ti_temp=null;\n\t\t\t\t\t\t} \n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnewpop[l].CopyIndividual(oldpop[i], TRUE);\n\t\t\t\t\t\tnewpop[l + 1].CopyIndividual(oldpop[j],TRUE);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"reproduction\");\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// mutation test\n\t\t\t\t\t_flippm=Flip(pmutate);\n//\t\t\t\t\tSystem.out.printf(\"pmutation:%d\", _flippm);\n//\t\t\t\t System.out.println();\n\t\t\t\t\tif(_flippm == 1) {\t\t\t\t\t\n\t\t\t\t\t\tindividual[] m_individual=new individual[1];\n\t\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\tthis.ReplaceSubTree(newpop[l], m_individual, 15, TRUE,_mt,_nm);\n\t\t\t\t\t\tnewpop[l]=new individual();\n\t\t\t\t\t\tnewpop[l].CopyIndividual(m_individual[0], TRUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewpop[l].evaluated=FALSE;\n\t\t\t\t\t\t\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"mutation \"+l+\" replacepoint:\"+_mt[0]);\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(_nm[0]);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\t\t\t\t\t\n\t\t\t\t\t\tnmutate++;\n\t\t\t\t\t\tm_individual=null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n//\t\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t\t_temp1=newpop[l].chrom.TreeToStringN(newpop[l].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp1);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(Flip(pmutate) == 1) {\n\t\t\t\t\t\tindividual[] m_individual1=new individual[1];\n\t\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\tthis.ReplaceSubTree(newpop[l + 1], m_individual1, 15, TRUE,_mt,_nm);\n\t\t\t\t\t\tnewpop[l+1]=new individual();\n\t\t\t\t\t\tnewpop[l+1].CopyIndividual(m_individual1[0], TRUE);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewpop[l+1].evaluated=FALSE;\n//\t\t\t\t\t\tSystem.out.printf(\"%s\",\"mutation \"+(l+1)+\" replacepoint:\"+_mt[0]);\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(_nm[0]);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tnmutate++;\n\t\t\t\t\t\tm_individual1=null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n//\t\t\t\t\t\t_temp2=\"\";\n//\t\t\t\t\t\t_temp2=newpop[l+1].chrom.TreeToStringN(newpop[l+1].chrom);\n//\t\t\t\t\t\tSystem.out.printf(\"%s\", _temp2);\t\t\t\n//\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\tl += 2;\n\t\t\t\t}\n//\t\t\t\tfor(int ii = 0; ii < poplen; ii++) {\t\t\t\n//\t\t\t\t\t_temp1=\"\";\n//\t\t\t\t\t_temp1=oldpop[ii].chrom.TreeToStringN(newpop[ii].chrom);\n//\t\t\t\t\tSystem.out.printf(\"%s\",ii+\" \"+ _temp1);\t\t\t\n//\t\t\t\t\tSystem.out.println();\n//\t\t\t\t}\n//\t\t\t\toutstream.close();\n//\t\t\t\tSystem.setOut(console);\n\t\t\t\t// Thống kê tỷ lệ tTest\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t//\t\t\tsemanticDistance[gen] = g_sd / (2.0 * g_ncross);\n//\t\t\t\tsemanticDistance[gen] = g_sd /g_ncross;\n\t\t\t\t\n\t\t\t\tgen++;\n\t\t\t\tfor(k = 0; k < poplen; k++)\n\t\t\t\t{\n\t\t\t\t\toldpop[k]=null;\n\t\t\t\t\toldpop[k]=new individual();\n\t\t\t\t\toldpop[k].CopyIndividual(newpop[k], TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "Chromosome fittestChromosome();", "Tour crossOver(Tour p2, int x1, int x2) {\r\n\t\t// make an empty tour and then fill it in\r\n\t\tTour child = new Tour();\r\n\r\n\t\t// copy the 1st segment of (this) to the child\r\n\t\tfor (int i = 0; i < x1; i++) {\r\n\t\t child.index[i] = this.index[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = x1; i <= x2; i++) {\r\n\t\t child.index[i] = p2.index[i];\r\n\t\t}\r\n\t\t// copy the cross-over portion of p2 to the child\r\n\t\t\r\n for (int i = x2 + 1; i < index.length; i++) {\r\n child.index[i] = this.index[i];\r\n }\t\t\r\n\t\t// copy the last segment of (this) to the child\r\n\r\n\t\t// Now we need to correct the child for any duplicate cities\r\n\t\t\r\n\t\t// First find out the unique elements of the cross-over segment\r\n\t\t// i.e., those elements of the cross-over segment of\r\n\t\t// p1 that are not in p2\r\n\t\tint[] uniq = new int[x2 - x1 + 1];\r\n\t\tint k = 0;\r\n\t\tboolean found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = x1; j <= x2; j++) {\r\n if (this.index[i] == p2.index[j]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n uniq[k] = this.index[i];\r\n k++;\r\n }\r\n System.out.println();\r\n\t\t// *** TODO ***\r\n \r\n k--;\r\n found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = 0; j < x1; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n found = true;\r\n break;\r\n }\r\n }\r\n \r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n \r\n for (int j = x2 + 1; j < index.length; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n break;\r\n }\r\n }\r\n }\r\n\t\t// scan the two portions of p1 that have been crossed into the\r\n\t\t// the child for any duplicates in the crossed-over \r\n\t\t// segment and if so replace with an element from the uniq list\r\n\t\t\r\n\t\tchild.distance = child.distance();\r\n\t\treturn child;\r\n\t}", "private void coins_a2G(){\n\t\tthis.cube[31] = this.cube[11]; \n\t\tthis.cube[11] = this.cube[2];\n\t\tthis.cube[2] = this.cube[38];\n\t\tthis.cube[38] = this.cube[47];\n\t\tthis.cube[47] = this.cube[31];\n\t}", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public void fitnessFunction()\n\t{\n\t\t\n\t}", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "public void mutate() {\n if (this.offspring != null) {\n for (int i = 0; i < this.offspring.size(); i++) {\n\n if (Defines.probMutate > Math.random()) {\n // OK, choose two genes to switch\n int nGene1 = Defines.randNum(0, Defines.chromosomeSize - 1);\n int nGene2 = nGene1;\n // Make sure gene2 is not the same gene as gene1\n while (nGene2 == nGene1) {\n nGene2 = Defines.randNum(0, Defines.chromosomeSize - 1);\n }\n\n // Switch two genes\n String temp = this.offspring.get(i).getGene(nGene1);\n\n this.offspring.get(i).setGene(nGene1, this.offspring.get(i).getGene(nGene2));\n this.offspring.get(i).setGene(nGene2, temp);\n }\n // Regenerate the chromosome\n ChromosomeGenerator chromoGen = new ChromosomeGenerator();\n chromoGen.update(this.offspring.get(i));\n }\n\n }\n\n }", "public Individual crossover(Individual parentB)\r\n\t{\r\n\t\tIndividual ind = new Individual(intSize, intCount, signedInt);\r\n\r\n\t\t// Copy over genes randomly\r\n\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t{\r\n\t\t\tboolean parentA = Math.random() >= 0.5;\r\n\t\t\tind.binary[i] = parentA ? binary[i] : parentB.binary[i];\r\n\t\t}\r\n\r\n\t\treturn ind;\r\n\t}", "public void crossEdge(Edge e) {}", "public void crossover(){\n \t\n \t//int cut2 = ((NODELENGTH * 3 + 1) / 3) + cut;\n \tfor (int g = 0; g < (wallpapers.size() - 1); g += 2){\n \t\tint cut = getCutPoint();\n \t\tint[] parent1 = wallpapers.get(g);\n \t\tint[] parent2 = wallpapers.get(g + 1);\n \t\t\n \t\tint[] child1 = new int[parent1.length];\n \t\tint[] child2 = new int[parent2.length];\n \t\tfor (int i = 0; i < (cut); i++){\n \t\t\tchild1[i] = parent1[i];\n \t\t\tchild2[i] = parent2[i];\n \t\t}\n \t\tfor (int j = cut; j < parent1.length; j++){\n \t\t\tchild1[j] = parent2[j];\n \t\t\tchild2[j] = parent1[j];\n \t\t}\n \t\t\n \t\t\n \t\twallpapers.set(g, child1);\n \t\twallpapers.set(g + 1, child2);\n \t}\n \tfor (int d = 0; d < (wallpapers.size() * 2); d++){\n \t\tif (d < wallpapers.size()){\n \t\t\ttemp_wallpapers.add(wallpapers.get(d));\n \t\t}\n \t\telse {\n \t\t\ttemp_wallpapers.add(node());\n \t\t}\n \t}\n \twallpapers.clear();\n \tfor (int u = 0; u < temp_wallpapers.size(); u++){\n\t\t\twallpapers.add(u, temp_wallpapers.get(u));\n\t\t}\n \ttemp_wallpapers.clear();\n }", "public void runGeneticAlgo() {\n\t\tint offspringLimit = (int)(OFFSPRING_POOL_LIMIT * geneNumber);\n\t\tint factor = (int) Math.pow(10, String.valueOf(offspringLimit).length() - 1);\n\t\twhile(offspringPool.size() < offspringLimit) {\n\t\t\trunTournament();\n\t\t\tif(offspringPool.size() % factor == 0) {\n\t\t\t\tSystem.out.println(\"Finished \" + offspringPool.size() + \" tournaments\");\n\t\t\t}\n\t\t}\n\t\tsortPool();\n\t\tArrayList<Gene> newGenepool = new ArrayList<Gene>(genepool.subList(0, geneNumber - offspringLimit));\n\t\tnewGenepool.addAll(offspringPool);\n\t\tgenepool = newGenepool;\n\t\toffspringPool = new ArrayList<Gene>();\n\t}", "public interface Population {\n public List<Individual> selectRandomIndividuals(int n, boolean withReplacement);\n\n public void evaluateFitnesses();\n\n public Individual crossoverOnePoint(Individual a, Individual b);\n\n public Individual crossoverTwoPoint(Individual a, Individual b);\n\n public Individual crossoverUniform(Individual a, Individual b);\n\n public void evolveMuLambda(int numParents, int numChildren, double mean, double variance);\n\n public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double mutationRate);\n\n public void evolveGeneticAlgorithm();\n\n public void saveIndividualsAsPlayersInDb();\n\n public void addListener(EvolutionCompleteListener listener);\n\n}", "public static Tour[] partiallyMatchedCrossover(Tour parent1, Tour parent2){\n Tour child1 = new Tour(false);\n child1.getTour().addAll(parent1.getTour());\n // Remove the end city in the cycle\n child1.getTour().remove(child1.getLength()-1);\n // Start with the parent genotypes\n Tour child2 = new Tour(false);\n child2.getTour().addAll(parent2.getTour());\n child2.getTour().remove(child2.getLength()-1);\n // Return the parents unchanged as offspring if crossover rate not met or clones\n if((parent1 == parent2) || Math.random() > RunGA.crossoverRate){\n return new Tour[]{parent1, parent2};\n } else{\n int start = (int)(Math.random()*child1.getLength());\n int end = (int)(Math.random()*child1.getLength());\n if(start > end){\n int temp = start;\n start = end;\n end = temp;\n }\n // Swap the cities between the start and end indeces to the corresponding indeces in other parent\n for(int i=start; i<=end; i++){\n // Find index of the each city to be swapped in the genotype\n int swapIndex1 = child1.getTour().indexOf(parent2.getTour().get(i));\n int swapIndex2 = child2.getTour().indexOf(parent1.getTour().get(i));\n City temp1 = child1.getTour().get(i);\n City temp2 = child2.getTour().get(i);\n child1.getTour().set(i, parent2.getTour().get(i));\n child2.getTour().set(i, parent1.getTour().get(i));\n child1.getTour().set(swapIndex1, temp1);\n child2.getTour().set(swapIndex2, temp2);\n }\n // Reform cycle\n child1.getTour().add(child1.getTour().get(0));\n child2.getTour().add(child2.getTour().get(0));\n }\n Tour[] children = new Tour[]{child1, child2};\n return children;\n }", "public void calcObjective() {\n double obj;\n double objectives[];\n\n for (int i = 0; i < population.getPopulationSize(); i++) { //300\n objectives = population.getObjectiveValues(i);\n obj = evaluateAll(population.getSingleChromosome(i)); //evaluateAll(chromosome chromosome1)\n objectives[indexOfObjective] = obj;\n population.setObjectiveValue(i, objectives);\n }\n }", "public interface GAIndividual\r\n{\r\n public void mutate(double rate);\r\n public GAIndividual directReproduce();\r\n public GAIndividual reproduce( GAIndividual i );\r\n \r\n public int getFitness();\r\n public void setFitness ( int fitness );\r\n public void setRoulette (int start, int finish);\r\n public boolean hasRouletteNumber (int winner);\r\n public String toString();\r\n}", "private Evolvable cross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tint split = R.nextInt(7) + 1;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint split = R.nextInt(1000) + 100;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, R.nextInt(3000));\n\t\t\t}\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t{\n\t\t\t\tsplit = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }", "public static void main(String[] args) throws IOException {\n\n\t\t//initialise our cities with the distances to the other cities to set everything up for our algorithm\n\t\tArrayList<City> cities = new ArrayList<>();\n\t\tint cityid = 0;\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(0, 41, 26, 31, 27, 35))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(41, 0, 29, 32, 40, 33))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(26, 29, 0, 25, 34, 42))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(31, 32, 25, 0, 28, 34))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(27, 40, 34, 28, 0, 36))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(35, 33, 42, 34, 36, 0))));\n\n\t\t//delete old output file\n\t\tnew File(\"output.txt\").delete();\n\n\t\t//run the genetic algorithm\n\t\trunGeneticAlgorithm(cities);\n\n\t}", "public static void main(String[] args)\n\t{\tint generation = 0;\n\t\tint sum = 0;\n\t\tExecutor exec=new Executor();\n\t\t\n\t\tGeneticController pacman = new GeneticController();\n\t\tController<EnumMap<GHOST,MOVE>> ghosts = new Legacy();\n\n\n\t\tLispStatements ls = new LispStatements();\n\t\tArrayList<String> functionSet = new ArrayList<>();\n\t\tfunctionSet.add(\"2ifblue\");\n\t\tfunctionSet.add(\"4ifle\");\n\t\tfunctionSet.add(\"2ifindanger\");\n\t\tfunctionSet.add(\"2ifpowerpillscleared\");\n\t\tfunctionSet.add(\"2istopowersafe\");\n\t\tArrayList<String> terminalSet = new ArrayList<>();\n\t\tterminalSet.add(\"distToPill\");\n\t\tterminalSet.add(\"distToPower\");\n\t\tterminalSet.add(\"distGhost\");\n\t\tterminalSet.add(\"distTo2ndGhost\");\n\t\tterminalSet.add(\"distTo3rdGhost\");\n\t\tterminalSet.add(\"distToEdibleGhost\");\n\t\tterminalSet.add(\"distToNonEdibleGhost\");\n\t\tterminalSet.add(\"moveToFood\");\n\t\tterminalSet.add(\"moveToPower\");\n\t\tterminalSet.add(\"moveToEdibleGhost\");\n\t\tterminalSet.add(\"moveFromNonEdibleGhost\");\n\t\tterminalSet.add(\"moveFromPower\");\n\t\tterminalSet.add(\"runaway\");\n\t\ttry {\n\t\t\tls.setFunctionalSet(functionSet);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\t\tls.setTerminalSet(terminalSet);\n\t\ttry {\n\t\t\tGenetic.Executor.setUp(pacman, ls, 8);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\n\t\tdouble average = 0;\n\n\t\twhile (generation < 51) {\n\t\t\twhile (Generation.isGenFinished()) {\n\n\t\t\t\t\tfor(int i = 0; i < 10; i++) {\n\t\t\t\t\t\tint delay = 0;\n\t\t\t\t\t\tboolean visual = false;\n\t\t\t\t\t\tsum += exec.runGame(pacman, ghosts, visual, delay);\n\t\t\t\t\t}\n\n\t\t\t\t\tGeneration.setFitness(50000 - (sum/10));\n\t\t\t\t\tSystem.out.println(sum/10);\n\n\n\t\t\t\t\tsum = 0;\n\n\t\t\t\tGeneration.pointerUpdate();\n\t\t\t}\n\t\t\tSystem.out.println(\"Generation \" + generation);\n\t\t\tGenetic.Executor.newGen();\n\t\t\tSystem.out.println(Generation.getBestRating());\n\t\t\tgeneration ++;\n\t\t}\n\n\t\tSystem.out.println(Generation.getBestTree());\n\t\tSystem.out.println(Generation.getBestRating());\n\n\n\n/*\n\t\tboolean visual=false;\n\t\tString fileName=\"results/replay10.txt\";\n\n\t\tint bestScore = 0;\n\t\tint result = 0;\n\t\tint average = 0;\n\t\tfor(int i = 0; i < 1000 ; i++) {\n\t\t\tresult = exec.runGameTimedRecorded(pacman, ghosts, visual, fileName, bestScore);\n\t\t\taverage +=result;\n\t\t\tif(result > bestScore){\n\t\t\t\tbestScore = result;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tvisual = true;\n\t\tSystem.out.println(average/1000.0);\n\t\texec.replayGame(fileName,visual);\n\t\t*/\n\n\n\t}", "public void Grasshopper(){\n this.hops = 2;\n this.hopLim = 3;\n }", "public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}", "public GCross(double size) {\n\t\t// Your code starts here\n\t\t\n\t\t// Your code ends here\n\t}", "default void process_crosslinks(MutableBeaconState state) {\n state.getPreviousCrosslinks().replaceAll(state.getCurrentCrosslinks().listCopy());\n\n for (EpochNumber epoch : get_previous_epoch(state).iterateTo(get_current_epoch(state).increment())) {\n for (UInt64 offset : UInt64s.iterate(UInt64.ZERO, get_epoch_committee_count(state, epoch))) {\n ShardNumber shard = get_epoch_start_shard(state, epoch)\n .plusModulo(offset, getConstants().getShardCount());\n List<ValidatorIndex> crosslink_committee = get_crosslink_committee(state, epoch, shard);\n Pair<Crosslink, List<ValidatorIndex>> winner =\n get_winning_crosslink_and_attesting_indices(state, epoch, shard);\n Crosslink winning_crosslink = winner.getValue0();\n List<ValidatorIndex> attesting_indices = winner.getValue1();\n if (get_total_balance(state, attesting_indices).times(3)\n .greaterEqual(get_total_balance(state, crosslink_committee).times(2))) {\n state.getCurrentCrosslinks().set(shard, winning_crosslink);\n }\n };\n }\n }", "IVec3 cross(IVec3 v);", "public interface ISpecimenCrossover {\n\n StrategySpecimen doCrossover(StrategySpecimen specimen1, StrategySpecimen specimen2);\n}", "private void rouletteSelection() {\n parentChromosomes = new Chromosome[2];\n parentIndices = new int[2];\n Arrays.fill(parentChromosomes, null);\n parentIndices[0] = getFittestChromosomeIndex();\n parentChromosomes[0] = chromosomes[parentIndices[0]];\n parentIndices[1] = getFittestChromosomeIndex();\n parentChromosomes[1] = chromosomes[parentIndices[1]];\n System.out.println(\"Individuals selected from Roulette Wheel for crossover: \\n\" +\n Arrays.toString(parentChromosomes[0].getGenes()) + \"\\n\" +\n Arrays.toString(parentChromosomes[1].getGenes()));\n }", "public int randomGene();", "void generate() {\n rouletteSelection();\n do {\n updateParents();\n crossover();\n mutation();\n } while (!isValidOffset());\n insertOffspring();\n }", "public static void genocide() {\n //Assigns fitness levels\n evaluateFitnesses();\n\n //Sorts by fitness\n sortByFitlvl();\n\n //Simple genocide, kills off all until population size.\n for (int i = Population.size() - 1; i >= populationSize; i--) {\n Population.remove(i);\n }\n\n /*\n //Different kind of Genocide, selects organisms based on gaussian distribution\n\n while(Population.size() > populationSize){\n int randomOrganism = (int)(Population.size() - (Population.size()*Utilities.sharpGauss(2)));\n Population.remove(randomOrganism);\n }\n */\n }", "public static double[] binomialCrossover(double[] populationIndividual, double[] mutantIndividual, double crossoverRate, int problemDimensionality)\n\t{\n\t\tint problemDimension = problemDimensionality; // Store the dimensionality of the problem domain\n\t\tint randomIndex = RandUtils.randomInteger(problemDimension - 1); // Generate a random index sampled from the range of [0, n]\n\t\t\n\t\tdouble[] offspringSolution = new double[problemDimension]; // Initialise the offspring solution variable\n\t\t\n\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t{\n\t\t\tif (RandUtils.random() < crossoverRate || i == randomIndex) // If the randomly generated number (within the range of [0, 1]) is smaller than the crossover rate or the increment counter is equal to the randomly generated index, do the following\n\t\t\t{\n\t\t\t\toffspringSolution[i] = mutantIndividual[i]; // Set the iterated design variable of the offspring solution (individual) to the iterated design variable of the mutated individual (solution)\n\t\t\t}\n\t\t\telse // Else if the randomly generated number is not smaller than the crossover rate or the increment counter is not equal to the randomly generated index, do the following\n\t\t\t{\n\t\t\t\toffspringSolution[i] = populationIndividual[i]; // Set the iterated design variable of the offspring solution to the iterated design variable of the original individual (solution)\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn offspringSolution; // Return the offspring solution\n\t}", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public float getProbCross () {\r\n return cross_prob;\r\n }", "public static void main(String[] args) {\n \n // Number of pairs of socks\n int nSocks=3;\n // Cost per pair of socks\n double sockCost$=2.58;\n \n // Number of drinking glasses\n int nGlasses=6;\n // Cost per glass\n double glassCost$=2.29;\n \n // Number of boxes of envelopes\n int nEnvelopes=1;\n // Cost per box of envelopes\n double envelopeCost$=3.25;\n double taxPercent=0.06;\n \n double totalSockCost$; // Total cost of socks\n double totalGlassCost$; // \n double totalEnvelopeCost$; // \n double costOfSocksBeforeTax, totalCostOfSocks1, totalCostOfSocks2, glassCost, sockCost;\n double costOfGlassesBeforeTax, totalCostOfGlasses1, totalCostOfGlasses2;\n double costOfEnvelopesBeforeTax, totalCostOfEnvelopes1, totalCostOfEnvelopes2, envelopeCost;\n double costBeforeTax, costAfterTax, glassesBeforeTax, envelopesBeforeTax, socksBeforeTax;\n \n socksBeforeTax=nSocks*sockCost$;\n glassesBeforeTax=nGlasses*glassCost$;\n envelopesBeforeTax=nEnvelopes*envelopeCost$;\n \n costOfSocksBeforeTax=nSocks*sockCost$;\n totalCostOfSocks1=costOfSocksBeforeTax*taxPercent;\n totalCostOfSocks2=costOfSocksBeforeTax-totalCostOfSocks1;\n \n costOfGlassesBeforeTax=nGlasses*glassCost$;\n totalCostOfGlasses1=costOfGlassesBeforeTax*taxPercent;\n totalCostOfGlasses2=costOfGlassesBeforeTax-totalCostOfGlasses1;\n \n costOfEnvelopesBeforeTax=nEnvelopes*envelopeCost$;\n totalCostOfEnvelopes1=costOfEnvelopesBeforeTax*taxPercent;\n totalCostOfEnvelopes2=costOfEnvelopesBeforeTax-totalCostOfEnvelopes1;\n \n costBeforeTax=costOfEnvelopesBeforeTax+costOfGlassesBeforeTax+costOfSocksBeforeTax;\n costAfterTax=totalCostOfEnvelopes2+totalCostOfGlasses2+totalCostOfSocks2;\n \n // printing out how many items you have\n System.out.println(\"Socks:\");\n System.out.println(\"Socks cost \"+sockCost$+\" each.\");\n System.out.println(\"Price after tax is \"+socksBeforeTax+\".\");\n System.out.println(\"We are buying \"+nSocks+\".\");\n System.out.println(\"Price before tax is \"+totalCostOfSocks2+\".\");\n \n System.out.println(\"Glasses:\");\n System.out.println(\"Glasses cost \"+glassCost$+\" each.\");\n System.out.println(\"We are buying \"+nGlasses+\" each.\");\n System.out.println(\"Price after tax is \"+glassesBeforeTax+\".\");\n System.out.println(\"Price before tax is \"+totalCostOfGlasses2+\".\");\n \n System.out.println(\"Envelopes:\");\n System.out.println(\"Envelopes cost \"+envelopeCost$+\" each.\");\n System.out.println(\"We are buying \"+nEnvelopes+\".\");\n System.out.println(\"Price after tax is \"+envelopesBeforeTax+\".\");\n System.out.println(\"Price before tax is \"+totalCostOfEnvelopes2+\".\");\n \n System.out.println(\"Total cost of everything after tax is \"+costBeforeTax+\".\");\n System.out.println(\"Total cost of everything before tax is \"+costAfterTax+\".\");\n \n\n }", "public static void compareGeneticGens(int points, int start, int end, int step) {\n List<Waypoint> waypoints;\n List<Waypoint> orderdWaypoints;\n System.out.println(\"==================================================\");\n System.out.println(\"Genetic TSP Generation Compare\");\n System.out.println(\"Number of Waypoints: \" + points);\n System.out.println(\"From \" + start + \" to \" + end + \" steps \" + step);\n System.out.println(\"==================================================\");\n System.out.println();\n waypoints = random.randomWaypoints(points);\n for (int curr = start; curr < end; curr += step) {\n System.out.println(\"Running TSP with \" + curr + \" Generations\");\n try {\n double time_tsp = System.currentTimeMillis();\n orderdWaypoints = TSP.geneticAlgoPara(waypoints, 25, curr, 0);\n time_tsp = (System.currentTimeMillis() - time_tsp) / 1000;\n FileWriter fstream;\n try {\n fstream = new FileWriter(\"Genetic_\" + curr + \".GPX\");\n BufferedWriter out = new BufferedWriter(fstream);\n out.write(GPXBuilder.build(orderdWaypoints, \"Genetic_\" + curr));\n out.close();\n } catch (IOException e) {\n System.out.println(\"Error writing GPX File\");\n }\n System.out.println(\"Path length: \" + distance.distanceList(orderdWaypoints));\n System.out.println(\"Generations:\" + curr + \" took \" + time_tsp + \" Secs\");\n System.out.println();\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n System.out.println();\n }\n }\n System.out.println();\n }", "public Genetic() {\r\n }", "public static void runGeneticAlgorithm(ArrayList<City> cities) throws IOException {\n\n\t\t//select our strategies for our genetic algorithm\n\t\tPopulationInitialiser initialiser = new RandomGeneration();//random generation of initial population as initialisation strategy\n\t\tPopulationCrossover breeder = new TwoPointCrossOver();//two-point crossover as crossover strategy\n\t\tPopulationMutator mutator = new SwapTwoCities();//swap of two elements as mutation strategy\n\t\tPopulationReplacement selector = new ElitistSelection();//elitism as selection strategy\n\n\t\t//create a generation history object to track all generations\n\t\tArrayList<GAPopulationGeneration> generationHistory = new ArrayList<>();\n\n\t\t//create our first generation and randomly generate its initial solutions\n\t\tGAPopulationGeneration generation = new GAPopulationGeneration(initialiser.initialise(cities, 8));\n\n\t\t// create our output table\n\t\tAsciiTable outputTable = new AsciiTable();\n\t\toutputTable.addHeavyRule();\n\n\t\t// create our incumbent and stopping criterion tracker\n\t\tCandidateSolution incumbent = generation.getParentPopulation().getBestSolution();\n\t\tint generationSinceImprovedIncumbent = 0;\n\n\t\t//loop until 10 iterations without improved incumbent\n\t\twhile (generationSinceImprovedIncumbent <= 10) {\n\n\t\t\t//take parents and crossover to create 6 offspring. record the results for displaying later\n\t\t\tgeneration.setOffspringPopulation(breeder.breed(generation.getParentPopulation(), 6));\n\t\t\tgeneration.setFamilyRecords(breeder.getFamilies());\n\n\t\t\t//take offspring and perform mutation. record the results for displaying later\n\t\t\tgeneration.setMutatedPopulation(mutator.mutatePopulation(generation.getOffspringPopulation()));\n\t\t\tgeneration.setMutantRecords(mutator.getMutations());\n\n\t\t\t//take mutated offspring and perform selection.\n\t\t\tgeneration.setNextPopulation(selector.replace(generation.getParentPopulation(), generation.getMutatedPopulation()));\n\n\t\t\t//if this solution is greater than the incumbent reset stopping criterion and we have new incumbent, else increment stopping criterion\n\t\t\tif (generation.getBestSolutionThisGeneration().compareTo(incumbent) < 0) {\n\t\t\t\tgenerationSinceImprovedIncumbent = 0;\n\t\t\t\tincumbent = generation.getBestSolutionThisGeneration();\n\t\t\t} else\n\t\t\t\tgenerationSinceImprovedIncumbent++;\n\n\t\t\t//record the current generation, and create the new generation from the current one\n\t\t\tgeneration.addToTable(outputTable, incumbent);\n\t\t\tgenerationHistory.add(generation);\n\t\t\tgeneration = generation.initialiseNextGeneration();\n\n\t\t}\n\n\t\t//print out the incumbent at the end\n\t\toutputTable.addRow(\"\", \"\", \"TSP final best solution & fitness : \", incumbent + \" (\" + incumbent.getFitness() + \")\", \"\", \"\", \"\", \"\");\n\t\toutputTable.addHeavyRule();\n\n\n\t\t//format the table, and print to console and output.txt\n\t\tTA_Grid grid = TA_Grid.create(\"an ascii compliant grid\")\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_HEAVY, ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_NORMAL, ' ', '~', ' ', '~', '~', '~', '~', '~', '~', '~', '~', '~')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_LIGHT, ' ', '-', ' ', '-', '-', '-', '-', '-', '-', '-', '-', '-');\n\t\toutputTable.getContext().setGrid(grid);\n\t\toutputTable.setTextAlignment(TextAlignment.CENTER);\n\t\toutputTable.getRenderer().setCWC(new CWC_LongestLine());\n\t\tFileWriter output = new FileWriter(\"output.txt\", true);\n\t\toutput.append(outputTable.render()).append(\"\\n\\n\").close();\n\t\tSystem.out.println(outputTable.render() + \"\\n\\n\");\n\t}", "public static void main(String[] args) {\n\t\tfinal Engine<DoubleGene, Double> engine = Engine\n\t\t\t\t.builder(JeneticsDemo2::eval, Codecs.ofScalar(DoubleRange.of(0, 2 * Math.PI)))\n\t\t\t\t\t.populationSize(500)\n\t\t\t\t\t.optimize(Optimize.MINIMUM)\n\t\t\t\t\t.offspringSelector(new StochasticUniversalSelector<>())\n\t\t\t\t\t.alterers(new Mutator<>(0.03), new MeanAlterer<>(0.6))\n\t\t\t\t\t.build();\n\n\t\t// Execute the GA (engine).\n\t\tfinal Phenotype<DoubleGene, Double> result = engine.stream()\n\t\t\t\t// Truncate the evolution stream if no better individual could\n\t\t\t\t// be found after 5 consecutive generations.\n\t\t\t\t.limit(Limits.bySteadyFitness(5))\n\t\t\t\t// Terminate the evolution after maximal 100 generations.\n\t\t\t\t.limit(100).collect(EvolutionResult.toBestPhenotype());\n\t\t\n\t\tSystem.out.println(\"Best GenoType: \" + result);\n\t}", "private Evolvable zipperCross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tint[] dnaP1 = ((SNSAgent)parent1).getDna();\n\t\t//dna of second parent\n\t\tint[] dnaP2 = ((SNSAgent)parent2).getDna();\n\t\t\n\t\t//result dna\n\t\tint dnaChild[] = new int[3000];\n\t\t//simple cross\n\t\tfor(int i = 0; i < 3000; i++)\n\t\t{\t\t\n\t\t\tif(i%2 == 0)\n\t\t\t\tdnaChild[i] = dnaP1[i];\n\t\t\telse\n\t\t\t\tdnaChild[i] = dnaP2[i];\n\t\t}\n\t\treturn new SNSAgent(dnaChild, ((SNSAgent)parent1).behavior);\t\n\t}", "public void mutation(Graph_GA obj, float mutation_index)\r\n\t{\r\n\t\t\r\n\t\tList<Integer> list_num = new ArrayList<Integer>();\r\n\t\tInteger[] shuffled_list = null;\r\n\t\tList<Integer> mutation_vertex = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tlist_num.add(i+1);\r\n\t\t}\r\n\t\tjava.util.Collections.shuffle(list_num);\r\n\t\tshuffled_list = list_num.toArray(new Integer[list_num.size()]);\r\n\t\t\r\n\t\tfor(int i=0;i<(chromosome_size*mutation_index);i++)\r\n\t\t{\r\n\t\t\tmutation_vertex.add(shuffled_list[i]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tGA_Graph_Node vertex_container[] = obj.getNodes();\r\n\t\t\r\n\t\tfor(int i=0;i<obj.num_vertex;i++)\r\n\t\t{\r\n\t\t\tInteger[] valid_colors = null;\r\n\t\t\tList<Integer> adjacent_vertex_color = new LinkedList<Integer>();\r\n\t\t\tSet<DefaultEdge> adjacent_edges = obj.graph_inp.edgesOf(vertex_container[i]);\r\n\t\t\tIterator<DefaultEdge> adj_edge_list = adjacent_edges.iterator();\r\n\t\t\t\r\n\t\t\twhile(adj_edge_list.hasNext())\r\n\t\t\t{\r\n\t\t\t\tDefaultEdge adj_edge = adj_edge_list.next();\r\n\t\t\t\tGA_Graph_Node adj_node = null;\r\n\t\t\t\tadj_node = obj.graph_inp.getEdgeSource(adj_edge);\r\n\t\t\t\tif(adj_node==null||adj_node==vertex_container[i])\r\n\t\t\t\t{\r\n\t\t\t\t\tadj_node = obj.graph_inp.getEdgeTarget(adj_edge);\r\n\t\t\t\t}\r\n\t\t\t\tadjacent_vertex_color.add(chromosome[adj_node.numID-1]);\r\n\t\t\t}\r\n\t\t\tif(adjacent_vertex_color.contains(chromosome[i])&&mutation_vertex.contains(i+1))\r\n \t{\r\n\t\t\t\tList<Integer> valid_color_list = new LinkedList<Integer>();\r\n \t\tfor(int j=0;j<num_colors;j++)\r\n \t\t{\r\n \t\t\tif(adjacent_vertex_color.contains(j+1) == false)\r\n \t\t\t\tvalid_color_list.add(j+1);\t\r\n \t}\r\n \t\t\r\n \t\tvalid_colors = valid_color_list.toArray(new Integer[valid_color_list.size()]);\r\n \t\t\r\n// \t\tSystem.out.println(valid_colors.toString());\r\n \t\tif(valid_colors.length> 0)\r\n \t\t{\r\n\t \t\tint rand_num = random_generator.nextInt(valid_colors.length);\r\n\t \t\t\tint new_color = valid_colors[rand_num];\r\n\t \t\t\t\r\n\t \t\t\tchromosome[i] = new_color;\r\n \t\t}\r\n \t}\r\n\t\t\t\r\n }\r\n\t}", "private static void fakePole() {\n\t\tint turns = 1000;\n\t\tModelLearnerHeavy modeler = new ModelLearnerHeavy(100, new int[] {30},\n\t\t\t\tnew int[] {30}, new int[] {30}, ActivationFunction.SIGMOID0p5, turns);\n\n\t\tfinal boolean NN_FORM = false;\n\t\tdouble[] mins = Pole.stateMins;\n\t\tdouble[] maxes = Pole.stateMaxes;\n\t\tEnvTranslator stateTranslator = EnvTranslator.rbfEnvTranslator(mins, maxes, new int[] {12,12}, .5);\n\t\tEnvTranslator actTranslator = Pole.actionTranslator;\n\t\tList<double[]> actions = Pole.actionChoices;\n\t\tactions.add(new double[] {1,0});\n//\t\tactions.add(new double[] {0,0});\n\t\tactions.add(new double[] {0,1});\n\t\tfinal Collection<double[]> tmpCorrel = new ArrayList<double[]>();\n\t\tfor (int t = 0; t < turns; t++) {\n\t\t\tdouble[] preState = new double[mins.length];\n\t\t\tfor (int i = 0; i < preState.length; i++) {\n\t\t\t\tfinal double spread = (maxes[i] - mins[i]) / 10;\n\t\t\t\tpreState[i] = RandomUtils.randBetween(mins[i] - spread, maxes[i] + spread);\t\n\t\t\t}\n\t\t\tdouble[] inNN = stateTranslator.toNN(preState);\n\t\t\tdouble[] action = RandomUtils.randomOf(actions);\n\t\t\tmodeler.observePreState(inNN);\n\t\t\tmodeler.observeAction(action);\n\t\t\t\n\t\t\tdouble[] postState = new double[mins.length];\n\t\t\tdouble act = Math.random() < 0.99 ? action[0] - action[1] : (2*Math.round(Math.random())-1);\n\t\t\tdouble r = act/100;\n\t\t\tfor (int i = 0; i < postState.length; i++) {\n\t\t\t\tpostState[i] = preState[i] * Math.exp(Math.signum(preState[i]) * (i == 0 ? r : -r));\n\t\t\t} // act0 moves state[0] up and state[1] down, act1 moves state[0] down and state[1] up\n\t\t\ttmpCorrel.add(new double[] {act, postState[0] - preState[0]});\n\t\t\tmodeler.observePostState(stateTranslator.toNN(postState));\n\t\t\tmodeler.saveMemory();\n\t\t}\n\t\tmodeler.learnFromMemory(1.5, 0.5, 0, false, 1000, 0.0003); // IT SEEMS CONFIDENCE IS NOT RELIABLE INDICATOR\n//\t\tfor (double[] dd : tmpCorrel) {\n//\t\t\tString s = \"\"; for (double d : dd) s += d + \"\t\";\n//\t\t\tSystem.out.println(s);\n//\t\t}\n\t\tfor (int i = 0; i < 10; i++) System.out.println(\"*********\");\n\t\tSystem.out.println(modeler.getModelVTA().getConfidenceEstimate());\n//\t\tmodeler.testit(1000, mins, maxes, stateTranslator, actTranslator, actions, NN_FORM);\n\t\t\n\t\tfor (int t = 0; t < 500; t++) {\n\t\t\tfinal double[] state = new double[mins.length];\n\t\t\tfor (int i = 0; i < state.length; i++) state[i] = RandomUtils.randBetween(mins[i], maxes[i]);\n\t\t\tString s = \"\";\n\t\t\tfor (double d : state) s += d + \"\t\";\n\t\t\tfor (double[] act : actions) {\n\t\t\t\tdouble[] foresight = Foresight.montecarlo(modeler, stateTranslator.toNN(state), act, 1, 100, 30);\n\t\t\t\tdouble[] postV = stateTranslator.fromNN(foresight);\n\t\t\t\ts += \"act:\" + actTranslator.fromNN(act) + \":\t\";\n\t\t\t\tfor (double d : postV) s += Utils.round(d * 100, 2) + \"\t\";\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "void gen() {\n X86.Operand mleft = src1.gen_source_operand(false,tempReg1); \r\n X86.Operand mright = src2.gen_source_operand(true,tempReg2); \r\n X86.emit2(\"cmp\" + X86.Size.Q,mright,mleft);\r\n X86.emit0(\"j\" + op.X86_name() + \" F\" + funcNumber + \"_\" + lab.name);\r\n }", "public static Tree crossover(double[] distribution, Tree[] trees){\n Tree tree1 = chooseRandTree(distribution, trees);\n Tree tree2 = chooseRandTree(distribution, trees);\n if (tree2 == null) System.out.println(\"Null1\");\n while (tree1.equals(tree2)){\n tree2 = chooseRandTree(distribution,trees);\n if (tree2 == null) System.out.println(\"Null2\");\n }\n return reproduce(tree1, tree2);\n \n }", "public BaseGearPiece generateGearPiece();", "private void coins_a1G(){\n\t\tthis.cube[31] = this.cube[17]; \n\t\tthis.cube[17] = this.cube[8];\n\t\tthis.cube[8] = this.cube[44];\n\t\tthis.cube[44] = this.cube[53];\n\t\tthis.cube[53] = this.cube[31];\n\t}", "@Override\n\t// Select individuals for crossover\n\tprotected Individual tournamentSelection(Population pop) {\n\t\tSortingIndividual baseIndiv = (SortingIndividual) pop.individuals[0];\n\t\tPopulation tournament = new SortingPopulation(tournamentSize, baseIndiv.getBase(), false);\n\t\t// For each place in the tournament get a random individual\n\t\tfor (int i = 0; i < tournamentSize; i++) {\n\t\t\tint randomId = (int) (Math.random() * pop.size());\n\t\t\ttournament.saveIndividual(i, pop.getIndividual(randomId));\n\t\t}\n\t\t// Get the fittest\n\t\tIndividual fittest = tournament.getFittest();\n\t\treturn fittest;\n\t}", "int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2);" ]
[ "0.7116347", "0.7020576", "0.68149734", "0.68000764", "0.6772466", "0.6746327", "0.6744411", "0.671032", "0.6656282", "0.6654603", "0.6650562", "0.6637977", "0.66195", "0.6601103", "0.65451795", "0.6514171", "0.6508004", "0.6507797", "0.65002966", "0.6483657", "0.6431", "0.64276356", "0.6334477", "0.62498254", "0.6146902", "0.6065169", "0.6008906", "0.5965024", "0.5936969", "0.5859518", "0.5853879", "0.5838176", "0.57884043", "0.5786249", "0.57559747", "0.5699726", "0.56997216", "0.56956387", "0.56687325", "0.565603", "0.565214", "0.5637907", "0.56342614", "0.5612074", "0.5589283", "0.55836296", "0.5567764", "0.556158", "0.54661644", "0.5451964", "0.5445224", "0.54413027", "0.5430726", "0.54102975", "0.54059255", "0.5394057", "0.53936964", "0.53644234", "0.5363747", "0.5358994", "0.5352123", "0.5351763", "0.5322124", "0.5318741", "0.531467", "0.5309592", "0.52937955", "0.5264542", "0.5257526", "0.52544165", "0.5248526", "0.5244309", "0.52420944", "0.5237516", "0.5212507", "0.5210084", "0.51874554", "0.51846176", "0.5167546", "0.51636446", "0.51627046", "0.51585263", "0.5156917", "0.5154361", "0.5151866", "0.51451606", "0.5130196", "0.5126959", "0.51239306", "0.5123777", "0.51190025", "0.51189566", "0.511881", "0.51095784", "0.51044077", "0.5103605", "0.5098564", "0.50901425", "0.5087823", "0.5062611" ]
0.6305443
23
Implementation of Bit Flip Mutation. Note that the mutation will be attempted GAConfiguration.MUTATION_ATTEMPTS times. If it is unsuccesful in producing a valid child on every attempt, it will return the original child.
public Chromosome doBitFlipMutation(){ for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){ ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection); int itemToMutate = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); newSelection.set(itemToMutate, !newSelection.get(itemToMutate)); Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated(); if(mutatedKnapsack.isValid()) return mutatedKnapsack; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int[] mutateScramble(int[] child) {\n println(\"Doing a scramble mutation\", 4);\n displayChromosome(child, 4);\n for(int r = 0; r < 3; r++) {\n child = mutateSwapChild(child);\n child = mutateInversionChild(child);\n }\n displayChromosome(child, 4);\n return child;\n }", "private int[] mutateInversionChild(int[] child) {\n println(\"before inversion mutation:\",1);\n displayChromosome(child, 1);\n int first = (int)(Math.random() * num_shipping_points);\n int second = (int)(Math.random() * num_shipping_points);\n \n //make sure first and second are different\n while(first == second) {\n second = (int)(Math.random() * num_shipping_points);\n }\n \n //Now make sure front < back.\n int front, back = 0;\n if(first < second) {\n front = first;\n back = second;\n }\n else {\n back = first;\n front = second;\n }\n //front = 5;\n //back = 10;\n \n //output(\"\\nchild before mutation:\", 2);\n //displayChromosome(child);\n //Perform the inversion.\n while(front < back) {\n int temp = child[front];\n child[front] = child[back];\n child[back] = temp;\n front++;\n back--;\n }\n //output(\"\\nchild after mutation:\", 2);\n //displayChromosome(child);\n \n println(\"after inversion mutation:\",1);\n displayChromosome(child, 1);\n return child;\n }", "public abstract Chromosome mutation(Chromosome child);", "public void receiveResult( int flipResult, BigInteger x);", "private Object mutation(Individual child){\n\t\treturn problem.improve(child.getId());\r\n\t}", "private int[] mutateSwapChild(int[] child) {\n println(\"before mutateSwapChild\", 1);\n displayChromosome(child, 1);\n int first = (int)(Math.random() * num_shipping_points);\n int second = (int)(Math.random() * num_shipping_points);\n //make sure first and second are different\n while(first == second) {\n second = (int)(Math.random() * num_shipping_points);\n }\n int temp = child[first];\n child[first] = child[second];\n child[second] = temp;\n \n println(\"after mutateSwapChild\", 1);\n displayChromosome(child, 1);\n return child;\n }", "public static int flipBit(int value, int bitIndex) {\n\n// value = value ^ (1<<(bitIndex-1));\n\n return value ^ (1<<(bitIndex-1)); // put your implementation here\n }", "public void flip(int bitIndex);", "public Piece flip(){\n if(this == BLACK){\n return WHITE;\n }\n else{\n return BLACK;\n }\n }", "public Chromosome doExchangeMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.swap(newSelection, allele1, allele2);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "private int[] mutationSingleMove(int[] mutant) {\n\t\tint pairPoint1 = rand.nextInt(mutant.length);\n\t\tint newBin = mutant[pairPoint1];\n\t\twhile (newBin == mutant[pairPoint1]) {\n\t\t\tnewBin = rand.nextInt(binCount);\n\t\t}\n\t\tmutant[pairPoint1] = newBin; //swap to a different bucket\n\t\treturn mutant;\n\t}", "public Chromosome doInversionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.reverse(newSelection.subList(Math.min(allele1, allele2), Math.max(allele1, allele2)));\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "private int[] mutateChild(int[] child) {\n println(\"mutateChild()\", 1);\n int first = (int)(Math.random() * num_shipping_points);\n int second = (int)(Math.random() * num_shipping_points);\n //make sure first and second are different\n while(first == second) {\n second = (int)(Math.random() * num_shipping_points);\n }\n int temp = child[first];\n child[first] = child[second];\n child[second] = temp;\n \n return child;\n }", "public Binary negative(){\n\n Binary ret1= this.flip();\n Binary ret2= ret1.suma1();\n return ret2;\n }", "public Chromosome doInsertionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n boolean value = newSelection.get(allele2);\n\n newSelection.remove(allele2);\n try{\n newSelection.add(allele1 + 1, value);\n }\n catch(IndexOutOfBoundsException e){\n newSelection.add(value);\n }\n \n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public SOA_BitFlipMutation2(HashMap<String, Object> parameters) {\r\n\t\tsuper(parameters) ;\r\n \tif (parameters.get(\"probability\") != null)\r\n \t\tmutationProbability_ = (Double) parameters.get(\"probability\") ; \t\t\r\n\t}", "public static void mirror(Node node){\n Queue<Node> q= new ArrayDeque<>();\n q.add(node);\n while(q.size()>0) {\n\n int qlen=q.size();\n while(qlen>0) {\n Node nn=q.remove();\n int n =nn.children.size();\n for (int i = 0; i < n; i++) {\n q.add(nn.children.get(i));\n }\n\n for (int i = 0; i < n / 2; i++) {\n Node temp = nn.children.get(i);\n nn.children.set(i, nn.children.get(n - 1 - i));\n nn.children.set(n - 1 - i, temp);\n }\n qlen--;\n }\n }\n\n }", "public myBinaryTree<T> my_mirror();", "protected void siftDown() {\r\n\t\tint parent = 0, child = (parent << 1) + 1;// preguntar porque 0 y no 1\r\n\t\t\r\n\t\twhile (child < theHeap.size()) {\r\n\t\t\tif (child < theHeap.size() - 1\r\n\t\t\t\t\t&& compare(theHeap.get(child), theHeap.get(child + 1)) > 0)\r\n\t\t\t\tchild++; // child is the right child (child = (2 * parent) + 2)\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tparent = child;\r\n\t\t\tchild = (parent << 1) + 1; // => child = (2 * parent) + 1\r\n\t\t}\r\n\t}", "private Node balance() {\n this.updateHeight();\n\n switch (this.balanceFactor()) {\n case 2:\n if (this.rightChild.balanceFactor() == -1) {\n this.rightChild = this.rightChild.rotateRight();\n }\n return this.rotateLeft();\n case -2:\n if (this.leftChild.balanceFactor() == 1) {\n this.leftChild = this.leftChild.rotateLeft();\n }\n return this.rotateRight();\n }\n\n return this;\n }", "@Override\n public IQTree removeDistincts(IQTree child, IQTreeCache treeCache) {\n return iqFactory.createUnaryIQTree(this, child, treeCache.declareDistinctRemoval(true));\n }", "public Call treeCopyNoTransform() {\n Call tree = (Call) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) children[i];\n if (child != null) {\n child = child.treeCopyNoTransform();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }", "public BitSet makeMod(){\n\t\tBitSet bs = new BitSet(this.length());\n\t\tbs.or(this);\n\t\treturn bs;\n\t}", "private void shiftDown() {\n int index = 1;\n\n while (hasLeftChild(index)) {\n //compare chield Nodes\n int smallerChild = leftIndex(index);\n\n // shft down with smaller Node if any\n if (hasRightChild(index) && heap[leftIndex(index)].compareTo(heap[rightIndex(index)]) > 0) {\n smallerChild = rightIndex(index);\n }\n\n if (heap[index].compareTo(heap[smallerChild]) > 0) {\n swap(index, smallerChild);\n } else {\n //Nothing to do\n break;\n }\n index = smallerChild;\n }\n }", "public Chromosome doDisplacementMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n\n int leftAllele = Math.min(allele1, allele2);\n int rightAllele = Math.max(allele1, allele2);\n\n var selectionSublist = new ArrayList<Boolean>(newSelection.subList(leftAllele, rightAllele));\n for(int j = leftAllele; j < rightAllele + 1; j++){\n newSelection.remove(leftAllele);\n }\n\n int index = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()+1);\n newSelection.addAll(index, selectionSublist);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "private MyBinNode getToReplace(MyBinNode node){\n MyBinNode replc_p = node;\n MyBinNode replace = node;\n MyBinNode aux = node.right;\n while(aux != null){\n replc_p = replace;\n replace = aux;\n aux = aux.left;\n }\n if(replace != node.right){\n replc_p.left = replace.right;\n replace.right = node.right;\n }\n return replace;\n }", "private void percolateDown(int index) {\n\n\t\twhile(numChildren(index) != 0){\n\t\t\t\n\t\t\t// If the node has one child\n\t\t\tif(numChildren(index) == 1){\n\t\t\t\t// If the node is greater than its child, swap them\n\t\t\t\tif(compare(array[index], array[leftChildIndex(index)]) > 0){\n\t\t\t\t\tAnyType temp = array[leftChildIndex(index)];\n\t\t\t\t\tarray[leftChildIndex(index)] = array[index];\n\t\t\t\t\tarray[index] = temp;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// If the node is less than its child, it is at its correct position\n\t\t\t\telse return;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// If the node is less than both its children, it is at its correct position\n\t\t\t\tif(compare(array[index], array[leftChildIndex(index)]) < 0 && compare(array[index], array[rightChildIndex(index)]) < 0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// If the node's right child is less than its left child, swap the node with the right child\n\t\t\t\t// and continue percolating downwards\n\t\t\t\tif(compare(array[rightChildIndex(index)], array[leftChildIndex(index)]) < 0){\n\t\t\t\t\tAnyType temp = array[rightChildIndex(index)];\n\t\t\t\t\tarray[rightChildIndex(index)] = array[index];\n\t\t\t\t\tarray[index] = temp;\n\t\t\t\t\tindex = rightChildIndex(index);\n\t\t\t\t}\n\t\t\t\t// If the node's left child is less than its right child, swap the node with the left child\n\t\t\t\t// and continue percolating downwards \n\t\t\t\telse if(compare(array[leftChildIndex(index)], array[rightChildIndex(index)]) < 0){\n\t\t\t\t\tAnyType temp = array[leftChildIndex(index)];\n\t\t\t\t\tarray[leftChildIndex(index)] = array[index];\n\t\t\t\t\tarray[index] = temp;\n\t\t\t\t\tindex = leftChildIndex(index);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public synchronized Block flip() {\r\n\t\t// TODO ILLEGAL STATUS: THROW AN EXCEPTION HERE\r\n\t\tif(status == Status.Fliped || status == Status.Cleared)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\tstatus = Status.Fliped;\r\n\t\t// when it is clicked when it should be flipped back after a short interval, the flag should be \r\n\t\t// reset to avoid being covered at which the card should be shown\r\n\t\tdelayedCover = false;\r\n\t\tgraphics.updateBlock();\r\n\t\treturn this;\r\n\t}", "private BinaryNode<AnyType> mirror1(BinaryNode<AnyType> t)\r\n\t{\r\n\t\tif(t==null)\r\n\t\t\treturn t;\r\n\r\n\t\tBinaryNode n1=mirror1(t.left);\r\n\t\tBinaryNode n2=mirror1(t.right);\r\n\t\tt.left=n2;\r\n\t\tt.right=n1;\r\n\t\treturn t;\r\n\t}", "public static int[][] generateChildMatrix(int[][] parent_matrix, int column, int player){\n int[][] child_copy = new int[ROW][COLUMN];\n //deep copy\n for(int i=0;i<ROW;i++){\n for(int j=0;j<COLUMN;j++){\n child_copy[i][j]=parent_matrix[i][j];\n }\n }\n for(int i=3; i>=0; i--){\n if(child_copy[i][column]==0){\n child_copy[i][column]=player;\n break;\n }\n }\n return child_copy;\n }", "@Override\n\t public Node apply(Node gen) {\n\t\t gen = gen.clone(null);\n\t\t int n = gen.weight();\n\t\t int m = (int)(Math.random()*n);\n\t\t Node mutate_node = gen.get(m);\n\t\t int x = (int)(Math.random()*codes.length);\n\t\t mutate_node.oper = codes[x];\n\t\t return gen;\n\t }", "public Card flip() {\n\t\treturn hand.remove(0);\n\t}", "public bit not()\n\t{\n\t\tbit notBit = new bit();\n\t\t\n\t\tnotBit.setValue(Math.abs(bitHolder.getValue() - 1));\n\t\t\n\t\treturn notBit;\n\t}", "public void doMutation(double probability, Solution solution) throws JMException {\n try {\n //Gene part\n int length = ((Binary) solution.getDecisionVariables()[0]).getNumberOfBits();\n for (int j = 0; j < length - 12; j++) {\n if (PseudoRandom.randDouble() < probability) {\n ((Binary) solution.getDecisionVariables()[0]).bits_.flip(j);\n }\n }\n //Condition Part\n if (PseudoRandom.randDouble() < 0.1) {\n for (int j = length - 12; j < length; j++) {\n int c = 0;\n for (int i = length - 12; i < length; i++) {\n if (((Binary) solution.getDecisionVariables()[0]).bits_.get(i) ) {\n c++;\n }\n }\n if (c > 1)\n ((Binary) solution.getDecisionVariables()[0]).bits_.flip(j);\n }\n }\n\n for (int i = 0; i < solution.getDecisionVariables().length; i++) {\n ((Binary) solution.getDecisionVariables()[i]).decode();\n }\n } catch (ClassCastException e1) {\n Configuration.logger_.severe(\"BitFlipMutation.doMutation: \" +\n \"ClassCastException error\" + e1.getMessage());\n Class cls = java.lang.String.class;\n String name = cls.getName();\n throw new JMException(\"Exception in \" + name + \".doMutation()\");\n }\n }", "public final int child ()\r\n {\r\n return _value.child();\r\n }", "private Node removeElement() {\n if (this.leftChild != null) {\n if (this.rightChild != null) {\n Node current = this.rightChild;\n\n while (current.leftChild != null) {\n current = current.leftChild;\n }\n\n //swap\n E value = this.value;\n this.value = current.value;\n current.value = value;\n\n this.rightChild = this.rightChild.removeElement(current.value);\n return this.balance();\n } else {\n return this.leftChild;\n }\n } else {\n return this.rightChild;\n }\n }", "public static BitFragment newInstance() {\n BitFragment fragment = new BitFragment();\n return fragment;\n }", "public Call treeCopy() {\n Call tree = (Call) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) getChild(i);\n if (child != null) {\n child = child.treeCopy();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }", "public void flip() {\n flipRecur(root);\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/DebugInfoMetadata.h\", line = 783,\n FQN=\"llvm::DICompositeType::mutate\", NM=\"_ZN4llvm15DICompositeType6mutateEjjjyyyj\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/DebugInfoMetadata.cpp -nm=_ZN4llvm15DICompositeType6mutateEjjjyyyj\")\n //</editor-fold>\n private void mutate(/*uint*/int Tag, /*uint*/int Line, /*uint*/int RuntimeLang,\n long/*uint64_t*/ SizeInBits, long/*uint64_t*/ AlignInBits, long/*uint64_t*/ OffsetInBits,\n /*uint*/int Flags) {\n assert (isDistinct()) : \"Only distinct nodes can mutate\";\n assert ((getRawIdentifier() != null)) : \"Only ODR-uniqued nodes should mutate\";\n this.RuntimeLang = RuntimeLang;\n super.mutate(Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags);\n }", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public void toggle()\n\t{\n\t\tbitHolder.setValue(Math.abs(bitHolder.getValue() - 1 ));\n\t\t\n\t}", "ASTNode rebuild() {\n ASTNode child = null;\n switch (this.type) {\n case \"else if statement\":\n child = children.get(0);\n break;\n\n default:\n }\n\n return this;\n }", "private long replace(long r, Node change) throws IOException {\n Node current = new Node(r);\r\n if (current.right != 0) {\r\n current.right = replace(current.right, change);\r\n current.height = getHeight(current);\r\n current.writeNode(r);\r\n int heightDifference = getHeightDifference(r);\r\n if (heightDifference < -1) {\r\n if (getHeightDifference(current.right) > 0) {\r\n current.right = rightRotate(current.right);\r\n current.writeNode(r);\r\n return leftRotate(r);\r\n }\r\n else {\r\n return leftRotate(r);\r\n }\r\n }\r\n else if (heightDifference > 1) {\r\n if (getHeightDifference(current.left) < 0) {\r\n current.left = leftRotate(current.left);\r\n current.writeNode(r);\r\n return rightRotate(r);\r\n }\r\n else {\r\n return rightRotate(r);\r\n }\r\n }\r\n return r;\r\n }\r\n else {\r\n change.key = current.key;\r\n change.fields = current.fields;\r\n addToFree(r);\r\n return current.left;\r\n }\r\n }", "public abstract B copy();", "public static RuntimeValue flip(RuntimeValue p) throws RuntimeException {\n if (isDiscreteFloatSample(p) && hasSingleValue(p.getDiscreteFloatSample())) {\n return new RuntimeValue(\n RuntimeValue.Type.DISTRIBUTION,\n new FlipDistribution(p.getDiscreteFloatSample().single())\n );\n }\n\n throw new RuntimeException(\"Unable to create Flip distribution\");\n }", "private NodoBin<T> rIzquierda(NodoBin<T> r) {\n NodoBin<T> x = r.getDer();\n r.setDer(x.getIzq());\n x.setIzq(r);\n return x;\n }", "protected void percolateUp(int leaf){\n int parent = parent(leaf);\n Bloque value = (Bloque)data.get(leaf);\n while (leaf > 0 && (value.compareTo(data.get(parent)) > 0)){\n data.set(leaf,data.get(parent));\n leaf = parent;\n parent = parent(leaf);\n }\n data.set(leaf,value);\n }", "@Override\n public ChessPiece clone() {\n ChessPiece copy = new Bishop(this.owner);\n this.owner.removeChessPiece(copy);\n copy.canCastle = this.canCastle;\n copy.icon = this.icon;\n\n return copy;\n }", "HashPermute() {\n\t\tthis(0);\n\t}", "private NAryTree applyDumb(NAryTree tree, Random rng) {\n\t\tNAryTree mutatedTree = dumbCoordinator.apply(tree, rng);\n\t\tthis.locationOfLastChange = dumbCoordinator.locationOfLastChange;\n\t\tthis.typeOfChange = dumbCoordinator.typeOfChange;\n\t\treturn mutatedTree;\n\t}", "private PersistentLinkedList<T> pop() {\n //the latest element won't become empty\n int index = this.treeSize - 1;\n Node<T> newRoot = new Node<>(branchingFactor);\n\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n ArrayList<Node<T>> newNodes = new ArrayList<>();\n newNodes.add(newRoot);\n ArrayList<Integer> newNodesIndices = new ArrayList<>();\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n TraverseData traverseData = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, index, b));\n currentNode = traverseData.currentNode;\n currentNewNode = traverseData.currentNewNode;\n newNodes.add(currentNewNode);\n newNodesIndices.add(index / b);\n index = traverseData.index;\n }\n newNodesIndices.add(index);\n\n for (int i = 0; i < branchingFactor && i < index; i++) {\n currentNewNode.set(i, currentNode.get(i));\n }\n currentNewNode.set(index, null);\n\n if (index == 0) {\n int latestIndex = newNodes.size() - 2;\n newNodes.get(latestIndex).set(newNodesIndices.get(latestIndex), null);\n\n for (int i = latestIndex; i > 0; i--) {\n if (newNodesIndices.get(i) == 0) {\n newNodes.get(i - 1).set(newNodesIndices.get(i - 1), null);\n } else {\n break;\n }\n }\n }\n\n if (newNodes.size() > 1) {\n int nonNullChildren = 0;\n for (Node<T> child : newRoot.children) {\n if (child != null) {\n nonNullChildren++;\n }\n }\n if (nonNullChildren == 1) { //need new root\n newRoot = newRoot.get(0);\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth - 1,\n this.base / branchingFactor, this.treeSize - 1, unusedTreeIndices,\n indexCorrespondingToTheFirstElement, indexCorrespondingToTheLatestElement);\n }\n }\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth, this.base,\n this.treeSize - 1, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }", "public static void mirror(Node node){\r\n //Traverse to the end of the tree first\r\n for(Node child : node.children){\r\n mirror(child);\r\n }\r\n \r\n //Now reverse the children of parent node\r\n int left = 0;\r\n int right = node.children.size() - 1;\r\n \r\n while(left < right){\r\n Node temp = node.children.get(left);\r\n node.children.set(left, node.children.get(right));\r\n node.children.set(right, temp);\r\n \r\n left++; right--;\r\n }\r\n }", "public abstract Node copy();", "public Flip() {\n super(\"!flip\", true);\n }", "public abstract void mutate();", "public BlockLambdaBody treeCopyNoTransform() {\n BlockLambdaBody tree = (BlockLambdaBody) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) children[i];\n if (child != null) {\n child = child.treeCopyNoTransform();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }", "private Node caseTwoChildren(Node deleteThis) {\r\n\r\n Node next = getMin(deleteThis.getRight()),\r\n child, parent;\r\n deleteThis.setKey(next.getKey());\r\n child = next.getRight();\r\n parent = next.getParent();\r\n if (parent.getLeft() == next) {\r\n parent.setLeft(child);\r\n } else {\r\n parent.setRight(child);\r\n }\r\n if (child != null) {\r\n child.setParent(parent);\r\n }\r\n return next;\r\n }", "@Override\r\n\tpublic boolean pushValuesBackward() {\r\n\t\tboolean mod = false;\r\n\r\n\t\tValue resultBusValue = getResultBus().getValue();\r\n\r\n\t\tValue newValue = new Value(resultBusValue.getSize(),\r\n\t\t\t\tresultBusValue.isSigned());\r\n\r\n\t\tfor (int i = 0; i < resultBusValue.getSize(); i++) {\r\n\t\t\tBit bit = resultBusValue.getBit(i);\r\n\t\t\tif (!bit.isCare()) {\r\n\t\t\t\tnewValue.setBit(i, Bit.DONT_CARE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmod |= getDataPorts().get(0).pushValueBackward(newValue);\r\n\r\n\t\treturn mod;\r\n\t}", "BigInteger getReplacedByField();", "protected int rightChild(int i) {\n return (i + 1) << 1;\n }", "public T copyOnWrite() {\n T r = ref;\n if(r.getRefCount() <= 1) { return r; }\n @SuppressWarnings(\"unchecked\")\n T r2 = (T)r.clone();\n r.removeRef();\n ref = r2;\n r2.addRef();\n return r2;\n }", "public T m16770B() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n return null;\n }\n }", "public boolean removeChildAndAllSnapshotCopies(INode child) {\r\n return removeChild(child);\r\n }", "public static double getMutationProbability() { return mutationProbability; }", "@Override\n\tpublic Procedure3<java.lang.Integer, UnsignedInt6Member, UnsignedInt6Member> bitShiftRight() {\n\t\treturn SHRZ;\n\t}", "private int percolateUpLeaf(){\n\t\treturn percolateUp(heap.size()-1);// TODO: A one-line function that calls percolateUp()\n\t}", "private Node caseOneChild(Node deleteThis) {\r\n\r\n Node child, parent;\r\n if (deleteThis.getLeft() != null) {\r\n child = deleteThis.getLeft();\r\n } else {\r\n child = deleteThis.getRight();\r\n }\r\n parent = deleteThis.getParent();\r\n child.setParent(parent);\r\n\r\n\r\n if (parent == null) {\r\n this.root = child; // Poistettava on juuri\r\n return deleteThis;\r\n }\r\n if (deleteThis == parent.getLeft()) {\r\n parent.setLeft(child);\r\n } else {\r\n parent.setRight(child);\r\n }\r\n return deleteThis;\r\n }", "static int toggleBit(int n){\n return n & (n-1);\n }", "private RedBlackNode rotationWithRightChild(RedBlackNode node1) \n { \n RedBlackNode node2 = node1.rightChild; \n node1.rightChild = node2.leftChild; \n node2.leftChild = node1.leftChild; \n return node2; \n }", "public BinaryNode copy() {\n\t\tBinaryNode newRoot = new BinaryNode(data);\n\t\tif(leftChild != null)\n\t\t\tnewRoot.setLeftChild(leftChild.copy());\n\t\tif(rightChild != null)\n\t\t\tnewRoot.setRightChild(rightChild.copy());\n\t\treturn newRoot;\n\t}", "Node getChild(String childID) throws IllegalAccessException;", "public @NotNull Image flipV()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int i = this.height - 1, offsetSize = 0; i >= 0; i--)\n {\n long src = srcPtr + Integer.toUnsignedLong(i * this.width) * this.format.sizeof;\n \n MemoryUtil.memCopy(src, dstPtr + offsetSize, bytesPerLine);\n offsetSize += bytesPerLine;\n }\n \n this.data.free();\n this.data = output;\n this.mipmaps = 1;\n }\n return this;\n }", "protected final byte[] flipCurrentBuffer()\n {\n byte[] returnBuf = currentBuf;\n currentBuf = ( currentBuf == buf1 ) ? buf2 : buf1;\n return returnBuf;\n }", "@Test \r\n public void testSetExpandedChildAtExpandedSame() {\r\n getView().setShowRoot(true);\r\n TreeItem child = createBranch(\"single-replaced-child\");\r\n child.setExpanded(true);\r\n int index = 3;\r\n setItem(index -1, child);\r\n getSelectionModel().select(index);\r\n // replacingChild has same # of children\r\n TreeItem expandedChild = createBranch(\"another-single-replaced\");\r\n expandedChild.setExpanded(true);\r\n assertEquals(\"sanity: same # of children and both expanded\", \r\n child.getChildren().size(), expandedChild.getChildren().size());\r\n setItem(index -1, expandedChild);\r\n\r\n assertEquals(index, getSelectedIndex());\r\n assertEquals(expandedChild, getSelectedItem());\r\n }", "public Program getImbalancedChild() {\n\t\tMap<Integer, List<Program>> weightsToChildren = new HashMap<>();\n\t\tfor (Program child : getChildren()) {\n\t\t\tweightsToChildren.computeIfAbsent(child.getTotalWeight(), k -> new ArrayList<>());\n\t\t\tweightsToChildren.get(child.getTotalWeight()).add(child);\n\t\t}\n\t\t// No children, or all children have the same total weight.\n\t\tif (getChildren().isEmpty() || weightsToChildren.size() == 1) {\n\t\t\treturn (null);\n\t\t}\n\t\t// Get the loner child. Assumption: The tree will have 3 or more children, so weight with only 1 child is the\n\t\t// imbalanced one.\n\t\tfor (List<Program> children : weightsToChildren.values()) {\n\t\t\tif (children.size() == 1) {\n\t\t\t\treturn (children.get(0));\n\t\t\t}\n\t\t}\n\t\tthrow new RuntimeException(\"Could not locate imbalanced child of program \" + getName());\n\t}", "public void flipper(int bit)\n\t{\n\t\tif (binaryCode[bit])\n\t\t{\n\t\t\t//if value is true, it becomes false\n\t\t\tbinaryCode[bit]=false;\n\n\t\t} else {\n\t\t\t\n\t\t\t//if value is false, it becomes true\n\t\t\tbinaryCode[bit]=true;\n\t\t}\n\t}", "private int leftChild(int i){return 2*i+1;}", "public NAryTree apply(NAryTree tree, Random rng) {\n\t\tif (rng.nextDouble() > chanceOfRandomMutation) {\n\t\t\t//DO A SMART MUTATION\n\t\t\tNAryTree mutatedTree;\n\t\t\tboolean changed = false;\n\t\t\tint nrTries = 0;\n\t\t\tTreeMutationAbstract mutator;\n\t\t\tdo {\n\t\t\t\tmutator = getSmartMutatorForChance(rng.nextDouble() * totalChanceSmart);\n\n\t\t\t\tmutatedTree = mutator.mutate(tree);\n\n\t\t\t\tchanged = mutator.changedAtLastCall();\n\t\t\t\tnrTries++;\n\n\t\t\t\tthis.locationOfLastChange = mutator.locationOfLastChange;\n\t\t\t\tthis.typeOfChange = mutator.typeOfChange;\n\n\t\t\t\t//FIXME problem with the smart mutator, it always says that the individual changed, even when it didn't.\n\t\t\t\tif (nrTries > 2 && changed == false) {\n\t\t\t\t\t//Going dumb... We tried to be smart long enough\n\t\t\t\t\treturn applyDumb(tree, rng);\n\t\t\t\t}\n\t\t\t} while (!changed);\n\n\t\t\tassert mutatedTree.isConsistent();\n\t\t\treturn mutatedTree;\n\t\t} else {\n\t\t\t//DELEGATE TO DUMB COORDINATOR\n\t\t\treturn applyDumb(tree, rng);\n\t\t}\n\t}", "@Override\r\n\tpublic BinaryNodeInterface<E> copy() {\n\t\treturn null;\r\n\t}", "public Node getChild();", "private RedBlackNode rotationWithLeftChild(RedBlackNode node2) \n { \n RedBlackNode node1 = node2.leftChild; \n node2.leftChild = node1.rightChild; \n node1.rightChild = node2; \n return node1; \n }", "public static byte[] getMirrorValue() {\n return MIRROR_VALUE.clone();\n }", "private static BitVectorSolution chooseChild(\r\n\t\t\tBitVectorSolution parent1,\r\n\t\t\tBitVectorSolution parent2, \r\n\t\t\tBitVectorSolution child1,\r\n\t\t\tBitVectorSolution child2, \r\n\t\t\tdouble compFactor) {\r\n\t\t\r\n\t\tdouble fitnessTreshold = \r\n\t\t\t\tMath.min(parent1.fitness, parent2.fitness) + \r\n\t\t\t\tMath.abs(parent1.fitness - parent2.fitness) * compFactor;\r\n\t\t\r\n\t\tevaluateSingle(child2);\r\n\t\tevaluateSingle(child1);\r\n\t\t\r\n\t\tif (child1.fitness >= child2.fitness && child1.fitness > fitnessTreshold) {\r\n\t\t\treturn child1;\r\n\t\t\t\r\n\t\t} else if (child2.fitness > child1.fitness && child2.fitness > fitnessTreshold) {\r\n\t\t\treturn child2;\r\n\t\t\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t}", "public N getChild() {\n\t\tcheckRep();\n\t\treturn this.child;\n\t}", "public final DataValueDescriptor cloneHolder() {\n if (stream == null && _blobValue == null) {\n return cloneValue(false);\n } else {\n // Cast to SQLBinary to avoid having to catch StandardException.\n SQLBinary self = (SQLBinary)getNewNull();\n if (stream != null) {\n // Just reference the same stream in the cloned holder.\n self.setValue(stream, streamValueLength);\n } else if (_blobValue != null) {\n // Just reference the same BLOB value in the cloned holder.\n self.setValue(_blobValue);\n } else {\n throw new IllegalStateException(\"unknown BLOB value repr\");\n }\n return self;\n }\n\t}", "private Individual<T> createChild(List<Individual<T>> tournament) {\n Individual<T> child = mate(tournament.get(0), tournament.get(1));\n child = mutate(child);\n child = child.evaluate();\n return child;\n }", "public FcgLevel child() {\n\t\tif (direction == IN_AND_OUT) {\n\t\t\t// undefined--this node goes in both directions\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\"To get the child of the source level you \" + \"must use the constructor directly\");\n\t\t}\n\n\t\treturn child(direction);\n\t}", "public abstract Type treeCopyNoTransform();", "public IBiNode getChild() {\n return this.child;\n }", "@SuppressWarnings(\"unchecked\")\n protected B self() {\n return (B) this;\n }", "public Integer mutate(int index);", "protected int leftChild(int i) {\n return (i << 1) + 1;\n }", "public BigInteger shiftLeftOneBit() {\n return signum() == 0 ? this : BitLevel.shiftLeftOneBit(this);\n }", "public static byte leftInverse(final byte byte_, final byte index)\n\t{\n\t\ttry \n\t\t{\n\t\t\tfinal boolean ignore_safety_checks = false;\n\t\t\tbyte new_addr = swapLeft(byte_, index);\n\t\t\tnew_addr = invertBitAt(new_addr, index, ignore_safety_checks, ignore_safety_checks);\n\t\t\tnew_addr = invertBitAt(new_addr, index+1, ignore_safety_checks, ignore_safety_checks);\n\t\t\treturn new_addr;\n\t\t}\n\t\tcatch (BitException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn byte_;\n\t}", "public void updateCacheForParent(CanopyCrum childCrum, CanopyCrum parentCrum) {\n\tif (myCachedPath.hasMember(childCrum)) {\n\t\tmyCachedPath.store(parentCrum);\n\t\tif ((myCachedRoot) == childCrum) {\n\t\t\tmyCachedRoot = parentCrum;\n\t\t}\n\t}\n/*\nudanax-top.st:13149:CanopyCache methodsFor: 'operations'!\n{void} updateCache: childCrum {CanopyCrum} forParent: parentCrum {CanopyCrum} \n\t\"If the cache contains childCrum it must be made \n\tto contain childCrum's new parent: parentCrum. \n\tAlso update CachedRoot.\" \n\t(myCachedPath hasMember: childCrum) ifTrue: \n\t\t[myCachedPath store: parentCrum.\n\t\t (myCachedRoot basicCast: Heaper star) == childCrum \n\t\t\tifTrue: [myCachedRoot _ parentCrum]]!\n*/\n}", "public Object execute(Object object) throws JMException {\n Solution solution = (Solution) object;\n\n if (!VALID_TYPES.contains(solution.getType().getClass())) {\n Configuration.logger_.severe(\"BitFlipMutation.execute: the solution \" +\n \"is not of the right type. The type should be 'Binary', \" +\n \"'BinaryReal' or 'Int', but \" + solution.getType() + \" is obtained\");\n\n Class cls = java.lang.String.class;\n String name = cls.getName();\n throw new JMException(\"Exception in \" + name + \".execute()\");\n } // if\n\n doMutation(mutationProbability_, solution);\n return solution;\n }", "public interface IReversalTransaction {\n\n ITransaction getOriginalMessage();\n // private final ITransaction original;\n\n\n}", "private Node rotateRight() {\n Node left = this.leftChild;\n this.leftChild = left.rightChild;\n left.rightChild = this;\n\n this.updateHeight();\n left.updateHeight();\n\n return left;\n }", "public abstract Type treeCopy();" ]
[ "0.58005905", "0.5568554", "0.53592485", "0.5229056", "0.5219177", "0.5200968", "0.49497002", "0.4875524", "0.47748837", "0.47725117", "0.4772468", "0.4732728", "0.4704291", "0.46720904", "0.46627486", "0.46214896", "0.46030727", "0.45932367", "0.45539597", "0.453638", "0.452777", "0.45199573", "0.45083156", "0.44993517", "0.44632396", "0.44576555", "0.4451942", "0.44160733", "0.44146672", "0.44092342", "0.4368372", "0.43648878", "0.43644127", "0.43592155", "0.43160802", "0.42909804", "0.42892128", "0.4284455", "0.42817318", "0.42687848", "0.42676255", "0.426416", "0.4243356", "0.41830167", "0.4176538", "0.41756517", "0.4163449", "0.4163005", "0.41607025", "0.41573706", "0.41554272", "0.41552258", "0.41493386", "0.4148531", "0.41413987", "0.41039172", "0.41023636", "0.40901512", "0.40893403", "0.40851733", "0.4083172", "0.407764", "0.40722972", "0.40703776", "0.40660447", "0.40541458", "0.40512758", "0.4047259", "0.40429115", "0.4032688", "0.4032398", "0.40269095", "0.40262777", "0.4024089", "0.40211982", "0.40209693", "0.40185755", "0.400559", "0.40007836", "0.39984792", "0.39949757", "0.3990525", "0.39860004", "0.39846677", "0.39844176", "0.39824978", "0.39814952", "0.39798573", "0.3975903", "0.39753377", "0.3968502", "0.3964729", "0.39642736", "0.39632195", "0.39595023", "0.39557278", "0.39492643", "0.39397734", "0.39373052", "0.39368427" ]
0.67307985
0
Implementation of Exchange Mutation.
public Chromosome doExchangeMutation(){ for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){ ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection); int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); Collections.swap(newSelection, allele1, allele2); Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated(); if(mutatedKnapsack.isValid()) return mutatedKnapsack; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void editExchange() {\n\t\t\n\t}", "@Override\n\tpublic void process(Exchange arg0) throws Exception {\n\t\t\n\t}", "public abstract void mutate();", "public interface IExchange {\r\n}", "public ExchangeNode(PlanNodeId id, PlanNode inputNode) {\n super(id, inputNode, EXCHANGE_NODE, StatisticalType.EXCHANGE_NODE);\n offset = 0;\n limit = -1;\n this.conjuncts = Collections.emptyList();\n children.add(inputNode);\n computeTupleIds();\n }", "void xsetExchange(com.unitedtote.schema.totelink._2008._06.program.ExchangeWagers exchange);", "private int[] mutationPairwiseExchange(int[] mutant) {\n\t\tint pairPoint1 = rand.nextInt(mutant.length);\n\t\tint pairPoint2 = pairPoint1;\n\t\twhile (mutant[pairPoint2] == mutant[pairPoint1]) {\n\t\t\tpairPoint2 = rand.nextInt(mutant.length); //find element in different bucket\n\t\t}\n\t\tint temp = mutant[pairPoint1];\n\t\tmutant[pairPoint1] = mutant[pairPoint2];\n\t\tmutant[pairPoint2] = temp;\n\t\treturn mutant;\n\t}", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "public Chromosome doInversionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.reverse(newSelection.subList(Math.min(allele1, allele2), Math.max(allele1, allele2)));\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public interface Mutation {\n void apply(Collection<PartType> parts);\n}", "private void introduceMutations() {\n }", "public ExchangeNode(PlanNodeId id, PlanNode inputNode, boolean copyConjuncts) {\n super(id, inputNode, EXCHANGE_NODE, StatisticalType.EXCHANGE_NODE);\n offset = 0;\n children.add(inputNode);\n if (!copyConjuncts) {\n this.conjuncts = Lists.newArrayList();\n }\n // Only apply the limit at the receiver if there are multiple senders.\n if (inputNode.getFragment().isPartitioned()) {\n limit = inputNode.limit;\n }\n if (!(inputNode instanceof ExchangeNode)) {\n offset = inputNode.offset;\n }\n computeTupleIds();\n }", "public void setExchange(Exchange exchange) {\r\n this.exchange = exchange;\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\tif (rand < MUTATION_PROB) {\r\n\t\t\t\t\t// change the sign\r\n\t\t\t\t\tInteger vPoint = chr.get(j);\r\n\t\t\t\t\tchr.remove(j);\r\n\t\t\t\t\tchr.add(j, new Integer(- (vPoint.intValue()%100)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.printChromosomes(\"After Mutation\");\r\n\t}", "@Override\n public Expr apply(Context ctx, Expr tuple, Expr val) {\n throw new UnsupportedOperationException(\"Unsupported z3 operation\");\n /*return em.tupleUpdateExpr(tuple, index, val);*/\n }", "public Exchange(int a) {\r\n id = a;\r\n // allexchanges.Insert(new ExchangeNode(this)); //problem here\r\n }", "@Override\r\n\tpublic Exchange aggregate(Exchange oldExchange, Exchange newExchange) {\n\t\tInteger oldBid=0;\r\n\t\tif(oldExchange!=null){\r\n\t\t\toldBid = oldExchange.getIn().getHeader(\"Bid\", Integer.class);\r\n\t\t}\r\n\t\tInteger newBid = newExchange.getIn().getHeader(\"Bid\", Integer.class);\r\n return (newBid > oldBid) ? newExchange : oldExchange;\r\n\t}", "@Override\n\t\t\tpublic IAMQPExchange exchange() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IAMQPExchange exchange() {\n\t\t\t\treturn null;\n\t\t\t}", "public Chromosome doInsertionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n boolean value = newSelection.get(allele2);\n\n newSelection.remove(allele2);\n try{\n newSelection.add(allele1 + 1, value);\n }\n catch(IndexOutOfBoundsException e){\n newSelection.add(value);\n }\n \n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "E update(E entiry);", "@Test\n public void oldNotUpdateSuccessExchangeWithdraw() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, String.valueOf(1), firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n long id = 1;\n //V1 not update\n ExchangeCapsule exchangeCapsule = dbManager.getExchangeStore().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule.getID());\n Assert.assertEquals(1000000, exchangeCapsule.getCreateTime());\n Assert.assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsule.getSecondTokenId()));\n Assert.assertNotEquals(0L, exchangeCapsule.getFirstTokenBalance());\n Assert.assertNotEquals(0L, exchangeCapsule.getSecondTokenBalance());\n //V2\n ExchangeCapsule exchangeCapsule2 = dbManager.getExchangeV2Store().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule2.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule2.getID());\n Assert.assertEquals(1000000, exchangeCapsule2.getCreateTime());\n Assert.assertEquals(0L, exchangeCapsule2.getFirstTokenBalance());\n Assert.assertEquals(0L, exchangeCapsule2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetMap = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(firstTokenQuant, assetMap.get(String.valueOf(1)).longValue());\n Assert.assertEquals(secondTokenQuant, assetMap.get(String.valueOf(2)).longValue());\n\n Assert.assertEquals(secondTokenQuant, ret.getExchangeWithdrawAnotherAmount());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "protected synchronized void gossipMessage(GossipMessage message){\n // p sent to q the updates\n if (message.isSender()) {\n\n storage.reconciliation(message.getParticipantStates(), history, this.current_timestep);\n\n if (this.flow_control) {\n // in case we were not updating before and the new updateRate is > 0. Need to start updating again.\n if (this.updateRate == 0 && message.getMaximumUR() > 0){\n scheduleUpdateTimeout(Math.round(1000/message.getMaximumUR()), TimeUnit.MILLISECONDS);\n }\n // get the new maximum update rate computed at node p\n this.updateRate = message.getMaximumUR();\n }\n\n // answer with the updates p has to do. Sender set to null because we do not need to answer to this message\n ArrayList<Delta> toBeUpdated = storage.computeDifferences(this.storedDigests.get(getSender()));\n\n if (this.desiredUR != 0 && this.flow_control){\n localAdaptation(toBeUpdated.size());\n }\n\n if (toBeUpdated.size() > this.mtu){\n this.ifGossipMessageGreaterThanMTU[this.current_timestep] = true;\n }\n this.numberOfDeltasSent.get(this.current_timestep).add(toBeUpdated.size());\n\n\n getSender().tell(new GossipMessage(false,\n storage.mtuResizeAndSort(toBeUpdated, mtu, new PreciseComparator(), this.method)), null);\n\n logger.info(\"Fourth phase: sending differences to \" + getSender());\n } else {\n // receiving message(s) from q.\n if (getSender() == getContext().system().deadLetters()) { // this is the message with deltas\n\n storage.reconciliation(message.getParticipantStates(), history, this.current_timestep);\n\n logger.info(\"Gossip completed\");\n } else { // digest message to respond to\n // send to q last message of exchange with deltas.\n ArrayList<Delta> toBeUpdated = storage.computeDifferences(message.getParticipantStates());\n\n float senderupdateRate = 0;\n if (this.flow_control){\n // here we calculate the new flow control parameters updating the local maximum update rate\n // the sender update rate gets included in the gossip message to q\n if (this.desiredUR == 0){\n // we assume that if someone does not want to transmit then no one\n // else should either since we have global control over the update rate.\n senderupdateRate = 0;\n }else {\n senderupdateRate = computeUpdateRate(message.getMaximumUR(), message.getDesiredUR());\n }\n }\n\n if (this.desiredUR != 0 && this.flow_control){\n localAdaptation(toBeUpdated.size());\n }\n\n if (toBeUpdated.size() > this.mtu){\n this.ifGossipMessageGreaterThanMTU[this.current_timestep] = true;\n }\n this.numberOfDeltasSent.get(this.current_timestep).add(toBeUpdated.size());\n\n getSender().tell(new GossipMessage(true,\n storage.mtuResizeAndSort(toBeUpdated, mtu, new PreciseComparator(), this.method),\n 0,\n senderupdateRate), self());\n\n logger.info(\"Third phase: sending differences to \" + getSender());\n }\n }\n }", "public Chromosome doDisplacementMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n\n int leftAllele = Math.min(allele1, allele2);\n int rightAllele = Math.max(allele1, allele2);\n\n var selectionSublist = new ArrayList<Boolean>(newSelection.subList(leftAllele, rightAllele));\n for(int j = leftAllele; j < rightAllele + 1; j++){\n newSelection.remove(leftAllele);\n }\n\n int index = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()+1);\n newSelection.addAll(index, selectionSublist);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public abstract Chromosome mutation(Chromosome child);", "public Exchange getExchange() {\r\n return exchange;\r\n }", "public abstract void commit(Iterable<? extends GroundAtom> atoms);", "protected void send(O operation)\n {\n }", "@API.Public\npublic interface DocumentMutation extends Iterable<MutationOp> {\n\n /**\n * Empties this Mutation object.\n */\n public DocumentMutation empty();\n\n /**\n * Sets the value of given field to the specified value. If the value of\n * given field name doesn't exist in the existing document on the server\n * then new field will be created.\n *\n * If the value for the given field name exists in the existing document\n * on server and its of the same type as the new value then existing value\n * will be replaced by new value.\n *\n * If the value of given field name exists and it is not same type as the\n * type of newly set value then mutation will fail.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setNull(String path);\n\n public DocumentMutation setNull(FieldPath path);\n\n public DocumentMutation set(String path, Value v);\n\n public DocumentMutation set(FieldPath path, Value v);\n\n public DocumentMutation set(String path, boolean b);\n\n public DocumentMutation set(FieldPath path, boolean b);\n\n public DocumentMutation set(String path, short s);\n\n public DocumentMutation set(FieldPath path, short s);\n\n public DocumentMutation set(String path, byte b);\n\n public DocumentMutation set(FieldPath path, byte b);\n\n public DocumentMutation set(String path, int i);\n\n public DocumentMutation set(FieldPath path, int i);\n\n public DocumentMutation set(String path, long l);\n\n public DocumentMutation set(FieldPath path, long l);\n\n public DocumentMutation set(String path, float f);\n\n public DocumentMutation set(FieldPath path, float f);\n\n public DocumentMutation set(String path, double d);\n\n public DocumentMutation set(FieldPath path, double d);\n\n public DocumentMutation set(String path, String value);\n\n public DocumentMutation set(FieldPath path, String value);\n\n public DocumentMutation set(String path, BigDecimal bd);\n\n public DocumentMutation set(FieldPath path, BigDecimal bd);\n\n public DocumentMutation set(String path, Time t);\n\n public DocumentMutation set(FieldPath path, Time t);\n\n public DocumentMutation set(String path, Timestamp t);\n\n public DocumentMutation set(FieldPath path, Timestamp t);\n\n public DocumentMutation set(String path, Date d);\n\n public DocumentMutation set(FieldPath path, Date d);\n\n public DocumentMutation set(String path, List<? extends Object> value);\n\n public DocumentMutation set(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation set(String path, Interval intv);\n\n public DocumentMutation set(FieldPath path, Interval intv);\n\n public DocumentMutation set(String path, ByteBuffer bb);\n\n public DocumentMutation set(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation set(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(FieldPath path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(String path, Document value);\n\n public DocumentMutation set(FieldPath path, Document value);\n\n\n /**\n * Sets or replaces the value of a given field with the new value given in the API.\n * This is a fast API that doesn't require a read on the server to validate\n * the path or type.\n *\n * If any element in the specified field path doesn't exist then that element\n * will be created on the server.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose the server has only the field \"a\" of type map, then a setOrReplace of \"a.b.c\"\n * will create element \"b\" of type map inside \"a\". It will also create an element\n * named \"c\" of type integer inside map \"b\".\n *\n * If any element specified in the field path is of a different type\n * than the existing field element on the server, it will be deleted and replaced by\n * a new element.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose on the server, there is a field \"a\" of type array. This operation\n * will delete \"a\", create new element \"a\" of type map, and insert \"b.c\" in it.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setOrReplace(String path, Value v);\n\n public DocumentMutation setOrReplace(FieldPath path, Value v);\n\n public DocumentMutation setOrReplaceNull(String path);\n\n public DocumentMutation setOrReplaceNull(FieldPath path);\n\n public DocumentMutation setOrReplace(String path, boolean b);\n\n public DocumentMutation setOrReplace(FieldPath path, boolean b);\n\n public DocumentMutation setOrReplace(String path, short s);\n\n public DocumentMutation setOrReplace(FieldPath path, short s);\n\n public DocumentMutation setOrReplace(String path, byte b);\n\n public DocumentMutation setOrReplace(FieldPath path, byte b);\n\n public DocumentMutation setOrReplace(String path, int i);\n\n public DocumentMutation setOrReplace(FieldPath path, int i);\n\n public DocumentMutation setOrReplace(String path, long l);\n\n public DocumentMutation setOrReplace(FieldPath path, long l);\n\n public DocumentMutation setOrReplace(String path, float f);\n\n public DocumentMutation setOrReplace(FieldPath path, float f);\n\n public DocumentMutation setOrReplace(String path, double d);\n\n public DocumentMutation setOrReplace(FieldPath path, double d);\n\n public DocumentMutation setOrReplace(String path, String value);\n\n public DocumentMutation setOrReplace(FieldPath path, String value);\n\n public DocumentMutation setOrReplace(String path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(FieldPath path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(String path, Time t);\n\n public DocumentMutation setOrReplace(FieldPath path, Time t);\n\n public DocumentMutation setOrReplace(String path, Timestamp t);\n\n public DocumentMutation setOrReplace(FieldPath path, Timestamp t);\n\n public DocumentMutation setOrReplace(String path, Date d);\n\n public DocumentMutation setOrReplace(FieldPath path, Date d);\n\n public DocumentMutation setOrReplace(String path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Interval intv);\n\n public DocumentMutation setOrReplace(FieldPath path, Interval intv);\n\n public DocumentMutation setOrReplace(String path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path,\n Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Document value);\n\n public DocumentMutation setOrReplace(FieldPath path, Document value);\n\n /**\n * Appends elements to an existing array. If the field doesn't exist on server,\n * it will be created and this operation proceeds. If the field already exists,\n * this operation will validate that the existing field is of the array type.\n * If it is of a different type, then this operation will fail.\n */\n public DocumentMutation append(String path, List<? extends Object> value);\n\n public DocumentMutation append(FieldPath path, List<? extends Object> value);\n\n /**\n * Appends elements to an existing string. This operation will first\n * validate on the server that the field specified by the given path\n * exists and is of the string type. If the field doesn't exist or is\n * of a different type, then the operation will fail.\n */\n public DocumentMutation append(String path, String value);\n\n public DocumentMutation append(FieldPath path, String value);\n\n /**\n * Appends a given byte array to the existing binary data stored on the server\n * on the given path. This operation will fail if the given field on the server is not of the\n * BINARY type. If the field path specified for append doesn't\n * exist on a server record, then this operation will create a new element at the\n * append path. This new element will be of BINARY type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of the intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, the record a itself is an array or integer.\n *\n * This operation will perform read-modify-write on the server.\n *\n * @param path field path\n * @param value byte array value\n * @param offset offset in byte array\n * @param len length in byte array\n * @return this Mutation Object\n */\n public DocumentMutation append(String path, byte[] value, int offset, int len);\n\n public DocumentMutation append(FieldPath path, byte[] value, int offset, int len);\n\n public DocumentMutation append(String path, byte[] value);\n\n public DocumentMutation append(FieldPath path, byte[] value);\n\n public DocumentMutation append(String path, ByteBuffer value);\n\n public DocumentMutation append(FieldPath path, ByteBuffer value);\n\n /**\n * Merges the existing value on the server for the given field path with the new map\n * provided in the input. This operation will first validate that the entry with the\n * given field name exists on the server and is of the MAP type.\n *\n * If the entry is of a type other than MAP, then the operation will fail.\n * If the field path specified for merge doesn't\n * exist in the record on the server, then this operation will create a new element at the\n * given path. This new element will be of the MAP type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, record a itself is an array or integer.\n *\n * @param path field path\n * @param value the value to be merged with existing value of a field on the server\n * @return this record mutation\n */\n public DocumentMutation merge(String path, Document value);\n\n public DocumentMutation merge(FieldPath path, Document value);\n\n public DocumentMutation merge(String path, Map<String, Object> value);\n\n public DocumentMutation merge(FieldPath path, Map<String, Object> value);\n\n /**\n * Atomically applies an increment to a given field (in dot separated notation)\n * of the given row id.\n *\n * If the field path specified for the incremental change doesn't\n * exist in the server record then this operation will create a new element at the\n * given path. This new element will be of same type as the value specified\n * in the parameter.\n *\n * This operation will fail if the type of any intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail\n * if, on the server, record a itself is an array or integer.\n *\n * If the field doesn't exist on\n * the server then it will be created with the type of given incremental value.\n * An increment operation can be applied on any of the numeric types\n * of a field, such as byte, short, int, long, float, double, or decimal.\n * The operation will fail if the increment is applied to a field\n * that is of a non-numeric type.\n *\n * The increment operation won't change the type of the existing value stored in\n * the given field for the row. The resultant value of the field will be\n * truncated based on the original type of the field.\n *\n * For example, field 'score' is of type int and contains 60. The increment\n * '5.675', a double, is applied. The resultant value of the field\n * will be 65 (65.675 will be truncated to 65).\n *\n * @param path field name in dot separated notation\n * @param inc increment to apply to a field - can be positive or negative\n */\n public DocumentMutation increment(FieldPath path, byte inc);\n\n public DocumentMutation increment(String path, byte inc);\n\n public DocumentMutation increment(FieldPath path, short inc);\n\n public DocumentMutation increment(String path, short inc);\n\n public DocumentMutation increment(String path, int inc);\n\n public DocumentMutation increment(FieldPath path, int inc);\n\n public DocumentMutation increment(FieldPath path, long inc);\n\n public DocumentMutation increment(String path, long inc);\n\n public DocumentMutation increment(String path, float inc);\n\n public DocumentMutation increment(FieldPath path, float inc);\n\n public DocumentMutation increment(String path, double inc);\n\n public DocumentMutation increment(FieldPath path, double inc);\n\n public DocumentMutation increment(String path, BigDecimal inc);\n\n public DocumentMutation increment(FieldPath path, BigDecimal inc);\n\n /**\n * Deletes the field at the given path.\n * If the field does not exist, this method silently returns without doing anything.\n * For example, if a delete operation is attempted on a.b.c, and a.b is an array on the\n * server, then a.b.c will not be deleted.\n */\n public DocumentMutation delete(String path);\n\n public DocumentMutation delete(FieldPath path);\n\n}", "private Object mutation(Individual child){\n\t\treturn problem.improve(child.getId());\r\n\t}", "public Chromosome doBitFlipMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n int itemToMutate = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n newSelection.set(itemToMutate, !newSelection.get(itemToMutate));\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "CompletableFuture<Exchange> asyncSend(Endpoint endpoint, Exchange exchange);", "@Override\n public void action() {\n MessageTemplate mt = MessageTemplate.MatchOntology(\"clones-update\");\n ACLMessage msg = myAgent.receive(mt);\n if (msg != null) {\n try {\n AuctionResult auctionResult = (AuctionResult) msg.getContentObject();\n ((ArtistManagerAgent) myAgent).addCloneAuctionResult(auctionResult, msg.getSender());\n } catch (UnreadableException e) {\n e.printStackTrace();\n }\n } else {\n block();\n }\n }", "public void syncToDataStore(String exchangeCode, Collection<MarketData> items);", "@Override\n protected String getExchangeName() {return _exchangeName;}", "@Override\n\tpublic void update(Member mem) {\n\t\t\n\t}", "public void setMutationRate(double rate) { this.exec = this.exec.withProperty(\"svum.rate\", rate); }", "@Override\n public void transferred(long num) {\n }", "@Override\n public void transferred(long num) {\n }", "void setExchange(com.unitedtote.schema.totelink._2008._06.program.ExchangeWagers.Enum exchange);", "public interface IReversalTransaction {\n\n ITransaction getOriginalMessage();\n // private final ITransaction original;\n\n\n}", "@Override\n\tpublic void modify(int quantity) {\n\t}", "@Override\n public void process(Exchange exchange) throws Exception {\n SetorReq setorReq = exchange.getMessage().getBody(SetorReq.class);\n exchange.getIn().setBody(new String(buildISOMessage(currentId.stanGenerator(),currentId.nextJournalId(),setorReq)));\n\n }", "public void mraiExpire() {\n for (int tDest : this.dirtyDest) {\n this.sendUpdate(tDest);\n }\n this.dirtyDest.clear();\n }", "public TransactionalElement<E> commit();", "@Override\n public DomainMessage update(DomainMessage entity) {\n throw new UnsupportedOperationException();\n }", "public interface ConnectionExchangeInterface\n{\n\n /*\n * The Connection entity is the top level element to describe the information needed to create a connector to an asset.\n */\n\n /**\n * Create a new metadata element to represent the connection.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this element\n * @param externalIdentifierProperties optional properties used to define an external identifier\n * @param connectionProperties properties to store\n *\n * @return unique identifier of the new metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n String createConnection(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n ExternalIdentifierProperties externalIdentifierProperties,\n ConnectionProperties connectionProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Create a new metadata element to represent a connection using an existing metadata element as a template.\n * The template defines additional classifications and relationships that should be added to the new asset.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this element\n * @param externalIdentifierProperties optional properties used to define an external identifier\n * @param templateGUID unique identifier of the metadata element to copy\n * @param templateProperties properties that override the template\n *\n * @return unique identifier of the new metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n String createConnectionFromTemplate(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String templateGUID,\n ExternalIdentifierProperties externalIdentifierProperties,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Update the metadata element representing a connection.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectionGUID unique identifier of the metadata element to update\n * @param connectionExternalIdentifier unique identifier of the connection in the external asset manager\n * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)?\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n * @param connectionProperties new properties for this element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void updateConnection(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectionGUID,\n String connectionExternalIdentifier,\n boolean isMergeUpdate,\n ConnectionProperties connectionProperties,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Create a relationship between a connection and a connector type.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this relationship\n * @param connectionGUID unique identifier of the connection in the external asset manager\n * @param connectorTypeGUID unique identifier of the connector type in the external asset manager\n * @param effectiveFrom the date when this element is active - null for active now\n * @param effectiveTo the date when this element becomes inactive - null for active until deleted\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void setupConnectorType(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String connectorTypeGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Remove a relationship between a connection and a connector type.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectionGUID unique identifier of the connection in the external asset manager\n * @param connectorTypeGUID unique identifier of the connector type in the external asset manager\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void clearConnectorType(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectionGUID,\n String connectorTypeGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Create a relationship between a connection and an endpoint.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this relationship\n * @param connectionGUID unique identifier of the connection in the external asset manager\n * @param endpointGUID unique identifier of the endpoint in the external asset manager\n * @param effectiveFrom the date when this element is active - null for active now\n * @param effectiveTo the date when this element becomes inactive - null for active until deleted\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void setupEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String endpointGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Remove a relationship between a connection and an endpoint.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectionGUID unique identifier of the connection in the external asset manager\n * @param endpointGUID unique identifier of the endpoint in the external asset manager\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void clearEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectionGUID,\n String endpointGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Create a relationship between a virtual connection and an embedded connection.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this relationship\n * @param connectionGUID unique identifier of the virtual connection in the external asset manager\n * @param properties properties describing how to use the embedded connection such as: Which order should this connection be processed;\n * What additional properties should be passed to the embedded connector via the configuration properties;\n * What does this connector signify?\n * @param embeddedConnectionGUID unique identifier of the embedded connection in the external asset manager\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void setupEmbeddedConnection(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String embeddedConnectionGUID,\n EmbeddedConnectionProperties properties,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Remove a relationship between a virtual connection and an embedded connection.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectionGUID unique identifier of the virtual connection in the external asset manager\n * @param embeddedConnectionGUID unique identifier of the embedded connection in the external asset manager\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void clearEmbeddedConnection(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectionGUID,\n String embeddedConnectionGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Create a relationship between an asset and its connection.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this relationship\n * @param assetGUID unique identifier of the asset\n * @param connectionGUID unique identifier of the connection\n * @param properties summary of the asset that is stored in the relationship between the asset and the connection.\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void setupAssetConnection(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String assetGUID,\n String connectionGUID,\n AssetConnectionProperties properties,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Remove a relationship between an asset and its connection.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetGUID unique identifier of the asset\n * @param connectionGUID unique identifier of the connection\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void clearAssetConnection(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String assetGUID,\n String connectionGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Remove the metadata element representing a connection. This will delete all anchored\n * elements such as comments.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectionGUID unique identifier of the metadata element to remove\n * @param connectionExternalIdentifier unique identifier of the connection in the external asset manager\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void removeConnection(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectionGUID,\n String connectionExternalIdentifier,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of asset metadata elements that contain the search string.\n * The search string is treated as a regular expression.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param searchString string to find in the properties\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<ConnectionElement> findConnections(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String searchString,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of asset metadata elements with a matching qualified or display name.\n * There are no wildcards supported on this request.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param name name to search for\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<ConnectionElement> getConnectionsByName(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String name,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of assets created on behalf of the named asset manager.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<ConnectionElement> getConnectionsForAssetManager(String userId,\n String assetManagerGUID,\n String assetManagerName,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the connection metadata element with the supplied unique identifier.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectionGUID unique identifier of the requested metadata element\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return matching metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n ConnectionElement getConnectionByGUID(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectionGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /*\n * The Endpoint entity describes the location of the resource.\n */\n\n /**\n * Create a new metadata element to represent the endpoint.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this element\n * @param externalIdentifierProperties optional properties used to define an external identifier\n * @param endpointProperties properties to store\n *\n * @return unique identifier of the new metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n String createEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n ExternalIdentifierProperties externalIdentifierProperties,\n EndpointProperties endpointProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Create a new metadata element to represent an endpoint using an existing metadata element as a template.\n * The template defines additional classifications and relationships that should be added to the new endpoint.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this element\n * @param externalIdentifierProperties optional properties used to define an external identifier\n * @param templateGUID unique identifier of the metadata element to copy\n * @param templateProperties properties that override the template\n *\n * @return unique identifier of the new metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n String createEndpointFromTemplate(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String templateGUID,\n ExternalIdentifierProperties externalIdentifierProperties,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Update the metadata element representing an endpoint.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param endpointGUID unique identifier of the metadata element to update\n * @param endpointExternalIdentifier unique identifier of the endpoint in the external asset manager\n * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)?\n * @param endpointProperties new properties for this element\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void updateEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String endpointGUID,\n String endpointExternalIdentifier,\n boolean isMergeUpdate,\n EndpointProperties endpointProperties,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Remove the metadata element representing an endpoint. This will delete the endpoint and all categories\n * and terms.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param endpointGUID unique identifier of the metadata element to remove\n * @param endpointExternalIdentifier unique identifier of the endpoint in the external asset manager\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void removeEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String endpointGUID,\n String endpointExternalIdentifier,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of endpoint metadata elements that contain the search string.\n * The search string is treated as a regular expression.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param searchString string to find in the properties\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<EndpointElement> findEndpoints(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String searchString,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of endpoint metadata elements with a matching qualified or display name.\n * There are no wildcards supported on this request.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param name name to search for\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<EndpointElement> getEndpointsByName(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String name,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of glossaries created on behalf of the named asset manager.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<EndpointElement> getEndpointsForAssetManager(String userId,\n String assetManagerGUID,\n String assetManagerName,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the endpoint metadata element with the supplied unique identifier.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param endpointGUID unique identifier of the requested metadata element\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return matching metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n EndpointElement getEndpointByGUID(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String endpointGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n\n /*\n * The ConnectorType entity describes a specific connector implementation.\n */\n\n\n /**\n * Create a new metadata element to represent the root of a connectorType.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this element\n * @param externalIdentifierProperties optional properties used to define an external identifier\n * @param connectorTypeProperties properties to store\n *\n * @return unique identifier of the new metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n String createConnectorType(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n ExternalIdentifierProperties externalIdentifierProperties,\n ConnectorTypeProperties connectorTypeProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Create a new metadata element to represent a connectorType using an existing metadata element as a template.\n * The template defines additional classifications and relationships that should be added to the new connectorType.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param assetManagerIsHome ensure that only the asset manager can update this element\n * @param externalIdentifierProperties optional properties used to define an external identifier\n * @param templateGUID unique identifier of the metadata element to copy\n * @param templateProperties properties that override the template\n *\n * @return unique identifier of the new metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n String createConnectorTypeFromTemplate(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String templateGUID,\n ExternalIdentifierProperties externalIdentifierProperties,\n TemplateProperties templateProperties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Update the metadata element representing a connectorType.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectorTypeGUID unique identifier of the metadata element to update\n * @param connectorTypeExternalIdentifier unique identifier of the connectorType in the external asset manager\n * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)?\n * @param connectorTypeProperties new properties for this element\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void updateConnectorType(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectorTypeGUID,\n String connectorTypeExternalIdentifier,\n boolean isMergeUpdate,\n ConnectorTypeProperties connectorTypeProperties,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Remove the metadata element representing a connectorType. This will delete the connectorType and all categories\n * and terms.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param connectorTypeGUID unique identifier of the metadata element to remove\n * @param connectorTypeExternalIdentifier unique identifier of the connectorType in the external asset manager\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n void removeConnectorType(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectorTypeGUID,\n String connectorTypeExternalIdentifier,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of connectorType metadata elements that contain the search string.\n * The search string is treated as a regular expression.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param searchString string to find in the properties\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<ConnectorTypeElement> findConnectorTypes(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String searchString,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of connectorType metadata elements with a matching qualified or display name.\n * There are no wildcards supported on this request.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param name name to search for\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<ConnectorTypeElement> getConnectorTypesByName(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String name,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the list of glossaries created on behalf of the named asset manager.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param startFrom paging start point\n * @param pageSize maximum results that can be returned\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return list of matching metadata elements\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n List<ConnectorTypeElement> getConnectorTypesForAssetManager(String userId,\n String assetManagerGUID,\n String assetManagerName,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n\n\n /**\n * Retrieve the connectorType metadata element with the supplied unique identifier.\n *\n * @param userId calling user\n * @param assetManagerGUID unique identifier of software capability representing the caller\n * @param assetManagerName unique name of software capability representing the caller\n * @param openMetadataGUID unique identifier of the requested metadata element\n * @param effectiveTime when should the elements be effected for - null is anytime; new Date() is now\n * @param forLineage return elements marked with the Memento classification?\n * @param forDuplicateProcessing do not merge elements marked as duplicates?\n *\n * @return matching metadata element\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws UserNotAuthorizedException the user is not authorized to issue this request\n * @throws PropertyServerException there is a problem reported in the open metadata server(s)\n */\n ConnectorTypeElement getConnectorTypeByGUID(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String openMetadataGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;\n}", "@Override\n\t\tpublic void process(Exchange ex) throws Exception {\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tWork work = ex.getIn().getBody(Work.class);\n\t\t\tTraitHierarchy thNew = (TraitHierarchy) work.getNewContainer();\n\t\t\tTraitHierarchy thOld = (TraitHierarchy) work.getOldContainer();\n\t\t\tex.getOut().setHeader(TRAIT_HIERARCHY, thNew); //TODO check if trait hierarchy is correct one\n\t\t\tif ( thNew.getLevel() == _200 && (thNew.getMaxTraitQty() > 0) && (thOld.getMaxTraitQty() == 0 || \n\t\t\t\t\t(thNew.getMaxTraitQty() < thOld.getMaxTraitQty()))){\n\t\t\t\tex.getOut().setBody(thNew);\n\t\t\t} else { \n\t\t\t\tex.getOut().setBody(null);\n\t\t\t}\n\t\t}", "@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n AdjustTransactionRequest adjustTransactionRequest = new AdjustTransactionRequest();\n adjustTransactionRequest.setEmvData(emvData1);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionUpdateRequest(\n transaction.getFundingSource().getEntryDetails(),\n transaction.getProcessorResponse().getRetrievalRefNum(),\n adjustTransactionRequest);\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n if (elavonResponse.isSuccess()) {\n Log.d(TAG, \"Successfully Captured EMV Data for: \" + transaction.getId());\n } else {\n Log.e(TAG, \"Failed to capture EMV Data for: \" + transaction.getId());\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n Log.e(TAG, \"Failed to capture EMV Data for: \" + transaction.getId());\n }\n });\n }", "private void publishExpression(Expression exp) throws JMSException, InvalidOperationException {\n notifySolvers();\n // Now a solver has been found\n if (exp.getOperation().equals(type)) {\n System.out.println(\"Sending expression\");\n ObjectMessage msg = discoverySession.createObjectMessage();\n msg.setObject(exp);\n sender.send(msg);\n System.out.println(\"Expression sent to solver\");\n } else {\n String msg = \"Invalid operand in expression. Agent configured to operand \" + type;\n throw new InvalidOperationException(msg);\n }\n }", "void unsetExchange();", "@Override\n @SuppressWarnings(\"unchecked\")\n protected void customSync() {\n Exchanger<Void>[] exchangers = (Exchanger<Void>[]) new Exchanger<?>[PRODUCERS_COUNT];\n\n for (int i = 0; i < PRODUCERS_COUNT; i++) {\n exchangers[i] = new Exchanger<>();\n new Producer(params.dataResults, params.postResult, exchangers[i]).start();\n }\n\n new Consumer(params.postFinish, exchangers).start();\n }", "R commit(C change);", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "@Override\r\n\tpublic int updateMarket(MarketDto dto) {\n\t\treturn session.update(\"kdc.market.updateMarket\", dto);\r\n\t}", "@Override\n\tpublic void applyMutation(int index, double a_percentage) {\n\n\t}", "public double getUniformMutationRatio(){\n return delta;\n }", "boolean transfer(UUID from, UUID to, double amount);", "Couple[] Exchange (Couple[] v,Gift[] G) throws IOException{\n \n \n int i;\n String y;\n int s = 0;\n int e = 99;\n \n for (i = 0; i < 10; i++) {\n \n y = v[i].btype;\n \n \n if (\"Generous\" == y) {\n \n if ((v[i].spend <= v[i].bd)) {\n \n if (v[i].spend <= v[i].m) {\n \n v[i].lc = v[i].lc + 1;\n v[i].lv = v[i].lv + G[e].price;\n v[i].spend = v[i].spend +G[e].price;\n e--;\n \n }else {\n \n v[i].lc = v[i].lc + 1;\n v[i].lv = v[i].lv + G[e].price;\n v[i].spend = v[i].spend +G[e].price;\n v[i].extra = v[i].extra + G[e].price;\n e--;\n \n \n }\n \n }\n \n }else if (\"Miser\" == y) {\n \n if (v[i].spend <= v[i].m) {\n \n v[i].spend = v[i].spend + G[s].price;\n s++;\n }\n \n \n }else if (\"Geeky\" == y) {\n \n if (v[i].spend <= v[i].m) {\n \n v[i].spend = v[i].spend + G[s].price;\n s++;\n }else {\n \n v[i].spend = v[i].spend + G[e].price;\n v[i].extra = v[i].extra + G[e].price;\n \n } \n }\n \n \n \n }\n\n return v;\n}", "@Override\n\tpublic void execute() {\n\t\tthis.receiver.add(this.question, 42);\n\t}", "private Mutation mutationFromTuple(Tuple t) throws IOException\n {\n Mutation mutation = new Mutation();\n if (t.get(1) == null)\n {\n if (allow_deletes)\n {\n mutation.deletion = new Deletion();\n mutation.deletion.predicate = new org.apache.cassandra.thrift.SlicePredicate();\n mutation.deletion.predicate.column_names = Arrays.asList(objToBB(t.get(0)));\n mutation.deletion.setTimestamp(FBUtilities.timestampMicros());\n }\n else\n throw new IOException(\"null found but deletes are disabled, set \" + PIG_ALLOW_DELETES +\n \"=true in environment or allow_deletes=true in URL to enable\");\n }\n else\n {\n org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();\n column.setName(objToBB(t.get(0)));\n column.setValue(objToBB(t.get(1)));\n column.setTimestamp(FBUtilities.timestampMicros());\n mutation.column_or_supercolumn = new ColumnOrSuperColumn();\n mutation.column_or_supercolumn.column = column;\n }\n return mutation;\n }", "protected synchronized void sendAtomic(S next, DeferredMessage<?> dmsg) throws MessageRejectedException {\n\t\tS old = this.state;\n\t\tthis.state = next;\n\t\ttry {\n\t\t\tdmsg.send();\n\t\t} catch (MessageRejectedException e) {\n\t\t\tthis.state = old;\n\t\t\tthrow e;\n\t\t}\n\t}", "public boolean saveOrUpdateStockExchange(StockExchange stockExchange);", "@Override\n\t\t\t\t\tpublic void transferred(long num) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t}", "void update(T message);", "@Override\n \t\t\tpublic void run ()\n \t\t\t{\n \t\t\t\tsynchronized ( heard )\n \t\t\t\t{\n \t\t\t\t\theard.clear ();\n \t\t\t\t}\n \t\t\t\t// re-transmit own until not in a block\n \t\t\t\tsynchronized ( own )\n \t\t\t\t{\n \t\t\t\t\tif ( !own.isEmpty () )\n \t\t\t\t\t{\n \t\t\t\t\t\tfor ( BitcoinPeer peer : network.getConnectPeers () )\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tInvMessage tm = (InvMessage) peer.createMessage (\"inv\");\n \t\t\t\t\t\t\tfor ( Tx t : own )\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tlog.debug (\"Re-broadcast \" + t.getHash ());\n \t\t\t\t\t\t\t\ttm.getTransactionHashes ().add (new Hash (t.getHash ()).toByteArray ());\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tpeer.send (tm);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}", "@Override\n\t\tpublic Exchange aggregate(Exchange oldEx, Exchange newEx) {\n\t\t\tif (action == Action.DELETE) {\n\t\t\t\tTraitHierarchy thNew = oldEx.getIn().getBody(TraitHierarchy.class);\n\t\t\t\tLong deptId = thNew.getId();\n\t\t\t\tTraitHierarchy th = newEx.getIn().getBody(TraitHierarchy.class);\n\t\t\t\tWork<TraitHierarchy> work = new Work<TraitHierarchy>(TraitHierarchy.class, th, new TraitHierarchy(deptId, EMPTY), action);\n\t\t\t\toldEx.getIn().setBody(work);\n\t\t\t} else if (action == Action.UPDATE) {\n\t\t\t\tTraitHierarchy thOld = newEx.getIn().getBody(TraitHierarchy.class);\n\t\t\t\tTraitHierarchy thNew = oldEx.getIn().getBody(TraitHierarchy.class);\n\t\t\t\tisParentDeptMoved(thOld, thNew);\n\t\t\t\tWork<TraitHierarchy> work = new Work<TraitHierarchy>(TraitHierarchy.class, thOld, thNew, action);\n\t\t\t\toldEx.getIn().setBody(work);\n\t\t\t} else {\n\t\t\t\tTraitHierarchy th = (TraitHierarchy) oldEx.getIn().getHeader(TRAIT_HIERARCHY);\n\t\t\t\tLong parentId = (Long) newEx.getIn().getBody();\n\t\t\t\tif (parentId != null) {\n\t\t\t\t\tth.setParentId(parentId);\n\t\t\t\t}\n\t\t\t\toldEx.getOut().setBody(th);\n\t\t\t}\n\t\t\treturn oldEx;\n\t\t}", "public abstract void update(Message message);", "int updateByPrimaryKeySelective(ExchangeOrder record);", "void update(Order order);", "Exchange getExchange(UniqueIdentifier uniqueId);", "public void saveChanges() throws MessagingException {\n/* 546 */ throw new IllegalWriteException(\"POP3 messages are read-only\");\n/* */ }", "default MutateNda<V> mut() { return getMut(); }", "int insert(IntegralExchange record);", "public abstract void dispatch(ExchangeContext context);", "@Override\r\n\tpublic void updatePurchase(Purchase Purchase) throws Exception {\n\t\t\r\n\t}", "CompletableFuture<Exchange> asyncSend(String endpointUri, Exchange exchange);", "void sendEntry(Entry e) {\n // System.out.println(\"Mapper.sendEntry()\");\n RemoteMapper dest = findMapper(e.getHash());\n try {\n if (predKey != 0) {\n removeKey(e.getHash());\n }\n dest.addEntry(e);\n } catch (RemoteException ex) {\n ex.printStackTrace();\n }\n\n }", "@Override\r\n\tpublic void uniqueUpdate() {\n\r\n\t}", "int updateByPrimaryKeySelective(IntegralExchange record);", "@Transactional\n\tpublic void updateConsumer() {\n\t\t\n\t}", "interface Update {}", "void update() {\r\n\r\n //shifting queue left 8 units\r\n for (int i = 0; i < 56; i++) {\r\n queue.set(i, queue.get(i + 8));\r\n }\r\n\r\n //adding results of plaintext XOR keystream to ciphertext\r\n ciphertext.addAll(xor(plaintext, keystream));\r\n\r\n //takes last 8 bits of ciphertext and copies to right 8 bits in queue \r\n int ciphertextIndexOfLast = ciphertext.size();\r\n\r\n for (int i = ciphertextIndexOfLast - 8; i < ciphertextIndexOfLast; i++) {\r\n queue.set((i - ((ciphertextIndexOfLast - 8)) + 56), ciphertext.get(i));\r\n }\r\n\r\n //using the new queue, populates registers with new data\r\n resetRegisters((ArrayList<Integer>) queue);\r\n }", "@Override\n\tpublic void update(CcNoticereceive entity) {\n\t\t\n\t}", "@Test\n public void testUpdateCallWithoutUpdate() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that mails has been send (updates still needs to be propagated) without any description\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.EMPTY, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertThat(\"Should have been no change\", change.getDiffDescription(), empty());\n }", "public interface OrderObserver{\n /**\n * Uses the provided action on the given Order.\n * @param order The affecting order.\n * @param action The specified action to use on the order.\n */\n public abstract void update(Order order, String action);\n \n}", "private void push() {\n ImmutableSortedSet<T> myAvailable = _outstanding.apply(\n new Syncd.Transformer<ImmutableSortedSet<T>, ImmutableSortedSet<T>>() {\n public Tuple<ImmutableSortedSet<T>, ImmutableSortedSet<T>> apply(ImmutableSortedSet<T> aBefore) {\n final SortedSet<T> myRemaining = new TreeSet<>(new MessageComparator<T>());\n\n // Identify those messages that are sequentially contiguous from _floor and can be passed on\n //\n ImmutableSortedSet<T> myAccessible =\n new ImmutableSortedSet.Builder<>(new MessageComparator<T>()).addAll(\n Iterables.filter(aBefore, new Predicate<T>() {\n public boolean apply(T aMessage) {\n Long myCurrent = _floor.get();\n\n if (aMessage.getSeq() == myCurrent) {\n // This message can be sent out to listeners so long as we're first to try\n //\n if (_floor.testAndSet(myCurrent, myCurrent + 1))\n return true;\n } else\n // This message must remain\n //\n myRemaining.add(aMessage);\n\n // Couldn't send message out or it must remain\n //\n return false;\n }\n })\n ).build();\n\n return new Tuple<>(new ImmutableSortedSet.Builder<>(\n new MessageComparator<T>()).addAll(myRemaining).build(),\n myAccessible);\n }\n }\n );\n\n send(myAvailable);\n archive(myAvailable);\n }", "@Override\n\tpublic void UpdateOrder(Order order) {\n\t\t\n\t}", "private void storeMutantShared(BlockStmt original, BlockStmt modified)\n {\n if (modified.equals(original))\n return;\n\n // Add Mutant\n addMutant(new ASTMutant(\n this.getOriginal().getCompilationUnit(),\n original,\n modified,\n this.getType()\n ));\n\n }", "public abstract void update(Order order, String action);", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\t\t\n\t}", "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public long getMutationIndex() {\n return mutationIndex;\n }", "@Override\r\n\tpublic void sendTradeOffer(TradeOffer offer) {\n\t\t\r\n\t}", "protected void exchange(int i, int j)\n {\n Key t = pq[i];\n pq[i] = pq[j];\n pq[j] = t;\n }", "List<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);", "MutateNda<V> getMut();", "@Override\r\n\tpublic void updateConsumer(Consumer con) {\n\r\n\t}", "public SO_Mutation(HashMap<String, Object> parameters) {\n super(parameters);\n if (parameters.get(\"probability\") != null)\n mutationProbability_ = (Double) parameters.get(\"probability\");\n }", "public interface ContentDuplicator {\n\n /**\n * Gets the ID of the store from which content is to be retrieved\n * @return storeId of the FROM storage provider\n */\n public String getFromStoreId();\n\n /**\n * Gets the ID of the store to which content is to be duplicated\n * @return storeId of the TO storage provider\n */\n public String getToStoreId();\n\n /**\n * This method creates a newly duplicated content item in the arg spaceId\n * with the arg contentId.\n *\n * @param spaceId of content item\n * @param contentId of content item\n * @return checksum of content\n */\n public String createContent(String spaceId, String contentId);\n\n /**\n * This method updates an existing content item in the arg spaceId with the\n * arg contentId\n *\n * @param spaceId of content item\n * @param contentId of content item\n */\n public void updateContent(String spaceId, String contentId);\n\n /**\n * This method deletes an existing content item in the arg spaceId with the\n * arg contentId\n *\n * @param spaceId of content item\n * @param contentId of content item\n */\n public void deleteContent(String spaceId, String contentId);\n\n /**\n * This method performs any necessary clean-up of the ContentDuplicator.\n */\n public void stop();\n}" ]
[ "0.529279", "0.52303183", "0.52171314", "0.5178655", "0.5166114", "0.5134284", "0.5089284", "0.5050947", "0.50260836", "0.502122", "0.49965948", "0.4960623", "0.49396202", "0.49137238", "0.4880048", "0.48644108", "0.48626265", "0.48555243", "0.48555243", "0.4805139", "0.47800684", "0.4757155", "0.47514448", "0.47351387", "0.47180402", "0.4715328", "0.46705684", "0.46673158", "0.4662291", "0.46324483", "0.46158645", "0.46036845", "0.45766196", "0.45653325", "0.45639944", "0.45635155", "0.4547707", "0.44918382", "0.44918382", "0.4483223", "0.4473637", "0.44698125", "0.44601104", "0.44599372", "0.44535294", "0.4434283", "0.44311014", "0.44193622", "0.4419047", "0.44190383", "0.44117787", "0.4408915", "0.44040793", "0.43992406", "0.43939078", "0.43934616", "0.43762422", "0.43627003", "0.4360857", "0.43606305", "0.43559128", "0.43535194", "0.43527743", "0.435185", "0.4350183", "0.43486005", "0.43470722", "0.43466842", "0.434501", "0.4338212", "0.43378142", "0.43296123", "0.43287143", "0.432542", "0.43243548", "0.43204492", "0.431343", "0.43100628", "0.43051228", "0.43042815", "0.43029863", "0.43011272", "0.42990422", "0.429498", "0.42942798", "0.42942578", "0.42876604", "0.4283564", "0.42798433", "0.42796713", "0.42754886", "0.42732376", "0.42691433", "0.42639306", "0.42555726", "0.42533875", "0.42430106", "0.42417365", "0.42413187", "0.42408007" ]
0.6151869
0
Implementation of Inversion Mutation.
public Chromosome doInversionMutation(){ for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){ ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection); int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); Collections.reverse(newSelection.subList(Math.min(allele1, allele2), Math.max(allele1, allele2))); Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated(); if(mutatedKnapsack.isValid()) return mutatedKnapsack; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void introduceMutations() {\n }", "@Override\n\tpublic void visit(InverseExpression arg0) {\n\n\t}", "@Override\n\tpublic void vInv() {\n\t\t\n\t}", "private int[] mutateInversionChild(int[] child) {\n println(\"before inversion mutation:\",1);\n displayChromosome(child, 1);\n int first = (int)(Math.random() * num_shipping_points);\n int second = (int)(Math.random() * num_shipping_points);\n \n //make sure first and second are different\n while(first == second) {\n second = (int)(Math.random() * num_shipping_points);\n }\n \n //Now make sure front < back.\n int front, back = 0;\n if(first < second) {\n front = first;\n back = second;\n }\n else {\n back = first;\n front = second;\n }\n //front = 5;\n //back = 10;\n \n //output(\"\\nchild before mutation:\", 2);\n //displayChromosome(child);\n //Perform the inversion.\n while(front < back) {\n int temp = child[front];\n child[front] = child[back];\n child[back] = temp;\n front++;\n back--;\n }\n //output(\"\\nchild after mutation:\", 2);\n //displayChromosome(child);\n \n println(\"after inversion mutation:\",1);\n displayChromosome(child, 1);\n return child;\n }", "public abstract void mutate();", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "@Override\n public void invert() {\n getInvertibles().parallelStream().forEach(Invertible::invert);\n }", "public interface MutableIVData extends DataManipulator<MutableIVData, ImmutableIVData> {\n\n Value<Integer> hpIVS();\n Value<Integer> attackIVS();\n Value<Integer> defenseIVS();\n Value<Integer> spAttackIVS();\n Value<Integer> spDefenseIVS();\n Value<Integer> speedIVS();\n\n}", "@Override\n public void backward() {\n Tensor x = modInX.getOutput();\n Tensor tmp = new Tensor(yAdj); // copy\n tmp.elemDivide(x);\n modInX.getOutputAdj().elemAdd(tmp);\n }", "@Override\n\tpublic void update(UpdateVisitor visitor) {\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\tif (rand < MUTATION_PROB) {\r\n\t\t\t\t\t// change the sign\r\n\t\t\t\t\tInteger vPoint = chr.get(j);\r\n\t\t\t\t\tchr.remove(j);\r\n\t\t\t\t\tchr.add(j, new Integer(- (vPoint.intValue()%100)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.printChromosomes(\"After Mutation\");\r\n\t}", "public void invert() {\n\t\tthis.vector.setXYZ(-this.vector.x(), -this.vector.y(), -this.vector.z());\n\t\tthis.energy = -this.energy;\n\t}", "public void invert()\n {\n assert isComplete;\n \n isInverted = !isInverted;\n }", "private Object mutation(Individual child){\n\t\treturn problem.improve(child.getId());\r\n\t}", "protected void elementInstered(MutationEvent evt) throws MelodyException {\r\n\t\tsuper.elementInstered(evt);\r\n\t\t// the inserted node\r\n\t\tElement t = (Element) evt.getTarget();\r\n\t\t// its next sibling\r\n\t\tNode s = t.getNextSibling();\r\n\t\twhile (s != null && s.getNodeType() != Node.ELEMENT_NODE) {\r\n\t\t\ts = s.getNextSibling();\r\n\t\t}\r\n\t\tDUNID sdunid = DUNIDDocHelper.getDUNID((Element) s);\r\n\t\t// its parent node\r\n\t\tElement p = (Element) t.getParentNode();\r\n\t\tDUNID pdunid = DUNIDDocHelper.getDUNID(p);\r\n\t\t// Modify the DUNIDDoc\r\n\t\tDocument d = getOwnerDUNIDDoc(p).getDocument();\r\n\t\tElement pori = DUNIDDocHelper.getElement(d, pdunid);\r\n\t\tpori.insertBefore(d.importNode(t, true),\r\n\t\t\t\tDUNIDDocHelper.getElement(d, sdunid));\r\n\t\t// Modify the targets descriptor\r\n\t\tif (!areTargetsFiltersDefined()) {\r\n\t\t\t/*\r\n\t\t\t * If there is no targets filters defined, there's no need to modify\r\n\t\t\t * the targets descriptor.\r\n\t\t\t */\r\n\t\t\treturn;\r\n\t\t}\r\n\t\td = getTargetsDescriptor().getDocument();\r\n\t\tpori = DUNIDDocHelper.getElement(d, pdunid);\r\n\t\tif (pori != null) { // inserted node parent is in the targets descriptor\r\n\t\t\tpori.insertBefore(d.importNode(t, true),\r\n\t\t\t\t\tDUNIDDocHelper.getElement(d, sdunid));\r\n\t\t}\r\n\t}", "@Override\n\tpublic void VisitUnaryNode(UnaryOperatorNode Node) {\n\n\t}", "public void setInversiones(int n){\r\n\t\tinversiones = n;\r\n\t}", "@Override\n public void Invert() {\n\t \n }", "@Override \n protected void engineUpdate(byte[] input, int offset, int len) {\n for (int index = offset; index < offset + len; index++) \n engineUpdate(input[index]); \n }", "public DDCountInversion(){\n\t\tnumeros = new ArrayList<Integer>();\n\t}", "@Override\r\n\tpublic boolean pushValuesForward() {\r\n\t\tboolean mod = false;\r\n\r\n\t\tValue in0 = getDataPorts().get(0).getValue();\r\n\r\n\t\tint newSize = in0.getSize();\r\n\t\tboolean isSigned = in0.isSigned();\r\n\r\n\t\tValue newValue = new Value(newSize, isSigned);\r\n\r\n\t\tfor (int i = 0; i < newSize; i++) {\r\n\t\t\tBit bit = in0.getBit(i);\r\n\r\n\t\t\tif (!bit.isCare()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Don't-cares will be ignored going forward.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(i, Bit.DONT_CARE);\r\n\t\t\t} else if (bit.isConstant()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Push the inversion of the constant.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(i, bit.isOn() ? Bit.ZERO : Bit.ONE);\r\n\t\t\t} else {\r\n\t\t\t\t/*\r\n\t\t\t\t * Otherwise just push a generic CARE until we're sure that\r\n\t\t\t\t * there's a Value on the result Bus.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(0, Bit.CARE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// update all bits above the carry out bit to be signed\r\n\t\t// extended of carry out bit\r\n\t\tif (getResultBus().getValue() != null) {\r\n\t\t\tif (!in0.isConstant()) {\r\n\t\t\t\tint compactedSize = Math.min(newSize, in0.getCompactedSize());\r\n\t\t\t\tBit carryoutBit = getResultBus().getValue().getBit(\r\n\t\t\t\t\t\tcompactedSize - 1);\r\n\r\n\t\t\t\tfor (int i = compactedSize; i < newSize; i++) {\r\n\t\t\t\t\tif (newValue.getBit(i) != Bit.DONT_CARE)\r\n\t\t\t\t\t\tnewValue.setBit(i, carryoutBit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmod |= getResultBus().pushValueForward(newValue);\r\n\r\n\t\tfor (int i = 0; i < newSize; i++) {\r\n\t\t\tBit bit = in0.getBit(i);\r\n\t\t\tif (!bit.isGlobal()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Set the inversion shortcut if appropriate.\r\n\t\t\t\t */\r\n\t\t\t\tgetResultBus().getValue().getBit(i).setInvertedBit(bit);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}", "public abstract void updateVertices();", "public interface Mutation {\n void apply(Collection<PartType> parts);\n}", "public abstract void increment(int delta);", "@org.junit.Test\n public void inverser_vector() throws Exception {\n //voici un commentaire\n Vector<Integer> inppuut = new Vector<Integer>();\n inppuut.add(1);\n inppuut.add(2);\n inppuut.add(3);\n inppuut.add(4);\n\n Vector<Integer> expec = new Vector<Integer>();\n expec.add(4);\n expec.add(3);\n expec.add(2);\n expec.add(1);\n\n VectorHelper.inverser_vector(inppuut);\n assertEquals(expec, inppuut);\n\n }", "protected int\n engineUpdate (byte[] in, int inOffset, int inLen, byte[] out, int outOffset) {\n byte[] temp = des1.update(in, inOffset, inLen);\n des2.update(temp, 0, temp.length, temp, 0);\n return des3.update(temp, 0, temp.length, out, outOffset);\n }", "void visit(final Update update);", "@Override\n public void update(float delta) {\n // Make sure to COPY the vector and not copy the reference\n position = new Vector3f(entity.getPosition()).add(offset);\n }", "public interface IReversalTransaction {\n\n ITransaction getOriginalMessage();\n // private final ITransaction original;\n\n\n}", "@Override\n\tprotected void executeAux(CPU cpu) throws InstructionExecutionException {\n\t\t if(cpu.getNumElem() > 0){\n\t\t\t cpu.push(-cpu.pop());\n\t\t }\n\t\t else \t\n\t\t\t\tthrow new InstructionExecutionException\n\t\t\t\t\t(\"Error ejecutando \" + this.toString() + \": faltan operandos en la pila (hay \" + cpu.getNumElem() + \")\");\n\t\t\t\n\t}", "public abstract Chromosome mutation(Chromosome child);", "@Override\n public void delta() {\n \n }", "@Override\n\tpublic void update(VPAction arg0, VPContext arg1) {\n\t\t\n\t}", "@Override\n\tpublic int update(Utente input) throws Exception {\n\t\treturn 0;\n\t}", "@PortedFrom(file = \"tSignatureUpdater.h\", name = \"vI\")\n private void vI(IndividualExpression expr) {\n // should no longer be needed: IndividualNames are NamedEntities\n // themselves\n if (expr instanceof NamedEntity) {\n sig.add((NamedEntity) expr);\n }\n }", "@Override\n\tpublic void input(float delta) {\n\t\t\n\t}", "public abstract GF2nElement increase();", "public interface Mutator {\n\n /**\n * Applies this mutation to the given graph.\n *\n * @param graph The graph to be mutated\n * @throws IllegalArgumentException If the given graph is null\n */\n void apply(GraphOfPixels graph) throws IllegalArgumentException;\n\n /**\n * Represents a filter applied to sharpen a pixel.\n */\n class SharpenFilter extends AbstractFilter {\n\n private static final Matrix kernel =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n -0.125, -0.125, -0.125, -0.125, -0.125,\n -0.125, 0.25, 0.25, 0.25, -0.125,\n -0.125, 0.25, 1.0, 0.25, -0.125,\n -0.125, 0.25, 0.25, 0.25, -0.125,\n -0.125, -0.125, -0.125, -0.125, -0.125)),\n 5, 5);\n\n\n @Override\n protected PixelAsColors applyToPixel(Node n) throws IllegalArgumentException {\n if (n == null) {\n throw new IllegalArgumentException(\"Given node is null.\");\n }\n\n double newRed = 0.0;\n double newGreen = 0.0;\n double newBlue = 0.0;\n\n for (int i = -2; i <= 2; i += 1) {\n for (int j = 2; j >= -2; j -= 1) {\n double kernelValue = kernel.getValue(i + 2, Math.abs(j - 2));\n newRed += kernelValue * n.getNearby(i, j).getRed();\n newGreen += kernelValue * n.getNearby(i, j).getGreen();\n newBlue += kernelValue * n.getNearby(i, j).getBlue();\n }\n }\n\n return new SimplePixel(Utils.roundDouble(newRed), Utils.roundDouble(newGreen),\n Utils.roundDouble(newBlue));\n }\n }\n\n /**\n * Represents a filter which can be applied to a graph of pixels to alter an image.\n */\n interface Filter extends Mutator {\n\n }\n\n /**\n * Represents a filter applied to blur a pixel.\n */\n class BlurFilter extends AbstractFilter {\n\n private static final Matrix kernel =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n 0.0625, 0.125, 0.0625,\n 0.125, 0.25, 0.125,\n 0.0625, 0.125, 0.0625)),\n 3, 3);\n\n\n @Override\n protected PixelAsColors applyToPixel(Node n) throws IllegalArgumentException {\n if (n == null) {\n throw new IllegalArgumentException(\"Given node is null.\");\n }\n\n double newRed = 0.0;\n double newGreen = 0.0;\n double newBlue = 0.0;\n\n for (int i = -1; i <= 1; i += 1) {\n for (int j = 1; j >= -1; j -= 1) {\n double kernelValue = kernel.getValue(i + 1, Math.abs(j - 1));\n newRed += kernelValue * n.getNearby(i, j).getRed();\n newGreen += kernelValue * n.getNearby(i, j).getGreen();\n newBlue += kernelValue * n.getNearby(i, j).getBlue();\n }\n }\n\n return new SimplePixel(Utils.roundDouble(newRed), Utils.roundDouble(newGreen),\n Utils.roundDouble(newBlue));\n }\n }\n\n /**\n * Represents an abstraction of a image filter.\n */\n abstract class AbstractFilter implements Filter {\n\n /**\n * Applies this filter to the given pixel.\n *\n * @param n represents a node in the graph for an image in a pixel\n * @return PixelAsColors representing new color of pixel\n * @throws IllegalArgumentException if node given is null\n */\n protected abstract PixelAsColors applyToPixel(Node n) throws IllegalArgumentException;\n\n @Override\n public void apply(GraphOfPixels graph) throws IllegalArgumentException {\n if (graph == null) {\n throw new IllegalArgumentException(\"Null graph given.\");\n }\n\n ArrayList<PixelAsColors> updatedColors = new ArrayList<PixelAsColors>();\n\n for (Node n : graph) {\n updatedColors.add(this.applyToPixel(n));\n }\n\n int counter = 0;\n for (Node n : graph) {\n n.updateColors(updatedColors.get(counter));\n counter += 1;\n }\n }\n }\n\n /**\n * Represents a color transformation to Sepia tone.\n */\n class SepiaTransform extends AbstractColorTransformation {\n\n private static final Matrix baseMatrix =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n 0.393, 0.769, 0.189,\n 0.349, 0.686, 0.168,\n 0.272, 0.534, 0.131)),\n 3, 3);\n\n @Override\n protected Matrix generateNewColorMatrix(Matrix rgb) throws IllegalArgumentException {\n return baseMatrix.matrixMultiply(rgb);\n }\n\n }\n\n /**\n * Represents a color transformation to Greyscale.\n */\n class GreyscaleTransform extends AbstractColorTransformation {\n\n private static final Matrix baseMatrix =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n 0.2126, 0.7152, 0.0722,\n 0.2126, 0.7152, 0.0722,\n 0.2126, 0.7152, 0.0722)),\n 3, 3);\n\n @Override\n protected Matrix generateNewColorMatrix(Matrix rgb) throws IllegalArgumentException {\n return baseMatrix.matrixMultiply(rgb);\n }\n }\n\n /**\n * Represents an abstraction of possible color transformations.\n */\n abstract class AbstractColorTransformation implements ColorTransformation {\n\n /**\n * Gets a new Matrix representing the new transformed colors of a pixel.\n *\n * @param rgb represents the original colors of the pixel\n * @return the transformed colors of the pixel\n * @throws IllegalArgumentException if rgb is null.\n */\n protected abstract Matrix generateNewColorMatrix(Matrix rgb) throws IllegalArgumentException;\n\n /**\n * Applies this color transformation to the given pixel.\n *\n * @param n represents a node in the graph for an image in a pixel\n */\n protected void applyToPixel(Node n) throws IllegalArgumentException {\n if (n == null) {\n throw new IllegalArgumentException(\"Null node given.\");\n }\n ArrayList<Double> nodeRGB = new ArrayList<Double>(\n Arrays.asList(n.getRed() + 0.0, n.getGreen() + 0.0, n.getBlue() + 0.0));\n Matrix ogRGB = new MatrixImpl(nodeRGB, 1, 3);\n\n Matrix newRGB = this.generateNewColorMatrix(ogRGB);\n\n n.updateColors(new SimplePixel(\n Utils.roundDouble(newRGB.getValue(0, 0)),\n Utils.roundDouble(newRGB.getValue(0, 1)),\n Utils.roundDouble(newRGB.getValue(0, 2))));\n }\n\n @Override\n public void apply(GraphOfPixels graph) throws IllegalArgumentException {\n if (graph == null) {\n throw new IllegalArgumentException(\"Null graph given.\");\n }\n\n for (Node n : graph) {\n this.applyToPixel(n);\n }\n }\n }\n\n /**\n * Represents a color transformation to mutate an image.\n */\n interface ColorTransformation extends Mutator {\n\n }\n}", "@Override\n\tpublic void update(Instance ins) {\n\t\t\n\t}", "public double getUniformMutationRatio(){\n return delta;\n }", "@Override\n public void input(float delta) {\n\n }", "public void recalculateVector()\r\n {\r\n recalculateVector(destX, destY);\r\n }", "@Override\n protected void updateEliminations() {\n\n }", "public ComplementOp() {\r\n\t\tsuper();\r\n\t}", "List<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);", "@Override\r\n public void MIPSme() {\r\n MIPSMove(this.dst, this.op1);\r\n }", "protected abstract void internalUndo();", "@Override\n public void forceIncrementModificationCounter(SideDishEntity entity) {\n\n }", "abstract void update(int i);", "private TraceableFloat mutateGene(TraceableFloat a, float new_a_value, EvolutionState state){\n\n if(a.getValue() == new_a_value)//return the original gene if the value was not altered\n return a;\n\n double influence_factor_mut = Math.abs(a.getValue() - new_a_value) / (Math.abs(a.getValue()) + Math.abs(a.getValue() - new_a_value));\n double influence_factor_old = 1 - influence_factor_mut;\n\n List<TraceTuple> a_traceVector = new ArrayList<TraceTuple>();\n\n int i = 0; //index for this traceVector\n\n //check if we accumulate and the first element is already the mutation\n if(state.getAccumulateMutatioImpact() && a.getTraceVector().get(0).getTraceID() == state.getMutationCounter()){//if we accumulate mutation and the gene is influenced by mutation, accumulate that\n double oldScaledMutImpact = a.getTraceVector().get(0).getImpact() * influence_factor_old;\n a_traceVector.add(new TraceTuple(state.getMutationCounter(), influence_factor_mut + oldScaledMutImpact));\n i++; //increment i, as the first element of the traceList from a is already added\n } else { //add the new mutation ID if we don't accumulate or there is no mutation present bevore\n a_traceVector.add(new TraceTuple(state.getMutationCounter(), influence_factor_mut));\n }\n\n while(i < a.getTraceVector().size()){ //this iterates over the traceVector of this individual\n int currentAID = a.getTraceVector().get(i).getTraceID();\n double currentAImpact = a.getTraceVector().get(i).getImpact();\n\n a_traceVector.add(new TraceTuple(currentAID, influence_factor_old * currentAImpact));\n i++;\n }\n\n return new TraceableFloat(new_a_value, a_traceVector);\n }", "interface Update {}", "public Integer mutate(int index);", "@Override\n\tpublic void applyMutation(int index, double a_percentage) {\n\n\t}", "@Override\n\tpublic void visit(InExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic void update(Input input) {\n\t\t\n\t}", "@Override\n\tpublic int update() {\n\t\treturn 0;\n\t}", "public void mutate(NeuralPlayer p)\n\t{\n\t\tdouble[] genome = NetworkCODEC.networkToArray(p.net);\n\t\tRandom g = new Random();\n\t\tfor (int i = 0; i< genome.length; i++)\n\t\t{\n\t\t\tif (g.nextDouble() <= mutationPer)\n\t\t\t\tgenome[i] = randomNum(g) + genome[i];\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome, p.net);\n\t}", "@Override\n\tpublic void visit(InExpression arg0) {\n\n\t}", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "public abstract void update(int delta);", "@Override\n\tpublic void imprime() {\n\t\t\n\t}", "@Override\n public void internalDelta() {\n models.get(1).internalDelta();\n //if we want to do the external delta on the press\n models.get(1).externalDelta(1.0, 1);\n //if we want to do the confluent delta on the press\n models.get(1).confluentDelta(1);\n }", "@Override\n public Tensor forward() {\n Tensor x = modInX.getOutput();\n y = new Tensor(x); // copy\n y.log();\n return y;\n }", "@Override\n\tpublic void updateFromPerception(IPerception perception)\n\t{\n\t}", "@Override\n\tpublic void updateFromPerception(IPerception perception)\n\t{\n\t}", "@Override\r\n\tpublic void visit(UnaryExpression unaryExpression) {\n\r\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "@Override\n public void visit(P_Inverse inversePath) {\n engine.flipDirection() ;\n engine.eval(inversePath.getSubPath(), node, output) ;\n engine.flipDirection() ;\n }", "public interface Incrementor {\n\t\tpublic void incrementTransition (TransitionIterator ti, double count);\n\t\tpublic void incrementInitialState (State s, double count);\n\t\tpublic void incrementFinalState (State s, double count);\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tprotected final void processWhenNotUpdated(Node node) {\n\t\tboolean propagateFurther = false;\n\t\tNodeInfo nodeInfo = node.getInfo();\n\t\tCollection<Node> predecessors = nodeInfo.getCFGInfo().getInterProceduralLeafPredecessors();\n\t\tF newIN = (F) nodeInfo.getIN(analysisName);\n\t\tif (newIN == null) {\n\t\t\t/*\n\t\t\t * In this scenario, we must set the propagation flag, so that\n\t\t\t * all successors are processed at least once.\n\t\t\t */\n\t\t\tpropagateFurther = true;\n\t\t\tif (predecessors.isEmpty()) {\n\t\t\t\tnewIN = this.getEntryFact();\n\t\t\t} else {\n\t\t\t\tnewIN = this.getTop();\n\t\t\t}\n\t\t}\n\n\t\tboolean inChanged = false;\n\t\tif (this.analysisName == AnalysisName.CROSSCALL_PREDICATE_ANALYSIS && node instanceof PostCallNode) {\n\t\t\t// A small hack here.\n\t\t\tPostCallNode postNode = (PostCallNode) node;\n\t\t\tList<FunctionDefinition> funcDef = postNode.getParent().getInfo().getCalledDefinitions();\n\t\t\tif (funcDef.isEmpty() || funcDef.stream().noneMatch(f -> this.functionWithBarrier.contains(f))) {\n\t\t\t\tpredecessors = new HashSet<>();\n\t\t\t\tpredecessors.add(postNode.getParent().getPreCallNode());\n\t\t\t}\n\t\t}\n\t\tfor (Node predNode : predecessors) {\n\t\t\tF predOUT = (F) predNode.getInfo().getOUT(analysisName);\n\t\t\tif (predOUT == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tF edgeOUT = this.edgeTransferFunction(predOUT, predNode, node);\n\t\t\tinChanged |= newIN.merge(edgeOUT, null);\n\t\t}\n\n\t\tif (node instanceof PostCallNode) {\n\t\t\tinChanged |= processPostCallNodesIN((PostCallNode) node, newIN);\n\t\t}\n\n\t\tnodeInfo.setIN(analysisName, newIN);\n\n\t\t// Step 2: Apply the flow-function on IN, to obtain the OUT.\n\t\tF newOUT = node.accept(this, newIN);\n\t\tnodeInfo.setOUT(analysisName, newOUT);\n\n\t\t// Step 3: Process the successors, if needed.\n\t\tpropagateFurther |= inChanged;\n\t\tif (propagateFurther) {\n\t\t\tglobalWorkList.addAll(nodeInfo.getCFGInfo().getInterProceduralLeafSuccessors());\n\t\t\tif (node instanceof PreCallNode) {\n\t\t\t\tPreCallNode pre = (PreCallNode) node;\n\t\t\t\tthis.globalWorkList.add(pre.getParent().getPostCallNode());\n\t\t\t}\n\t\t\t// If we are adding successors of a BeginNode of a FunctionDefinition, we should\n\t\t\t// add all the ParameterDeclarations.\n\t\t\tif (node instanceof BeginNode && node.getParent() instanceof FunctionDefinition) {\n\t\t\t\tFunctionDefinition func = (FunctionDefinition) node.getParent();\n\t\t\t\tfor (ParameterDeclaration paramDecl : func.getInfo().getCFGInfo().getParameterDeclarationList()) {\n\t\t\t\t\tthis.globalWorkList.add(paramDecl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void update(Member mem) {\n\t\t\n\t}", "@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "public int getInversiones(){\r\n\t\treturn inversiones;\r\n\t}", "@Override\n\tpublic void xuat() {\n\t\tsuper.xuat();\n\t}", "public interface SimplexSolutionTransferringNode {\n\n\tpublic double getTransfer();\n\t\n}", "IVec3 sub(IVec3 v);", "@Override\r\n\tpublic Node visitComposition(CompositionContext ctx) {\n\t\treturn super.visitComposition(ctx);\r\n\t}", "public void derivate () {\n int size = myCoefficients.size();\n for (int i = 1; i < size; ++i) {\n myCoefficients.set(i - 1, myCoefficients.get(i) * i);\n }\n myCoefficients.remove(size - 1);\n }", "private void promote() {\r\n //promote gives more money\r\n increment();\r\n }", "abstract public void updatePositionsAfterBetaReduction();", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void mutation() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint num = (int) (Math.random() * GENE * ChrNum + 1);\n\t\t\tint chromosomeNum = (int) (num / GENE) + 1;\n\n\t\t\tint mutationNum = num - (chromosomeNum - 1) * GENE; \n\t\t\tif (mutationNum == 0) \n\t\t\t\tmutationNum = 1;\n\t\t\tchromosomeNum = chromosomeNum - 1;\n\t\t\tif (chromosomeNum >= ChrNum)\n\t\t\t\tchromosomeNum = 9;\n\t\t\tString temp;\n\t\t\tString a; \n\t\t\tif (ipop[chromosomeNum].charAt(mutationNum - 1) == '0') { \n a = \"1\";\n\t\t\t} else { \n\t\t\t\ta = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tif (mutationNum == 1) {\n\t\t\t\ttemp = a + ipop[chromosomeNum].substring(mutationNum);\n\t\t\t} else {\n\t\t\t\tif (mutationNum != GENE) {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum -1) + a \n\t\t\t\t\t\t\t+ ipop[chromosomeNum].substring(mutationNum);\n\t\t\t\t} else {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum - 1) + a;\n\t\t\t\t}\n\t\t\t}\n \tipop[chromosomeNum] = temp;\n\t\t}\n\t}", "public abstract void update(Input input);", "abstract public Vector3[][] update();", "public void inputChange( float t, int i, boolean v ) {\n\t\tchangeCount = changeCount + 1;\n\t\toutputValue = v;\n\t}", "Vec inverseFilter(DMatrixRMaj H, double V, DMatrixRMaj Cnew) {\n CommonOps_DDRM.mult(helix.C, H, tempV);\n double denom = -V + CommonOps_DDRM.dot(H, tempV);\n CommonOps_DDRM.scale(1.0/denom, helix.C, tempM);\n DMatrixRMaj Kstar = new DMatrixRMaj(5,1);\n CommonOps_DDRM.mult(tempM, H, Kstar); // Kalman gain matrix\n\n CommonOps_DDRM.scale(r, Kstar, tempV);\n Vec aNew = helix.a.sum(mToVec(tempV));\n directProd(Kstar, H, tempM);\n CommonOps_DDRM.scale(-1.0, tempM);\n CommonOps_DDRM.addEquals(tempM, U);\n CommonOps_DDRM.mult(tempM, helix.C, Cnew);\n if (debug) {\n System.out.format(\"StateVector.inverseFilter: V=%12.4e, denom=%12.4e\\n\", V, denom);\n helix.a.print(\"old helix\");\n aNew.print(\" new helix in StateVector.inverseFilter\");\n }\n return aNew;\n }", "@Override\n\tpublic int update(Object ob) {\n\t\treturn 0;\n\t}", "private interface OperationOverNodes {\n\t\tvoid operate(Node node);\n\t}", "@Override\n\tpublic void visit(Subtraction arg0) {\n\t\t\n\t}", "private void coins_fY(){\n\t\tthis.cube[49] = this.cube[45]; \n\t\tthis.cube[45] = this.cube[51];\n\t\tthis.cube[51] = this.cube[53];\n\t\tthis.cube[53] = this.cube[47];\n\t\tthis.cube[47] = this.cube[49];\n\t}", "public interface Entity extends Immunizable {\n /**\n * Counts the total number of people in a certain state. An entity may be in multiple states if there are\n * multiple spreadables in play.\n *\n * @param state Which state to count\n * @return The number of entities in that state\n */\n int count(State state);\n\n /**\n * Counts the total number of people in a certain state for a given Spreadable. An entity will only ever be\n * in one state per spreadable.\n *\n * @param state Which state to count\n * @param spreadable Which spreadable to consider\n * @return The number of entities in that state for the given spreadable\n */\n int count(State state, Spreadable spreadable);\n\n /**\n * @return The total number of individuals that this Entity represents\n */\n int population();\n\n /**\n * Try to change entities from one state to another. If there aren't enough entities with the old state,\n * then only that many will be changed to the new state.\n *\n * @param spreadable\n * @param from\n * @param to\n * @param count\n */\n void changeState(Spreadable spreadable, State from, State to, int count);\n\n /**\n * Try to infect one or more entities with a specific Spreadable. This will not infect more people than are\n * susceptible, and may also be affected by rules for coexistence of spreadables.\n *\n * @param spreadable\n * @param count\n */\n default void infect(Spreadable spreadable, int count) {\n changeState(spreadable, State.SUSCEPTIBLE, State.INFECTED, count);\n }\n\n\n /**\n * Try to recover one or more entities with a specific Spreadable. This will not recover more entities than are\n * infected.\n *\n * @param spreadable\n * @param count\n */\n default void recover(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.RECOVERED, count);\n }\n\n /**\n * Try to return one or more entities from the infected state to the susceptible state for a given Spreadable.\n * This will not affect more entities than are infected.\n *\n * @param spreadable\n * @param count\n */\n default void suscept(Spreadable spreadable, int count) {\n changeState(spreadable, State.INFECTED, State.SUSCEPTIBLE, count);\n }\n\n String getName();\n\n Collection<String> getLabels();\n\n Collection<Spreadable> getSpreadables();\n}", "@API.Public\npublic interface DocumentMutation extends Iterable<MutationOp> {\n\n /**\n * Empties this Mutation object.\n */\n public DocumentMutation empty();\n\n /**\n * Sets the value of given field to the specified value. If the value of\n * given field name doesn't exist in the existing document on the server\n * then new field will be created.\n *\n * If the value for the given field name exists in the existing document\n * on server and its of the same type as the new value then existing value\n * will be replaced by new value.\n *\n * If the value of given field name exists and it is not same type as the\n * type of newly set value then mutation will fail.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setNull(String path);\n\n public DocumentMutation setNull(FieldPath path);\n\n public DocumentMutation set(String path, Value v);\n\n public DocumentMutation set(FieldPath path, Value v);\n\n public DocumentMutation set(String path, boolean b);\n\n public DocumentMutation set(FieldPath path, boolean b);\n\n public DocumentMutation set(String path, short s);\n\n public DocumentMutation set(FieldPath path, short s);\n\n public DocumentMutation set(String path, byte b);\n\n public DocumentMutation set(FieldPath path, byte b);\n\n public DocumentMutation set(String path, int i);\n\n public DocumentMutation set(FieldPath path, int i);\n\n public DocumentMutation set(String path, long l);\n\n public DocumentMutation set(FieldPath path, long l);\n\n public DocumentMutation set(String path, float f);\n\n public DocumentMutation set(FieldPath path, float f);\n\n public DocumentMutation set(String path, double d);\n\n public DocumentMutation set(FieldPath path, double d);\n\n public DocumentMutation set(String path, String value);\n\n public DocumentMutation set(FieldPath path, String value);\n\n public DocumentMutation set(String path, BigDecimal bd);\n\n public DocumentMutation set(FieldPath path, BigDecimal bd);\n\n public DocumentMutation set(String path, Time t);\n\n public DocumentMutation set(FieldPath path, Time t);\n\n public DocumentMutation set(String path, Timestamp t);\n\n public DocumentMutation set(FieldPath path, Timestamp t);\n\n public DocumentMutation set(String path, Date d);\n\n public DocumentMutation set(FieldPath path, Date d);\n\n public DocumentMutation set(String path, List<? extends Object> value);\n\n public DocumentMutation set(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation set(String path, Interval intv);\n\n public DocumentMutation set(FieldPath path, Interval intv);\n\n public DocumentMutation set(String path, ByteBuffer bb);\n\n public DocumentMutation set(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation set(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(FieldPath path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(String path, Document value);\n\n public DocumentMutation set(FieldPath path, Document value);\n\n\n /**\n * Sets or replaces the value of a given field with the new value given in the API.\n * This is a fast API that doesn't require a read on the server to validate\n * the path or type.\n *\n * If any element in the specified field path doesn't exist then that element\n * will be created on the server.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose the server has only the field \"a\" of type map, then a setOrReplace of \"a.b.c\"\n * will create element \"b\" of type map inside \"a\". It will also create an element\n * named \"c\" of type integer inside map \"b\".\n *\n * If any element specified in the field path is of a different type\n * than the existing field element on the server, it will be deleted and replaced by\n * a new element.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose on the server, there is a field \"a\" of type array. This operation\n * will delete \"a\", create new element \"a\" of type map, and insert \"b.c\" in it.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setOrReplace(String path, Value v);\n\n public DocumentMutation setOrReplace(FieldPath path, Value v);\n\n public DocumentMutation setOrReplaceNull(String path);\n\n public DocumentMutation setOrReplaceNull(FieldPath path);\n\n public DocumentMutation setOrReplace(String path, boolean b);\n\n public DocumentMutation setOrReplace(FieldPath path, boolean b);\n\n public DocumentMutation setOrReplace(String path, short s);\n\n public DocumentMutation setOrReplace(FieldPath path, short s);\n\n public DocumentMutation setOrReplace(String path, byte b);\n\n public DocumentMutation setOrReplace(FieldPath path, byte b);\n\n public DocumentMutation setOrReplace(String path, int i);\n\n public DocumentMutation setOrReplace(FieldPath path, int i);\n\n public DocumentMutation setOrReplace(String path, long l);\n\n public DocumentMutation setOrReplace(FieldPath path, long l);\n\n public DocumentMutation setOrReplace(String path, float f);\n\n public DocumentMutation setOrReplace(FieldPath path, float f);\n\n public DocumentMutation setOrReplace(String path, double d);\n\n public DocumentMutation setOrReplace(FieldPath path, double d);\n\n public DocumentMutation setOrReplace(String path, String value);\n\n public DocumentMutation setOrReplace(FieldPath path, String value);\n\n public DocumentMutation setOrReplace(String path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(FieldPath path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(String path, Time t);\n\n public DocumentMutation setOrReplace(FieldPath path, Time t);\n\n public DocumentMutation setOrReplace(String path, Timestamp t);\n\n public DocumentMutation setOrReplace(FieldPath path, Timestamp t);\n\n public DocumentMutation setOrReplace(String path, Date d);\n\n public DocumentMutation setOrReplace(FieldPath path, Date d);\n\n public DocumentMutation setOrReplace(String path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Interval intv);\n\n public DocumentMutation setOrReplace(FieldPath path, Interval intv);\n\n public DocumentMutation setOrReplace(String path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path,\n Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Document value);\n\n public DocumentMutation setOrReplace(FieldPath path, Document value);\n\n /**\n * Appends elements to an existing array. If the field doesn't exist on server,\n * it will be created and this operation proceeds. If the field already exists,\n * this operation will validate that the existing field is of the array type.\n * If it is of a different type, then this operation will fail.\n */\n public DocumentMutation append(String path, List<? extends Object> value);\n\n public DocumentMutation append(FieldPath path, List<? extends Object> value);\n\n /**\n * Appends elements to an existing string. This operation will first\n * validate on the server that the field specified by the given path\n * exists and is of the string type. If the field doesn't exist or is\n * of a different type, then the operation will fail.\n */\n public DocumentMutation append(String path, String value);\n\n public DocumentMutation append(FieldPath path, String value);\n\n /**\n * Appends a given byte array to the existing binary data stored on the server\n * on the given path. This operation will fail if the given field on the server is not of the\n * BINARY type. If the field path specified for append doesn't\n * exist on a server record, then this operation will create a new element at the\n * append path. This new element will be of BINARY type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of the intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, the record a itself is an array or integer.\n *\n * This operation will perform read-modify-write on the server.\n *\n * @param path field path\n * @param value byte array value\n * @param offset offset in byte array\n * @param len length in byte array\n * @return this Mutation Object\n */\n public DocumentMutation append(String path, byte[] value, int offset, int len);\n\n public DocumentMutation append(FieldPath path, byte[] value, int offset, int len);\n\n public DocumentMutation append(String path, byte[] value);\n\n public DocumentMutation append(FieldPath path, byte[] value);\n\n public DocumentMutation append(String path, ByteBuffer value);\n\n public DocumentMutation append(FieldPath path, ByteBuffer value);\n\n /**\n * Merges the existing value on the server for the given field path with the new map\n * provided in the input. This operation will first validate that the entry with the\n * given field name exists on the server and is of the MAP type.\n *\n * If the entry is of a type other than MAP, then the operation will fail.\n * If the field path specified for merge doesn't\n * exist in the record on the server, then this operation will create a new element at the\n * given path. This new element will be of the MAP type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, record a itself is an array or integer.\n *\n * @param path field path\n * @param value the value to be merged with existing value of a field on the server\n * @return this record mutation\n */\n public DocumentMutation merge(String path, Document value);\n\n public DocumentMutation merge(FieldPath path, Document value);\n\n public DocumentMutation merge(String path, Map<String, Object> value);\n\n public DocumentMutation merge(FieldPath path, Map<String, Object> value);\n\n /**\n * Atomically applies an increment to a given field (in dot separated notation)\n * of the given row id.\n *\n * If the field path specified for the incremental change doesn't\n * exist in the server record then this operation will create a new element at the\n * given path. This new element will be of same type as the value specified\n * in the parameter.\n *\n * This operation will fail if the type of any intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail\n * if, on the server, record a itself is an array or integer.\n *\n * If the field doesn't exist on\n * the server then it will be created with the type of given incremental value.\n * An increment operation can be applied on any of the numeric types\n * of a field, such as byte, short, int, long, float, double, or decimal.\n * The operation will fail if the increment is applied to a field\n * that is of a non-numeric type.\n *\n * The increment operation won't change the type of the existing value stored in\n * the given field for the row. The resultant value of the field will be\n * truncated based on the original type of the field.\n *\n * For example, field 'score' is of type int and contains 60. The increment\n * '5.675', a double, is applied. The resultant value of the field\n * will be 65 (65.675 will be truncated to 65).\n *\n * @param path field name in dot separated notation\n * @param inc increment to apply to a field - can be positive or negative\n */\n public DocumentMutation increment(FieldPath path, byte inc);\n\n public DocumentMutation increment(String path, byte inc);\n\n public DocumentMutation increment(FieldPath path, short inc);\n\n public DocumentMutation increment(String path, short inc);\n\n public DocumentMutation increment(String path, int inc);\n\n public DocumentMutation increment(FieldPath path, int inc);\n\n public DocumentMutation increment(FieldPath path, long inc);\n\n public DocumentMutation increment(String path, long inc);\n\n public DocumentMutation increment(String path, float inc);\n\n public DocumentMutation increment(FieldPath path, float inc);\n\n public DocumentMutation increment(String path, double inc);\n\n public DocumentMutation increment(FieldPath path, double inc);\n\n public DocumentMutation increment(String path, BigDecimal inc);\n\n public DocumentMutation increment(FieldPath path, BigDecimal inc);\n\n /**\n * Deletes the field at the given path.\n * If the field does not exist, this method silently returns without doing anything.\n * For example, if a delete operation is attempted on a.b.c, and a.b is an array on the\n * server, then a.b.c will not be deleted.\n */\n public DocumentMutation delete(String path);\n\n public DocumentMutation delete(FieldPath path);\n\n}", "@Override\n\tpublic void update() { }", "void shift() {\n deleteStart += txnOps;\n deleteEnd += txnOps;\n updateStart += txnOps;\n updateEnd += txnOps;\n insertStart += txnOps;\n insertEnd += txnOps;\n }", "public void setUniformMutationRatio(double delta){\n this.delta = delta;\n }", "MutateNda<V> getMut();", "private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}" ]
[ "0.60659415", "0.6036411", "0.602164", "0.58581525", "0.5815586", "0.5786929", "0.55541486", "0.5436703", "0.54079455", "0.5345374", "0.53193706", "0.53138185", "0.5311175", "0.5290694", "0.5267913", "0.5139395", "0.5132897", "0.5113834", "0.51126045", "0.5089727", "0.5068139", "0.50627464", "0.506044", "0.50540876", "0.5043928", "0.5021305", "0.5008175", "0.49977767", "0.4995765", "0.49927196", "0.49904394", "0.49842703", "0.498264", "0.49796116", "0.49779597", "0.4975004", "0.4969525", "0.49634308", "0.4963243", "0.49627796", "0.49551415", "0.49542716", "0.494166", "0.493931", "0.49218068", "0.49185717", "0.49069154", "0.4905208", "0.4897346", "0.4896455", "0.48937324", "0.48929226", "0.48886034", "0.48765945", "0.4870055", "0.4861528", "0.48508307", "0.48440677", "0.48184016", "0.4815454", "0.4807576", "0.48070362", "0.48034802", "0.47938132", "0.47938132", "0.47926638", "0.47885808", "0.47885808", "0.47834668", "0.4774507", "0.47620118", "0.4758515", "0.47584087", "0.47559792", "0.47559792", "0.47517782", "0.47480306", "0.4746995", "0.4746634", "0.4738707", "0.47341165", "0.4733662", "0.47260812", "0.4723386", "0.47216615", "0.47186422", "0.47056267", "0.4703923", "0.47035247", "0.46928862", "0.46923825", "0.46908265", "0.46870556", "0.46846655", "0.46780545", "0.46774238", "0.4674842", "0.4669293", "0.46565953", "0.46558765" ]
0.6028491
2
Implementation of Insertion Mutation.
public Chromosome doInsertionMutation(){ for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){ ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection); int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); boolean value = newSelection.get(allele2); newSelection.remove(allele2); try{ newSelection.add(allele1 + 1, value); } catch(IndexOutOfBoundsException e){ newSelection.add(value); } Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated(); if(mutatedKnapsack.isValid()) return mutatedKnapsack; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void insert() {\n\t\t\n\t}", "public void insert()\n\t{\n\t}", "void visit(final Insert insert);", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "public long insert();", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "private void introduceMutations() {\n }", "void compareInsertion();", "com.google.spanner.v1.Mutation.Write getInsert();", "@Override\n\tpublic void preInsert() {\n\n\t}", "public static void incrInsertions() { ++insertions; }", "public void insert(T x);", "void insert(T value, int position);", "void insert(int insertSize);", "public interface Insertable {\n}", "public void insert(E e);", "void insert(T t);", "int insert(Position record);", "@Override\n\tpublic int insert(Utente input) throws Exception {\n\t\treturn 0;\n\t}", "public boolean insert(A x){ \n return false; \n }", "@Insert\n long insert(Measurement measurement);", "void insert(Object value, int position);", "boolean insert(E e);", "@Override\n\tpublic void insert(Member mem) {\n\t\t\n\t}", "public void insert(T o);", "public void insert(Node n);", "void insert(int idx, int val);", "public void insert(Conge conge) ;", "@Override\n\tpublic int insert(Object ob) {\n\t\treturn 0;\n\t}", "@Insert\n Single<Long> insert(Motivator motivator);", "public void insert(E item) {\n // FILL IN\n }", "public void InsertionSort(T[] arr)\n {\n for(int i = 1; i < arr.length; i++)\n {\n int j = i -1;\n T value = arr[i];\n\n while(j >= 0 && arr[j].compareTo(value) > 0)\n {\n arr[j + 1] = arr[j];\n j--;\n }\n arr[j+1] = value;\n }\n }", "public void insert(int i, T obj);", "@Override\r\n\tpublic void insert(FollowUp followup) {\n\t\t\r\n\t}", "public void insert(T element);", "@Override\n\tpublic boolean insert(E e) {\n\t\treturn add(e);\n\t}", "ActionResult onInsert(HopperBlockEntity hopperBlockEntity, BlockPos insertPosition);", "public void insert() {\r\n\t\t// In this way we can enjoy work`s deliverable without inheritance.\r\n\t\totherMethod();\r\n\t\twork.insert();\r\n\t}", "public void internalInsert(T insertItem){\n if(isEmpty())\n firstNode = lastNode = new SortedListNode<>(insertItem);\n else\n lastNode = lastNode.nextNode = new SortedListNode<>(insertItem);\n\n\n }", "com.google.spanner.v1.Mutation.Write getInsertOrUpdate();", "public void testInsert() {\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n assertEquals(6, test1.length());\n }", "<K, V, R extends IResponse> R insert(IInsertionRequest<K, V> insertionRequest);", "@Override\n public void DataIsInserted() {\n }", "public void insert(Object item);", "int insert(VarRatio record);", "@Nullable\n public TupleExpr getInsertExpr() {\n return this.insertExpr;\n }", "int insert(StatementsWithSorting record);", "int insert(T entity);", "@Override\n\tpublic int insert2(Object ob) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int insert2(Object ob) {\n\t\treturn 0;\n\t}", "@Test\n public void testInsert()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(1);\n example.insert(8);\n //System.out.println(\"List is \" + example.printTree().toString());\n String testAns = example.printTree().toString();\n String ans1 = \"[6, 3, 12, 1, 8]\";\n assertEquals(ans1,testAns);\n \n //Test case where only one side is added too\n example2.insert(6);\n example2.insert(12);\n example2.insert(8);\n example2.insert(7);\n example2.insert(14);\n String testAns2 = example2.printTree().toString();\n String ans2 = \"[6, 12, 8, 14, 7]\";\n assertEquals(ans2,testAns2);\n }", "public abstract boolean insert(Key key);", "@Override\n\tpublic boolean insert(String sql) {\n\t\treturn false;\n\t}", "int insert(FunctionInfo record);", "@Override\n public boolean insert(T val) {\n List<Node> path = new ArrayList<>();\n boolean[] wasInserted = new boolean[1];\n root = insertRec(val, root, path, wasInserted);\n splay(path.get(0), path.subList(1, path.size()));\n\n if (wasInserted[0]) {\n ++this.size;\n return true;\n }\n return false;\n }", "@Override\n\tpublic int insert(Cell record) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long insert(ContentValues cv) {\n\t\treturn 0;\n\t}", "public void insertFact(Fact fact);", "public static void insert(RowMutation rm)\n\t{\n /*\n * Get the N nodes from storage service where the data needs to be\n * replicated\n * Construct a message for write\n * Send them asynchronously to the replicas.\n */\n assert rm.key() != null;\n\n\t\ttry\n\t\t{\n\t\t\tMap<EndPoint, EndPoint> endpointMap = StorageService.instance().getNStorageEndPointMap(rm.key());\n\t\t\t// TODO: throw a thrift exception if we do not have N nodes\n\t\t\tMap<EndPoint, Message> messageMap = createWriteMessages(rm, endpointMap);\n logger_.debug(\"insert writing to [\" + StringUtils.join(messageMap.keySet(), \", \") + \"]\");\n\t\t\tfor (Map.Entry<EndPoint, Message> entry : messageMap.entrySet())\n\t\t\t{\n\t\t\t\tMessagingService.getMessagingInstance().sendOneWay(entry.getValue(), entry.getKey());\n\t\t\t}\n\t\t}\n catch (Exception e)\n {\n logger_.error( LogUtil.throwableToString(e) );\n }\n return;\n }", "int insert(Dormitory record);", "boolean hasInsert();", "int insert(Goodexistsingle record);", "public void insert(Object element1, Object element2, Object element3);", "public void insert(T insertItem){\n if(isEmpty())\n firstNode = lastNode = new SortedListNode<>(insertItem);\n else\n lastNode = lastNode.nextNode = new SortedListNode<>(insertItem);\n\n this.sort();\n }", "public void insert(ValueType element) {\r\n // TODO\r\n }", "int insertSelective(Transaction record);", "public void insert(Integer x) {\n pq[++N] = x;\n swim(N);\n }", "private void insertOperator() {\n int rowsAff = 0;\n int counter = 0;\n String query = \"\";\n System.out.print(\"Table: \");\n String table = sc.nextLine();\n System.out.print(\"Comma Separated Columns: \");\n String cols = sc.nextLine();\n System.out.print(\"Comma Separated Values: \");\n String[] vals = sc.nextLine().split(\",\");\n //transform the user input into a valid SQL insert statement\n query = \"INSERT INTO \" + table + \" (\" + cols + \") VALUES(\";\n for (counter = 0; counter < vals.length - 1; counter++) {\n query = query.concat(\"'\" + vals[counter] + \"',\");\n }\n query = query.concat(\"'\" + vals[counter] + \"');\");\n System.out.println(query);\n rowsAff = sqlMngr.insertOp(query);\n System.out.println(\"\");\n System.out.println(\"Rows affected: \" + rowsAff);\n System.out.println(\"\");\n }", "static boolean testInsert() {\n BinaryTree tree = new BinaryTree();\n int[] profile = new int[1];\n\n // Implement insert method\n boolean insert = tree.insert(\"a\", 0);\n\n // Validates that insert works as expected\n if(!insert)\n return false;\n\n // Validates that insert works with multiple items\n boolean newInsert = tree.insert(\"b\", 1);\n if(!insert || !newInsert)\n return false;\n\n // Validates that values are in binaryTree\n if(tree.search(\"a\", profile) != 0 || tree.search(\"b\", profile) != 1)\n return false;\n\n // Validates that value is overwritten if same key is present\n tree.insert(\"a\", 3);\n if(tree.search(\"a\", profile) != 3)\n return false;\n\n // Validates that profile is as expected\n if(profile[0] <= 0)\n return false;\n\n return true;\n }", "public void insert( int x) \r\n {\r\n h[++N] = x;\r\n siftUp( N);\r\n }", "public void insert(Limit limit);", "@Override\n\tpublic int insertSelective(TfLoss record) {\n\t\treturn tfLossMapper.insertSelective(record);\n\t}", "public abstract String insert(Object obj) ;", "@Override\r\n\tpublic Integer insert(Filtering record) {\n\t\treturn filteringMapper.insert(record);\r\n\t}", "int insertSelective(VoteList record);", "static void insert(Item x) {\n int i = hash(x.sum);\n while (st[i] != null) {\n i++;\n if (i >= st.length) i -= st.length;\n }\n st[i] = x;\n }", "int insert(YzStiveExplosion record);", "public interface InsertData extends Update {\n}", "public void insert(T t) { \n int bucket = hash(t);\n Table.get(bucket).addLast(t);\n numElements++;\n }", "int insertSelective(DataSync record);", "public void processInsertar() {\n }", "int insertSelective(Storage record);", "int insertSelective(Storage record);", "int insertSelective(FunctionInfo record);", "public boolean insertExamination(Examination examination);", "int insert(VoteList record);", "@Override\n\t\t\t\tpublic void rowsInserted(int firstRow, int endRow) {\n\n\t\t\t\t}", "@Override\r\n\tpublic Integer insertSelective(Filtering record) {\n\t\treturn filteringMapper.insertSelective(record);\r\n\t}", "int insertSelective(Question record);", "int insertSelective(Question record);", "int insertSelective(Question record);", "int insertSelective(Question record);", "int insertSelective(Order record);", "public void insert(int index, T element);", "void insert(EntryPair entry);", "public int insertAuthor(Author author);", "public Object insert(Comparable o);", "@Override\n public void insert(J34SiscomexOrigemDi j34SiscomexOrigemDi) {\n super.doInsert(j34SiscomexOrigemDi);\n }", "int insertSelective(Goodexistsingle record);" ]
[ "0.6987835", "0.6907016", "0.6775335", "0.6581289", "0.6500313", "0.6489727", "0.64752716", "0.6472935", "0.64540917", "0.64207363", "0.6397352", "0.6389864", "0.63619834", "0.6322387", "0.6320197", "0.6296456", "0.62691116", "0.62195563", "0.62098455", "0.61409676", "0.6140893", "0.61335766", "0.61180717", "0.61154246", "0.6105766", "0.6103073", "0.60935754", "0.6035399", "0.60249305", "0.59826875", "0.5969083", "0.59583354", "0.59310246", "0.5928886", "0.59248775", "0.5921275", "0.5913352", "0.5902457", "0.5896593", "0.58661056", "0.58627355", "0.5833278", "0.5830378", "0.5826218", "0.58219224", "0.58168477", "0.5814209", "0.58026356", "0.5782652", "0.57683766", "0.57683766", "0.5765736", "0.57601744", "0.5722225", "0.5717732", "0.571162", "0.57088065", "0.57076716", "0.56997025", "0.5690931", "0.5685938", "0.5676968", "0.56747365", "0.56698495", "0.5663848", "0.5662291", "0.565185", "0.563103", "0.56291634", "0.562855", "0.56280184", "0.5626921", "0.5624584", "0.56234264", "0.56205755", "0.5620263", "0.5617787", "0.5612781", "0.56110334", "0.55891484", "0.55865747", "0.5573648", "0.5569577", "0.5569577", "0.5567899", "0.5567024", "0.5560479", "0.5558963", "0.55540735", "0.5553006", "0.5553006", "0.5553006", "0.5553006", "0.5551986", "0.55484915", "0.55445194", "0.554091", "0.5531873", "0.5531421", "0.5529218" ]
0.600338
29
Implementation of Displacement Mutation.
public Chromosome doDisplacementMutation(){ for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){ ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection); int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()); int leftAllele = Math.min(allele1, allele2); int rightAllele = Math.max(allele1, allele2); var selectionSublist = new ArrayList<Boolean>(newSelection.subList(leftAllele, rightAllele)); for(int j = leftAllele; j < rightAllele + 1; j++){ newSelection.remove(leftAllele); } int index = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()+1); newSelection.addAll(index, selectionSublist); Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated(); if(mutatedKnapsack.isValid()) return mutatedKnapsack; } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void move() {\n _location.x++;\n }", "@Override\n public void update(float delta) {\n // Make sure to COPY the vector and not copy the reference\n position = new Vector3f(entity.getPosition()).add(offset);\n }", "public void recalculateVector()\r\n {\r\n recalculateVector(destX, destY);\r\n }", "public void update(long delta){\n \n if(placement <= -1000){\n placement = zPosition;\n }\n placement -= 5;\n \n \n }", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "@Override\r\n\tpublic void move()\r\n\t{\r\n\t\t//Updates the X and Y position by using dx and dy\r\n float x = location.getX() + dx;\r\n float y = location.getY() + dy;\r\n \r\n //Updates the particle emitter's position to the missiles current position\r\n emitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n \r\n //Updates the location of the missile\n setLocation(x, y);\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "void copyOffsetPosition (DVector3 pos);", "@Override\n public void recalculatePositions() { \n \n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\tif (rand < MUTATION_PROB) {\r\n\t\t\t\t\t// change the sign\r\n\t\t\t\t\tInteger vPoint = chr.get(j);\r\n\t\t\t\t\tchr.remove(j);\r\n\t\t\t\t\tchr.add(j, new Integer(- (vPoint.intValue()%100)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.printChromosomes(\"After Mutation\");\r\n\t}", "@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}", "void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}", "public double calcDisplacement(DispVec dispvec){\t\r\n\t\tdouble displacement;\r\n\t\tdisplacement = dispvec.dv.getNorm();\r\n\t\tdisplacement *= dispvec.direc;\r\n\t\treturn displacement;\r\n\t}", "public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }", "public static void ApplyMovement(Position p, Direction d)\n {\n switch (d)\n {\n case East:\n p.X++;\n break;\n case North:\n p.Y--;\n break;\n case Northeast:\n p.X++;\n p.Y--;\n break;\n case Northwest:\n p.X--;\n p.Y--;\n break;\n case South:\n p.Y++;\n break;\n case Southeast:\n p.X++;\n p.Y++;\n break;\n case Southwest:\n p.X--;\n p.Y++;\n break;\n case West:\n p.X--;\n break;\n }\n }", "public void displace(SpaceThing thing){\n\t\tdouble diffX = getX() - thing.getX();\n\t\tdouble diffY = getY() - thing.getY();\n\t\tdouble xDisplacement = (diffX > 0 ? 1 : -1);\n\t\tdouble yDisplacement = (diffY > 0 ? 1 : -1);\n\t\tVector displacement = new Vector(xDisplacement, yDisplacement);\n\t\tlocation.move(displacement);\n\t\tmoveHitBox(displacement);\n\t}", "public abstract void move(Position position);", "public void deplacer(int nx, int ny)\n\t{\n\t\tposX = nx;\n\t\tposY = ny;\n\t}", "private void m5282f(C1070b op) {\n int positionMultiplier;\n int i = op.f3539a;\n if (i == 1 || i == 8) {\n throw new IllegalArgumentException(\"should not dispatch add or move for pre layout\");\n }\n int tmpStart = m5278d(op.f3540b, i);\n int tmpCnt = 1;\n int offsetPositionForPartial = op.f3540b;\n int i2 = op.f3539a;\n if (i2 == 2) {\n positionMultiplier = 0;\n } else if (i2 == 4) {\n positionMultiplier = 1;\n } else {\n StringBuilder sb = new StringBuilder();\n sb.append(\"op should be remove or update.\");\n sb.append(op);\n throw new IllegalArgumentException(sb.toString());\n }\n for (int p = 1; p < op.f3542d; p++) {\n int updatedPos = m5278d(op.f3540b + (positionMultiplier * p), op.f3539a);\n boolean continuous = false;\n int i3 = op.f3539a;\n boolean z = false;\n if (i3 == 2) {\n if (updatedPos == tmpStart) {\n z = true;\n }\n continuous = z;\n } else if (i3 == 4) {\n if (updatedPos == tmpStart + 1) {\n z = true;\n }\n continuous = z;\n }\n if (continuous) {\n tmpCnt++;\n } else {\n C1070b tmp = mo8468a(op.f3539a, tmpStart, tmpCnt, op.f3541c);\n mo8471a(tmp, offsetPositionForPartial);\n mo8470a(tmp);\n if (op.f3539a == 4) {\n offsetPositionForPartial += tmpCnt;\n }\n tmpStart = updatedPos;\n tmpCnt = 1;\n }\n }\n Object payload = op.f3541c;\n mo8470a(op);\n if (tmpCnt > 0) {\n C1070b tmp2 = mo8468a(op.f3539a, tmpStart, tmpCnt, payload);\n mo8471a(tmp2, offsetPositionForPartial);\n mo8470a(tmp2);\n }\n }", "abstract public void updatePositionsAfterBetaReduction();", "public abstract Chromosome mutation(Chromosome child);", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "void ResolveUnreleasedMovements() {\n\t\t// if (isMove_down())\n\t\t// moveDown();\n\t\tif (isMove_left())\n\t\t\tmoveLeft();\n\t\tif (isMove_right())\n\t\t\tmoveRight();\n\t\t// if (isMove_up())\n\t\t// moveUP();\n\t\t// setBlock_down(false);\n\t\t// if (!isMove_left() && !isMove_right())\n\t\t// getSpeed().setX(0);\n\t\t// if (!isMove_down() && !isMove_up())\n\t\t// getSpeed().setY(0);\n\t}", "@Override\r\n\tpublic void postPointersMove(float arg0, float arg1, float arg2,\r\n\t\t\tfloat arg3, double arg4) {\n\r\n\t}", "public void defaultMutate() {\n int mutationIndex = RNG.randomInt(0, this.m_GenotypeLength);\n //if (mutationIndex > 28) System.out.println(\"Mutate: \" + this.getSolutionRepresentationFor());\n if (this.m_Genotype.get(mutationIndex)) this.m_Genotype.clear(mutationIndex);\n else this.m_Genotype.set(mutationIndex);\n //if (mutationIndex > 28) System.out.println(this.getSolutionRepresentationFor());\n }", "void copyPosition (DVector3 pos);", "public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "public abstract Point move(Point position);", "public void move() {\n\t\t// Override move so we don't move, then get location set by owner.\n\t}", "public void update(){\n velX *= damp;\n velY *= damp;\n posX += velX;\n posY += velY;\n }", "public void move() {\n float diffX = cDestination.getX() - getCenterX();\n float diffY = cDestination.getY() - getCenterY();\n\n float newX = cPosition.getX() + cSpeed * Math.signum(diffX);\n float newY = cPosition.getY() + cSpeed * Math.signum(diffY);\n\n cPosition.setX(newX);\n cPosition.setY(newY);\n }", "public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }", "protected abstract void calcOrigin();", "@Override\n public final void updateOrigin() {\n }", "@Override\n public void onValueDisplaced(int value) {\n }", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "public void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n acc.mult(0);\n }", "@Override\r\n public void MIPSme() {\r\n MIPSMove(this.dst, this.op1);\r\n }", "public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }", "@Override\n public void onDragPositionsChanged(int oldPosition, int newPosition) {\n }", "public abstract void mv(int y, int x);", "public void apply(Position p);", "public double getUniformMutationRatio(){\n return delta;\n }", "public LinearGenomeShrinkMutation(){\n\t\tnumberGenesToRemove = 1;\n\t}", "public void move() {\r\n\t\tthis.vector2D = this.vector2D.add(Direction.DOWN.getUnitVector());\r\n\t}", "protected void move() {\n\t\tx += dx;\n\t\ty += dy;\n\t\tif (distance() > range) remove();\n\t}", "private void introduceMutations() {\n }", "public abstract void mover(Vector2 direccion);", "public void move()\n {\n universe.erase(this);\n \n // compute new position\n \n yPosition += ySpeed;\n xPosition += xSpeed;\n\n // check if it has hit the ground\n if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {\n yPosition = groundPosition - diameter;\n ySpeed = -ySpeed; \n }\n // check if top\n if(yPosition <= 0 && ySpeed < 0){\n ySpeed = -ySpeed; \n }\n //check right\n if(xPosition >= (universe.getLength() - diameter) && xSpeed >0){\n xSpeed = -xSpeed;\n }\n //check left\n if(xPosition <= 0 && xSpeed < 0){\n xSpeed = -xSpeed;\n }\n \n // draw again at new position\n universe.draw(this);\n }", "public void update() {\n if (!outOfBounds()) {\n super.move(dirVec.mul(ShadowDefend.getTimescale() * speed));\n }\n super.update();\n }", "void mutate() {\r\n\t\tif (Math.random() < TSP.p_mutate) {\r\n\t\t\t// randomly flip two cities\r\n\t\t\trndSwapTwo();\r\n\t\t\tthis.distance = distance();\r\n\t\t}\r\n\t}", "public Vector getDisplacementVector(Coord b) {\n\t\treturn new Vector(b).minus(new Vector(this));\n\t}", "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 }", "private void updatePosition() {\n\t\tfor (int i = 0; i < encoders.length; i++) {\n\t\t\tdRot[i] = (encoders[i].get() - lastEncPos[i]) / this.cyclesPerRev;\n\t\t\tdPos[i] = dRot[i] * wheelDiameter * Math.PI;\n\t\t\tlastEncPos[i] = encoders[i].get();\n\t\t}\n\t\t\n\t\tdLinearPos = (dPos[0] + dPos[1]) / 2;\n\t\t\n\t\tposition[2] = Math.toRadians(gyro.getAngle()) + gyroOffset;\n\t\tposition[0] += dLinearPos * Math.sin(position[2]);\n\t\tposition[1] += dLinearPos * Math.cos(position[2]);\n\t}", "public void refreshPosition() {\n\n this.setTransform(getTransform());\n }", "Position getNewPosition();", "@Test\n public void testVerticalDisplacementTo() {\n System.out.println(\"Testing verticleDisplacementTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 555.998,\n -555.998,\n -555.998,\n 555.998,\n\t\t\t72.266,\n\t\t\t-72.266,\n\t\t\t-72.266,\n\t\t\t72.266\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.verticalDisplacementTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }", "private void disparo()\n {\n switch(this.posicion){\n case 0:\n setLocation(getX(),getY()-this.velocidadDisparo);\n break;\n case 1:\n setLocation(getX(),getY()+this.velocidadDisparo);\n break;\n case 2:\n setLocation(getX()+this.velocidadDisparo,getY());\n break;\n case 3:\n setLocation(getX()-this.velocidadDisparo,getY());\n break;\n }\n }", "public abstract E remove(Position<E> p);", "public void Mirror() {\n\t\t\r\n\t}", "public void onSwapPosition() {\n\n\t}", "@Override\n public void move() {\n this.point.x += vector.x * getCurrentSpeed();\n this.point.y += vector.y * getCurrentSpeed();\n }", "public void move()\n\t{\n\t\tx = x + logDx;\n\t}", "public Vector2fc getPosition(){\n return position.toImmutable();\n }", "void move(IntVector delta);", "private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}", "public void move(long deltaTime) {\n\n Point currentTile = getOccupyingTile(position);\n\n /*\n if (!Simulator.getInstance().getTileMap().isInsideMap(currentTile))\n return;\n\n if (Simulator.getInstance().getTileMap().isAWall(currentTile) || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n*/\n\n if (Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n\n\n if (!Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile) && Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector().equals(new Point2D.Double(0.0, 0.0))) {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n double angle = 0;\n while ((angle >= 60 && angle <= 120) || (angle >= 150 && angle <= 210) || (angle >= 240 && angle <= 300) || (angle >= 330) || (angle <= 30)) {\n\n angle = Math.random() * 360;\n }\n setVector(new Point2D.Double(Math.cos(Math.toRadians(angle)) / 1.5, Math.sin(Math.toRadians(angle)) / 1.5));\n } else {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n }\n\n\n Point2D vectorDiff = new Point2D.Double(vector.getX() - targetVector.getX(), vector.getY() - targetVector.getY());\n\n if (vectorDiff.getX() < 0)\n vector.setLocation(vector.getX() + 0.001 * velocity * deltaTime, vector.getY());\n else if (vectorDiff.getX() > 0)\n vector.setLocation(vector.getX() - 0.001 * velocity * deltaTime, vector.getY());\n\n if (vectorDiff.getY() < 0)\n vector.setLocation(vector.getX(), vector.getY() + 0.001 * velocity * deltaTime);\n else if (vectorDiff.getY() > 0)\n vector.setLocation(vector.getX(), vector.getY() - 0.001 * velocity * deltaTime);\n\n\n Point2D newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n Point targetTile = getOccupyingTile(newPosition);\n\n\n Point direction = getDirection(currentTile, targetTile);\n\n\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) {// || Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n\n if (Simulator.getInstance().isUsingBounceCollision()) {\n if (direction.x > 0 || direction.x < 0)\n vector.setLocation(vector.getX() * -0.5, vector.getY());\n if (direction.y > 0 || direction.y < 0)\n vector.setLocation(vector.getX(), vector.getY() * -0.5);\n\n newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n targetTile = getOccupyingTile(newPosition);\n\n //Secondary check to make sure the bounce doesn't make it go out of bounds\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) { //|| Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n vector.setLocation(0, 0);\n } else {\n setPosition(newPosition);\n }\n\n\n } else {\n vector.setLocation(0, 0);\n }\n\n } else {\n setPosition(newPosition);\n }\n\n }", "public void updatePosition(Location loc)\n {\n position = new BlockVector(loc.getX(), loc.getY(), loc.getZ());\n }", "public void step() {\n hasMoved = new boolean[simulationSize][simulationSize]; // Initializing the array and populating it with false values\n\n for(int i = 0; i < hasMoved.length; i++)\n Arrays.fill(hasMoved[i], false);\n\n moveFluid();\n\n yVelocityModifier.add(gravity);\n for(int i = 0; i < simulationSize; i++) { // Iterating through every grid space\n for(int j = 0; j < simulationSize; j++) {\n if(fluidGrid[i][j][0] == EMPTY_VALUE) // If the current space is empty don't use it\n continue;\n\n for(float xModifier : xVelocityModifier) {\n fluidGrid[i][j][0] += xModifier;\n }\n\n for(float yModifier : yVelocityModifier) {\n fluidGrid[i][j][1] += yModifier;\n }\n }\n }\n\n xVelocityModifier.clear();\n yVelocityModifier.clear();\n }", "public void move()\n\t{\n\t\tx = x + frogVelocityX;\n\t}", "@Override\n public void backward() {\n Tensor x = modInX.getOutput();\n Tensor tmp = new Tensor(yAdj); // copy\n tmp.elemDivide(x);\n modInX.getOutputAdj().elemAdd(tmp);\n }", "@Override\n public void tick() {\n setPosition(getPosition().add(getSpeed())); \n }", "void moveRemoved(Move move);", "void updatePercepts() {\n clearPercepts();\n \n Location r1Loc = model.getAgPos(0);\n //Location r2Loc = model.getAgPos(1);\n \n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n // Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\n addPercept(pos1);\n //addPercept(pos2);\n \n if (model.hasObject(Const.ObstacleCode, r1Loc)) {\n addPercept(Const.v1);\n }\n// if (model.hasObject(Const.ObstacleCode, r2Loc)) {\n// addPercept(Const.v2);\n// }\n }", "public ReplaceMoved(final Map<String, String> mapParams, final Card host, final boolean intrinsic) {\r\n super(mapParams, host, intrinsic);\r\n }", "public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }", "@Override\n public void unexecute()\n {\n if(layer.removeMeasurementPointByPosition(measurementPoint.getPosition()))\n {\n //remove local reference to the measurement point\n measurementPoint = null;\n //remove marker\n if(mapCanvas.removeMarkerFromMap(markerPositionOnMap))\n {\n markerPositionOnMap = null;\n }\n else\n {\n Log.d(DEBUGTAG, \"Error: While undoing 'add measurement point' could not remove the marker\");\n }\n\n }\n else\n {\n Log.d(DEBUGTAG, \"Error: MeasurementPoint not found in layer!\");\n }\n Log.d(DEBUGTAG, \"Command AddMeasurement Point Unexecuted\");\n }", "public void Obstaclemove() {\n for (int i = 0; i < getNumberObstacles(); i++) {\n if (ObstacleDeplace.class.isInstance(getObstacle()[i])) {\n getObstacle()[i].setX(getObstacle()[i].getX() - getObstacle()[i].getSpeed());\n\n if (getObstacle()[i].getX() < -200) {\n getObstacle()[i].setX(600);\n getObstacle()[i].setSpeed(randomGenerator.nextFloat());\n }\n }\n setChanged();\n notifyObstacle(i, getObstacle()[i].getX(), getObstacle()[i].getY());\n }\n }", "@Override\n public void visitConstant(ConstantExpression constantExpression) {\n distance += constantExpression.interpret(context);\n }", "public abstract void Move();", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "@Override\n public void update(float deltaTime) {\n \tif (isMoving && (!getCurrentMainCellCoordinates().equals(targetMainCellCoordinates))) {\n \t\tVector distance = getOrientation().toVector();\n \t\tdistance = (distance.mul(1.0f / framesForCurrentMove));\n \t\tsetCurrentPosition(getPosition().add(distance));\n \t} else {\n \t\tresetMotion();\n \t}\n }", "@Override\n public void onMove(float x, float y) {\n }", "@Override\n public double getDestinationX() {\n return myMovable.getDestinationX();\n }", "@Override\r\n public void moveSoldier(int previousLocationX, int previousLocationY, int newLocationX, int newLocationY) {\r\n\r\n // delete soldier representation from previous location \r\n // then render soldier representation in new location \r\n }", "public void frogReposition() {\n\t\tsetY(FrogPositionY);\n\t\tsetX(FrogPositionX);\t\t\n\t\t}", "public final void processMovement() {\r\n\t\tif (isMoving()) {\r\n\t\t\tlong elapsed = System.currentTimeMillis() - moveStart;\r\n\t\t\tmovementPercent = (((float) elapsed) / ((float) movementTime));\r\n\t\t\tif (movementPercent < 1f) {\r\n\t\t\t\txOff = -getWrappedEntity().getDir().getXOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_WIDTH);\r\n\t\t\t\tzOff = -getWrappedEntity().getDir().getZOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_HEIGHT);\r\n\t\t\t} else {\r\n\t\t\t\tmovementPercent = 0f;\r\n\t\t\t\tmoveStart = -1;\r\n\t\t\t\txOff = 0;\r\n\t\t\t\tzOff = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void move() {\n\n\t}", "@Override\n public double getLocationX() {\n return myMovable.getLocationX();\n }", "public void place(Position position) { this.position = position; }", "@Override\n\tpublic void applyMutation(int index, double a_percentage) {\n\n\t}", "public static double getMutationProbability() { return mutationProbability; }", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "protected void updateMove(float delta) {\n\n if (freeX && dx != 0) {\n setX(getX() + getDx());\n }\n if (freeY && dy != 0) {\n setY(getY() + getDy());\n }\n }", "void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n // Multiplying by 0 sets the all the components to 0\n acc.mult(0);\n}", "godot.wire.Wire.Vector2 getPosition();" ]
[ "0.55656785", "0.53764737", "0.5305465", "0.5284273", "0.5238446", "0.5222301", "0.5192647", "0.5192647", "0.51350445", "0.5131993", "0.5128159", "0.5102674", "0.5096482", "0.5089484", "0.5081174", "0.505763", "0.50415283", "0.503971", "0.5031394", "0.50174433", "0.50017065", "0.49663866", "0.49628186", "0.49615178", "0.4952727", "0.49522206", "0.49499005", "0.49493244", "0.48953423", "0.48855025", "0.4880873", "0.4877252", "0.48755658", "0.4870242", "0.48676717", "0.48672155", "0.4856209", "0.48543486", "0.48540413", "0.48500395", "0.4845358", "0.48383898", "0.4837078", "0.48344126", "0.48263144", "0.48235455", "0.4817378", "0.48143116", "0.48100832", "0.48089698", "0.48065302", "0.4797803", "0.47923425", "0.47853664", "0.478364", "0.47607067", "0.47558957", "0.47416905", "0.47248018", "0.47226027", "0.4720359", "0.47115207", "0.47077107", "0.4707194", "0.47034666", "0.4702535", "0.4698401", "0.46961614", "0.46879444", "0.4685067", "0.4683774", "0.46761015", "0.46711093", "0.46688882", "0.46628463", "0.46604583", "0.4658038", "0.465537", "0.46537483", "0.46527332", "0.4652503", "0.46518302", "0.46510798", "0.46481678", "0.4646152", "0.4640145", "0.46383867", "0.46356043", "0.46316102", "0.4630252", "0.46296638", "0.4624842", "0.4624489", "0.46243113", "0.46225554", "0.46197462", "0.4613131", "0.46114612", "0.46075502", "0.46064025" ]
0.5293636
3
/////////////////////////// // Getters and Setters //// ///////////////////////////
public double getRwsValue() { return this.rwsValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void init() {\n\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\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\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void 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 initValue()\n\t{\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "public String getName () { return this.name; }", "@Override\n public void initialize() { \n }", "@Override\n public void get() {}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\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}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@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\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public String toString() {\n return (super.toString());\n\n }", "@Override\n public void init() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "private TMCourse() {\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public String getName(){return this.name;}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void load() {\n }", "@Override\n public String getName(){\n return Name; \n }", "public String getName() { return _name; }", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }" ]
[ "0.6292075", "0.6282836", "0.6278325", "0.62685704", "0.6265129", "0.62468547", "0.6245696", "0.62451845", "0.6229859", "0.6229859", "0.6229859", "0.6229859", "0.6229859", "0.6229859", "0.6188869", "0.6172797", "0.61618423", "0.61257654", "0.6122507", "0.6107006", "0.60808975", "0.6078826", "0.6058216", "0.6058216", "0.6043139", "0.6040277", "0.6040277", "0.6030015", "0.6025623", "0.6022728", "0.6018831", "0.6016617", "0.6016617", "0.6016617", "0.6016617", "0.6016617", "0.60129726", "0.60125124", "0.60125124", "0.6007048", "0.6007048", "0.6007048", "0.60066915", "0.6004475", "0.6004368", "0.59923464", "0.5991047", "0.5973472", "0.596379", "0.5957444", "0.59567684", "0.5952835", "0.59513223", "0.5944394", "0.5944394", "0.5944394", "0.5944394", "0.5944394", "0.5944394", "0.59431416", "0.59431416", "0.59431416", "0.5934722", "0.5933695", "0.59290785", "0.59290785", "0.591611", "0.59128815", "0.5908677", "0.5908677", "0.5908677", "0.58944535", "0.58944535", "0.58898115", "0.5883637", "0.58817023", "0.58817023", "0.5871894", "0.58619773", "0.5851884", "0.58491975", "0.58451027", "0.58397824", "0.5838624", "0.5838032", "0.58376265", "0.58376265", "0.58376265", "0.5812702", "0.5809375", "0.58066", "0.58063346", "0.5797192", "0.5794659", "0.5794338", "0.57937425", "0.57928264", "0.579133", "0.579133", "0.57892597", "0.57892597" ]
0.0
-1
constructor for Cardholder class
public Cardholder(String name, String address, int cardNumber){ this.name = name; this.address = address; this.cardNumber = cardNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card () {}", "Card(){\t \n}", "public Card()\n {}", "public Card() { this(12, 3); }", "public BaseballCard(){\r\n\r\n\t}", "public LaundryCard() {\n\t}", "public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public PlayingCard(){\n\t\tsuper();\n\t}", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "public CardGameFramework() {\n this(1, 0, 0, null, 4, 13);\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public CardCollection() {\n cards = new ArrayList<>();\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public PaymentCard() {\n\t}", "private Card(Color c, Rank r) {\n this.nbCard = pack(c,r);\n }", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public Card(String name) {\n setValue(name);\n }", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "public CreditCard(int pin, String number, String holder, Date expiryDate, int cvc){\r\n this.pin = pin;\r\n this.number = number;\r\n this.holder = holder;\r\n this.expiryDate = expiryDate;\r\n this.cvc = cvc;\r\n}", "private CardExchangeModel() {\n\t}", "public Card(String id, String name) {\n \t\tsameID = new String[MINILEN];\n \t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\tsameID[i] = \"\";\n \t\t}\n \t\tsetID(id);\n \t\t// setName(id);\n \t\tsetCardName(name);\n \n \t\trealCardName = name;\n \n \t\teffects = new ArrayList<String>();\n \t\teffects_e = new ArrayList<String>();\n \t\tflavorText = \"\";\n \t\tflavorText_e = \"\";\n \t\tsetCurrentState(State.NONE);\n \t\t// imageFile = new File(\"FieldImages/cardBack-s.jpg\");\n \t\timageResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tbackResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tsetAssociatedCards(new ArrayList<Card>());\n \t\tsetAttributes(new ArrayList<Attribute>());\n \t\t// addMouseListener(this);\n \t}", "public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "public CardInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Card()\n {\n // initialise instance variables\n message = new ArrayList<String>();\n message.add(\"Sorry!\");\n message.add(\"One\");\n message.add(\"Two\");\n message.add(\"Three\");\n message.add(\"Four\");\n }", "public Hand(){\n cards = new ArrayList<Card>();\n }", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public Deck() {\n generateDeckOfCards();\n }", "public CardTrackKey() {\n\tsuper();\n}", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public ViewCard(@NotNull Card modelCard)\n {\n super(CARD_WIDTH, CARD_HEIGHT, CARD_DEPTH, \"file:./res/\" + getFileName(modelCard),\n CARD_FACE_TEXTURE_WIDTH, CARD_FACE_TEXTURE_HEIGHT);\n this.modelCard = modelCard;\n }", "public CardStack()\n {\n cards = new Vector<Card>();\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Card(int x) {\n\t\tid = x;\n\t}", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "public Card(int cardNumber, JButton jButton) {//upon creation;\n this.cardNumber = cardNumber;//set the card number of this card;\n this.jButton = jButton;//set the JButton of this card;\n// System.out.println(cardNumber);//SOUT the card numbers;\n }", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public ResourceDeck(JComponent container){\n super(container);\n deck = new ArrayList<ResourceCard>();\n populateDeck();\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}", "Card(Color color) {\n this.color = color;\n }", "public CluedCard(GameMode mode) {\n\t\tthis(null, null, mode);\n\t}", "public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }", "public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }", "public Player(){\r\n cards = new ArrayList<String>();\r\n indexes = new ArrayList<Integer>();\r\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public CardGame(){\n this.handOne = new Hand();\n this.handTwo = new Hand();\n this.gameDeck = new Deck();\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public SafetyPile(){\r\n this.cards = new ArrayList<Card>();\r\n }", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public Deck(String name){\r\n\t\tthis(name, new ArrayList<Card>());\r\n\t}", "public DebitCard(String n, int c, int p, Date e, Customer h, Provider p) {}", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public MageTowerCard() {\n\t\tsuper(cardName, cardId, cardCost);\n\t}", "CardNumber(int number) {\r\n this.number = number;\r\n }", "public Card(FrontFace frontFace, BackFace backFace) {\n this.frontFace = frontFace;\n this.backFace = backFace;\n }", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Card(String[] card) {\r\n\t\tthis.deckIndex = Integer.parseInt(card[0]);\r\n\t\tthis.suit = (char) Integer.parseInt(card[1]);\r\n\t\tthis.name = (char) Integer.parseInt(card[2]);\r\n\t\tthis.ordinal = Integer.parseInt(card[3]);\r\n\t\tthis.value = Integer.parseInt(card[4]);\r\n\t}", "Board() {\n this.cardFactory = new CardFactory(this);\n }", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "public Cards( boolean fullPack)\r\n {\r\n cards = new Card[ NOOFCARDSINFULLPACK ];\r\n valid = 0;\r\n \r\n if ( fullPack)\r\n createFullPackOfCards();\r\n }", "public CareerCard (String name)\r\n {\r\n super (name);\r\n setDegreeRequired ();\r\n setMaxPayRaise ();\r\n }", "public backCard() {\n\t\tsuper(null,null);\n\t}", "public CardButton(Context context) {\n super(context);\n }", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public Card(final VCard vcard) {\n this.vcard = vcard;\n prevLastmod = getLastmod();\n }", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public Card(short rank, short suit){\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public DrawableCard(Context context, AttributeSet attrs) {\n super(context, attrs);\n\n //initially the card is not selected\n this.selected = -1;\n init();\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "public Deck() {\n this.deck = new LinkedList<>();\n }", "public Deck()\n {\n deck = new ArrayList<>();\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public CardPile() {\n \n this.pila = new Stack<ICard>();\n this.tamano = 0;\n }", "public UserCard() {\n this(DSL.name(\"b2c_user_card\"), null);\n }", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "public Card (int cardNumber, String cardSuit, Image cardFront, Image cardBack) \r\n\t{\r\n\t\t//Updating Global Card Number\r\n\t\tthis.cardNumber = cardNumber;\r\n\t\t\r\n\t\t//Updating Global Card Suit\r\n\t\tthis.cardSuit = cardSuit;\r\n\t\t\r\n\t\t//Updating Global Card Front\r\n\t\tthis.cardFront = cardFront;\r\n\t\t\r\n\t\t//Updating Global Card Back\r\n\t\tthis.cardBack = cardBack;\r\n\t}", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "public CardAdapter(Context context, List<information> informationList){\n this.context = context;\n this.informationList = informationList;\n }", "public BadgeCard() {\n this(null, null, null, 0);\n }" ]
[ "0.8325315", "0.81250733", "0.79931915", "0.79582024", "0.7815935", "0.7725793", "0.7656047", "0.76494026", "0.76472735", "0.7600083", "0.75491476", "0.75387794", "0.7504563", "0.7394533", "0.73737293", "0.7340295", "0.73391855", "0.7331391", "0.73288035", "0.7258825", "0.72565794", "0.7231822", "0.7230853", "0.72044826", "0.71932906", "0.71910626", "0.7171271", "0.7146284", "0.7121517", "0.71068454", "0.70894337", "0.70793986", "0.7076179", "0.70752764", "0.70283055", "0.70135456", "0.69845206", "0.6979748", "0.697822", "0.69535244", "0.69515955", "0.69375336", "0.6923546", "0.6913911", "0.69061387", "0.689955", "0.686192", "0.68475884", "0.6841815", "0.68406266", "0.68362254", "0.68329644", "0.6826536", "0.68256426", "0.6799282", "0.67953086", "0.67849386", "0.6784215", "0.6767314", "0.6763561", "0.6762207", "0.6759826", "0.67485064", "0.67391807", "0.67370117", "0.67337424", "0.67296726", "0.6718773", "0.67109066", "0.67054826", "0.66651434", "0.66592705", "0.6654918", "0.6649132", "0.6648647", "0.6645486", "0.66450614", "0.66380674", "0.66312903", "0.66289675", "0.6610127", "0.6605167", "0.6601777", "0.65994704", "0.6591205", "0.65884244", "0.6587339", "0.65864164", "0.6585372", "0.6583837", "0.65703255", "0.6568439", "0.65625423", "0.6552669", "0.65520227", "0.6547823", "0.65346754", "0.6532281", "0.6525836", "0.65118665" ]
0.7600168
9
getters for Cardholder class
public String getName(){ return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card getCard() {\n return this.card;\n }", "public Card getCard() {\n return this.card;\n }", "public Card getCard(){\n return cards.get(0);\n }", "CardController getCardController() { return cardController; }", "public Card getModelCard()\n {\n return modelCard;\n }", "@Override\n\tpublic Cards getCards() {\n\t\treturn cards;\n\t}", "public Card[] GetCards() { return mCard; }", "List<Card> getCards() {\n return cards;\n }", "public List<Card> getCards()\n {\n return this.deckOfCards;\n }", "public Cards getCards() {\r\n\t\treturn cards;\r\n\t}", "public ArrayList<Card> getCards() {return cards;}", "public List<Card> getCards(){\r\n\t\treturn cards;\r\n\t}", "public ArrayList<Card> getCards(){\n return this.cards;\n }", "public ArrayList<Card> getCards(){\r\n return cards;\r\n }", "public int getCardValue()\n {\n return cardValue; \n }", "public CardDeck cardDeck(){\r\n\t\treturn deck;\r\n\t}", "public Deck getDeck(){\r\n\t\t return cards;\r\n\t }", "public ArrayList<Card> getCards() {\n\n return cards;\n }", "Card(){\t \n}", "Vector<Card_Model> GetBuildOfCards() {\n return buildOfCards;\n }", "public ArrayList<Card> getCards()\n\t{\n\t\treturn cards;\n\t}", "public CardInfo[] getCardInfo() {\n return cardInfo;\n }", "public Map<String,Card> getCard(){\n return null;\n }", "public List<AbstractCard> cards();", "public CardDeck getCardDeck() {\n return cardDeck;\n }", "public int getNumber(){return cardNumber;}", "public List<Card> getCards() {\n\t\treturn cards;\n\t}", "public int getCardID() {\n return cardID;\n }", "public List<Card> getCards(){\n\t\treturn this.pile;\n\t}", "Card getCard(UUID cardId);", "public interface ICards {\n /**\n *\n * @return a describing string of the card\n */\n public String getDisplayText();\n\n /**\n *\n * @return a simple card name that the server can easily read\n */\n public String getSimpleCardName();\n\n public int getPrio();\n\n}", "public int getCardNumber() {\n return cardNumber;\n }", "public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }", "public int getCardDetailsID(){\n return cardDetailsID;\n }", "public ArrayList<Card> getHand(){\n return cards;\n }", "@Test\r\n public void testGetSpecificCard() {\r\n Deck instance = new Deck();\r\n System.out.println(\"Testing getSpecificCard\");\r\n Card result = instance.getSpecificCard(51);\r\n System.out.println('\\t' + \"Card toString: \" + result.toString());\r\n assertNotNull(result);\r\n }", "public Integer getCardtype() {\n return cardtype;\n }", "public int[] getCards() {\n \t\treturn cards;\n \t}", "public CardSet getCardSet() {\n return cardSet;\n }", "public interface Card {\n\n}", "public interface Card {\n\n}", "public List<Card> getCards() {\n return new ArrayList<Card>(cards);\n }", "public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }", "public Card () {}", "public int getNumber(){\n return cardNumber;\n }", "public interface mCard {\n\nint getCardType();\nvoid onBindView(CardView cardView);\n\n}", "public List<Card> getVegasDeckCardList(){\n return vegasDeckCardList;\n }", "public String getCardNumber()\n {\n return cardNumber;\n }", "public Byte getCardType() {\r\n return cardType;\r\n }", "public List<Card> getCards()\n {\n // RETURN the CardMessage's list of <code>ClueCards</code>\n return this.cards;\n }", "public ArrayList<Card> getDeck()\n {\n return deck;\n }", "public Long getCardId() {\r\n return cardId;\r\n }", "void setCard(Card card) {\n this.card = card;\n }", "public List<Card> getCards() {\n\t\treturn new ArrayList<Card>(this.content);\n\t}", "public String getIdCard() {\r\n return idCard;\r\n }", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "public PlayingCard(){\n\t\tsuper();\n\t}", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public String getIdCard() {\n return idCard;\n }", "public int getCardSlot() {\n return cardSlot;\n }", "@Override\n\tpublic String cardDetail() {\n\t\treturn atmCard.cardDetail();\n\t}", "@JsonIgnore\n\tpublic List<Card> getAvailableCards() {\n\t\tList<Card> availableCards = new ArrayList<>();\n\t\tfor (int i = dealtCards.get(); i < Deck.DECK_SIZE; i++) {\n\t\t\tCard card = cards.get(i);\n\t\t\tavailableCards.add(card);\n\t\t}\n\t\treturn availableCards;\n\t}", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "public ArrayList<Card> getDeck() {\n return deck;\n }", "com.google.protobuf.ByteString getCards();", "public Card getPresentCard() {\n return storageCards.peek();\n }", "public Card showCard()\r\n {\r\n return pile.peek();\r\n }", "public String getCardKind() {\r\n return cardKind;\r\n }", "@Override\n\tpublic List<Card> findAllCard() {\n\t\treturn cb.findAllCard();\n\t}", "public Card getPlayer1Card()\n {\n player1card = new Card(player1Hand.dequeue().toString());\n return player1card;\n }", "public java.math.BigDecimal getCardMoney() {\r\n return localCardMoney;\r\n }", "@Override\n public float getPriceCard() {\n return database.getPriceCard();\n }", "public String getCardType() {\n return cardType;\n }", "@Override\n public Card getCard(int i) {\n return this.cards.get(i);\n }", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "@Override\npublic Deck<T> getDeck(){\n\treturn deck;\n}", "public Card receiveCard() {\n try {\n return (Card) dIn.readObject();\n } catch (IOException e) {\n System.out.println(\"Card not received\");\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n System.out.println(\"Class not found\");\n e.printStackTrace();\n }\n return null;\n }", "public int getCardCount() {\r\n return cardCount;\r\n\t}", "ICard getCard(int cardIndex) throws IllegalArgumentException;", "public Card(){\n suit = 0;\n rank = 0;\n }", "public Card getCardAt( int index ) {\n return this.cards[index];\n }", "public List<Card> list();", "@Override\r\n public Card getCardFromDealer(int deckPosition) {\r\n return this.dealer.getCard(deckPosition);\r\n }", "public ArrayList<CareerCards> getCareerCardDeck(){\n\t\treturn careerCardDeck;\n\t}", "public Integer getRoomcard() {\n return roomcard;\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public String getCardNumber() {\n return cardNumber;\n }", "public ArrayList<VentraCard> getAllCards(){\n \treturn allCards;\n }", "public Card() {\n this.set('A', Suit.spades);\n }", "public ImageIcon getCardPicture()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getCardPicture Method *****************/\n\n // Return card picture\n return picture;\n\n }", "public UnoCard getCard(){\n Random rnd = new Random();\n int rnd_number = rnd.nextInt(((this.cards.size()-1)-0) + 1) + 0;\n return this.cards.get(rnd_number);\n\n }", "public Card [] getCards() {\r\n Card [] cardDeckCopy = new Card [this.cardsLeft];\r\n \r\n // A copy of the cardDeck is made of the size of the remaining cards so that the private attribute is not directly\r\n // affected\r\n \r\n for (int index = 0; index < this.cardsLeft; index++) {\r\n cardDeckCopy [index] = cardDeck [index];\r\n }\r\n return cardDeckCopy;\r\n }", "private Card loadCardFromForm() {\n //validate fields\n Card card;\n\n String cardNum = mCardForm.getCardNumber();\n\n //build card object with ONLY the number, update the other fields later\n card = new Card.Builder(cardNum, 0, 0, \"\").build();\n String cvc = mCardForm.getCvv();\n //update the cvc field of the card\n card.setCvc(cvc);\n\n //validate expiry month;\n String sMonth = mCardForm.getExpirationMonth();\n int month = 0;\n try {\n month = Integer.parseInt(sMonth);\n } catch (Exception ignored) {\n }\n\n card.setExpiryMonth(month);\n\n String sYear = mCardForm.getExpirationYear();\n int year = 0;\n try {\n year = Integer.parseInt(sYear);\n } catch (Exception ignored) {\n }\n card.setExpiryYear(year);\n\n return card;\n }", "Card dealOneCard();", "public Card getCard( int cardNum ) {\n\t\treturn deck[ cardNum ];\n\t}", "public CardGao dealCard()\r\n {\r\n return cards.get(top--);\r\n\r\n }", "@Override\n public String toString() {\n return \"Card{\"\n + \"frontInfo='\" + frontInfo\n + '\\''\n + \", backInfo='\" + backInfo\n + '\\''\n + \", startTime=\" + startTime\n + \", ID=\" + cardID\n + '}';\n }", "public double getCardNumber() {\n\t\treturn cardNumber;\n\t}", "Card_Model GetCaptureCardOfBuild() {\n return captureCardOfBuild;\n }", "public CardCollection() {\n cards = new ArrayList<>();\n }" ]
[ "0.79394156", "0.7890454", "0.730692", "0.7302011", "0.72270346", "0.7181251", "0.7140364", "0.7064896", "0.7063803", "0.700259", "0.6981473", "0.6974481", "0.69554335", "0.691086", "0.68904394", "0.6873267", "0.68713814", "0.68544793", "0.6852242", "0.6812827", "0.6780286", "0.6779412", "0.67690474", "0.67615294", "0.674951", "0.67230666", "0.66985196", "0.66941917", "0.6692227", "0.6689798", "0.6652364", "0.6629685", "0.65610224", "0.6540226", "0.65266013", "0.6525848", "0.6494125", "0.6491475", "0.6487602", "0.64862126", "0.64862126", "0.64858454", "0.6476686", "0.64695454", "0.64691985", "0.64679265", "0.64611757", "0.6445792", "0.64436793", "0.64427257", "0.64405525", "0.6437437", "0.6425076", "0.64038396", "0.63928896", "0.6391997", "0.63879675", "0.6361178", "0.6350102", "0.63478523", "0.63416934", "0.6334197", "0.63340914", "0.6322634", "0.6320489", "0.6309853", "0.62879074", "0.6271555", "0.6270515", "0.6269295", "0.6265296", "0.6258578", "0.6256685", "0.62551475", "0.62544495", "0.62479806", "0.62379205", "0.6234898", "0.6234257", "0.62314665", "0.6216817", "0.62104106", "0.6198844", "0.6194346", "0.6178613", "0.61770004", "0.6169059", "0.6167981", "0.615439", "0.6153393", "0.6146142", "0.6143729", "0.6136241", "0.6123374", "0.61218023", "0.61216825", "0.6120267", "0.6115735", "0.61141664", "0.6112954", "0.6112942" ]
0.0
-1
setters for Cardholder class
public void setName(String name){ this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setCard(Card card) {\n this.card = card;\n }", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "Card(){\t \n}", "public Card getCard() {\n return this.card;\n }", "public Card getCard() {\n return this.card;\n }", "public Card() {\n this.set('A', Suit.spades);\n }", "public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public Card () {}", "public PlayingCard(){\n\t\tsuper();\n\t}", "CardController getCardController() { return cardController; }", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public void setCards(List<T> cards) {\n\t\tthis.cards = cards;\n\t}", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public CardCollection() {\n cards = new ArrayList<>();\n }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public void setCardNo(int cardNumber);", "public Card() { this(12, 3); }", "public void setCards(Card[] cards) {\r\n this.cards = cards;\r\n }", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public Card()\n {}", "Card(Color color) {\n this.color = color;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "private void setCard(@NonNull Card card) {\n Debug.trace(\"CardDetails\", card.toString());\n etCardNumber.setText(card.getCardNumber());\n etCardHolderName.setText(card.getCardHolderName());\n// etCardExpiryDate.removeTextListener();\n etCardExpiryDate.setText(DateFormatUtils.stringToStringConversion(card.getExpirationDate(), \"MM/yy\", \"MM/yyyy\"));\n// etCardExpiryDate.addDateSlash(etCardExpiryDate.getEditableText());\n// etCardExpiryDate.addTextListener();\n }", "public Card(String name) {\n setValue(name);\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "private void cards() {\n newUserCard();\n editTypeCard();\n changePasswordCard();\n }", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "public CardSet getCardSet() {\n return cardSet;\n }", "public Card getModelCard()\n {\n return modelCard;\n }", "public void toSetCard() {\n this.notifyTimeToSetCard(availableGods, getCurrentTurn().getCurrentPlayer());\n this.notifySetCard(availableGods, getCurrentTurn().getCurrentPlayer().getNickname(), chosenGodList);\n\n }", "CardNumber(int number) {\r\n this.number = number;\r\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "@Override\n\tpublic Cards getCards() {\n\t\treturn cards;\n\t}", "public Card(int cardNumber, JButton jButton) {//upon creation;\n this.cardNumber = cardNumber;//set the card number of this card;\n this.jButton = jButton;//set the JButton of this card;\n// System.out.println(cardNumber);//SOUT the card numbers;\n }", "public Card(String id, String name) {\n \t\tsameID = new String[MINILEN];\n \t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\tsameID[i] = \"\";\n \t\t}\n \t\tsetID(id);\n \t\t// setName(id);\n \t\tsetCardName(name);\n \n \t\trealCardName = name;\n \n \t\teffects = new ArrayList<String>();\n \t\teffects_e = new ArrayList<String>();\n \t\tflavorText = \"\";\n \t\tflavorText_e = \"\";\n \t\tsetCurrentState(State.NONE);\n \t\t// imageFile = new File(\"FieldImages/cardBack-s.jpg\");\n \t\timageResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tbackResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tsetAssociatedCards(new ArrayList<Card>());\n \t\tsetAttributes(new ArrayList<Attribute>());\n \t\t// addMouseListener(this);\n \t}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public void ActonCard() {\n\t}", "public interface Card {\n\n}", "public interface Card {\n\n}", "private Card(Color c, Rank r) {\n this.nbCard = pack(c,r);\n }", "public interface mCard {\n\nint getCardType();\nvoid onBindView(CardView cardView);\n\n}", "public BaseballCard(){\r\n\r\n\t}", "public ViewCard(@NotNull Card modelCard)\n {\n super(CARD_WIDTH, CARD_HEIGHT, CARD_DEPTH, \"file:./res/\" + getFileName(modelCard),\n CARD_FACE_TEXTURE_WIDTH, CARD_FACE_TEXTURE_HEIGHT);\n this.modelCard = modelCard;\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public List<Card> getCards(){\r\n\t\treturn cards;\r\n\t}", "public int getCardValue()\n {\n return cardValue; \n }", "public Cards getCards() {\r\n\t\treturn cards;\r\n\t}", "public SafetyPile(){\r\n this.cards = new ArrayList<Card>();\r\n }", "public Builder setCards(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cards_ = value;\n onChanged();\n return this;\n }", "public CardStack()\n {\n cards = new Vector<Card>();\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "public Deck getDeck(){\r\n\t\t return cards;\r\n\t }", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public ArrayList<Card> getCards() {return cards;}", "public void setCardSelected(Card cardSelected) {\r\n this.cardSelected = cardSelected;\r\n }", "List<Card> getCards() {\n return cards;\n }", "public static void setMyCards() {\n for (Suit s: Suit.values()){\n for (FaceValue f: FaceValue.values()){\n Card c = new Card(s,f);\n myCards.add(c);\n }\n }\n }", "void setcards (String[] cards) {\n\t\tmycards = cards;\n\t}", "public abstract void expose(Card c);", "public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }", "public ArrayList<Card> getCards(){\n return this.cards;\n }", "public DrawableCard(Context context, AttributeSet attrs) {\n super(context, attrs);\n\n //initially the card is not selected\n this.selected = -1;\n init();\n }", "public int getNumber(){return cardNumber;}", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public Hand(){\n cards = new ArrayList<Card>();\n }", "public Card(Card orig){\n this.cardType = orig.cardType;\n this.cardRank = orig.cardRank;\n this.cardSuit = orig.cardSuit;\n scaleCard(this.cardType);\n this.cardId = orig.cardId;\n this.isClick = false;\n this.inValidGroup = orig.inValidGroup;\n }", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Card(int x) {\n\t\tid = x;\n\t}", "public Card (int cardNumber, String cardSuit, Image cardFront, Image cardBack) \r\n\t{\r\n\t\t//Updating Global Card Number\r\n\t\tthis.cardNumber = cardNumber;\r\n\t\t\r\n\t\t//Updating Global Card Suit\r\n\t\tthis.cardSuit = cardSuit;\r\n\t\t\r\n\t\t//Updating Global Card Front\r\n\t\tthis.cardFront = cardFront;\r\n\t\t\r\n\t\t//Updating Global Card Back\r\n\t\tthis.cardBack = cardBack;\r\n\t}", "@Override\n public void putCardMode() {\n gameboardPanel.putCardMode();\n leaderCardsPanel.disableProductionButtons();\n }", "public ArrayList<Card> getCards(){\r\n return cards;\r\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public void setUpCards() {\n this.setSuspectCardsAndPlayerPieces();\n this.setWeaponCardsAndPieces();\n this.setRoomCards();\n this.setUpDetectiveSlips();\n this.shuffleCards();\n this.setEnvelope();\n this.shuffleCards();\n this.gatherCards();\n this.giveOutCards();\n }", "Board() {\n this.cardFactory = new CardFactory(this);\n }", "public Card(int cType){\n this.cardType = cType;\n scaleCard(this.cardType);\n this.isClick = false;\n }", "public int getCardID() {\n return cardID;\n }", "public Card[] GetCards() { return mCard; }", "public List<Card> getCards()\n {\n return this.deckOfCards;\n }", "public CardDeck cardDeck(){\r\n\t\treturn deck;\r\n\t}", "public abstract void addCard();", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "private CardExchangeModel() {\n\t}", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "@Override\r\n\tpublic void buyCard() {\n\t\t\r\n\t}", "public LaundryCard() {\n\t}", "public ArrayList<Card> getCards() {\n\n return cards;\n }", "public void setIdCard(String idCard) {\n\t\tthis.idCard = idCard;\n\t}", "public CardGame(){\n this.handOne = new Hand();\n this.handTwo = new Hand();\n this.gameDeck = new Deck();\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "void setcard(int i)\n{\n\thc.add(i);}", "public CardPile() {\n \n this.pila = new Stack<ICard>();\n this.tamano = 0;\n }", "public Card getCard(){\n return cards.get(0);\n }", "public interface CardViewDelegate {\n\n void setCardPadding(int left, int top, int right, int bottom);\n\n void setPadding(int left, int top, int right, int bottom);\n\n void setRawBackgroundDrawable(Drawable drawable);\n\n void setCardRadius(float radius);\n\n float getCardRadius();\n\n void setCardBackgroundColor(ColorStateList color);\n\n ColorStateList getCardBackgroundColor();\n\n void setCardBoundSize(float size);\n\n float getCardBoundSize();\n\n void setCardBoundColor(ColorStateList color);\n\n ColorStateList getCardBoundColor();\n\n void setCardElevation(float elevation);\n\n float getCardElevation();\n}" ]
[ "0.7880989", "0.7243182", "0.71980476", "0.7124708", "0.70168036", "0.6998493", "0.6932469", "0.6904203", "0.6840286", "0.6816911", "0.6720932", "0.67192084", "0.6715507", "0.6706456", "0.6687326", "0.66659576", "0.66500837", "0.6639827", "0.661396", "0.6600164", "0.65870136", "0.6579516", "0.65635467", "0.65321755", "0.65222675", "0.65213805", "0.65207064", "0.6514168", "0.6491879", "0.64900553", "0.6437611", "0.6426993", "0.6422335", "0.6409578", "0.640507", "0.6365527", "0.6363134", "0.636288", "0.6350886", "0.6349785", "0.634323", "0.63398033", "0.63276637", "0.63198", "0.6311306", "0.62939435", "0.62918305", "0.62918305", "0.62917125", "0.626609", "0.6266022", "0.6265553", "0.6264966", "0.625711", "0.6249787", "0.62405646", "0.623972", "0.6239034", "0.6234974", "0.6233601", "0.6231071", "0.62294126", "0.62251216", "0.621597", "0.62126553", "0.62094337", "0.620278", "0.62022746", "0.6201779", "0.6200273", "0.6200245", "0.61965454", "0.6180026", "0.6179882", "0.617911", "0.6176963", "0.6173825", "0.6169104", "0.6166398", "0.6164733", "0.61644137", "0.6162562", "0.61610276", "0.6157892", "0.6138288", "0.6134734", "0.61225545", "0.6114159", "0.6091149", "0.6086951", "0.6082267", "0.60669374", "0.6053345", "0.6048174", "0.6046723", "0.6045735", "0.6043848", "0.60417116", "0.60409135", "0.60365283", "0.60322237" ]
0.0
-1
Private constructor for not allowing to create an instance of this class.
private CloneFactory() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Instantiation(){}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private Rekenhulp()\n\t{\n\t}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "Reproducible newInstance();", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "private Utility() {\n throw new IllegalAccessError();\n }", "private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }", "private XmlFactory() {\r\n /* no-op */\r\n }", "private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "private InstanceUtil() {\n }", "@SuppressWarnings(\"unused\")\n private Booking() {\n }", "private SerializerFactory() {\n // do nothing\n }", "private Tuples() {\n // prevent instantiation.\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private MApi() {}", "private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }", "private XMLUtil() {\n\t}", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private XMLUtils()\r\n\t{\r\n\t}", "private JsonUtils()\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 Singleton()\n\t\t{\n\t\t}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "private ContentUtil() {\n // do nothing\n }", "private Security() { }", "private Utility() {\n\t}", "private TMCourse() {\n\t}", "private NullSafe()\n {\n super();\n }", "private SingleObject()\r\n {\r\n }", "@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }", "private XmlStreamFactory()\n {\n /*\n * nothing to do\n */\n }", "private XLogger() {\n throw new UnsupportedOperationException(\"Do not need instantiate!\");\n }", "private CheckingTools() {\r\n super();\r\n }", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private Singleton() {\n\t}", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "private ObjectFactory() { }", "private Verify(){\n\t\t// Private constructor to prevent instantiation\n\t}", "private SnapshotUtils() {\r\n\t}", "private ServiceListingList() {\n //This Exists to defeat instantiation\n super();\n }", "private Ex() {\n }", "private ChainingMethods() {\n // private constructor\n\n }", "private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }", "private StreamFactory()\n {\n /*\n * nothing to do\n */\n }", "private Log()\n {\n //Hides implicit constructor.\n }", "private ExplorerFileSystemUtils() {\n // no op\n }", "private PerksFactory() {\n\n\t}", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "protected YamlParser() {\n\t\t// Exists only to defeat instantiation.\n\t}", "private JsonUtils() {\n\t\tsuper();\n\t}", "private Marinator() {\n }", "private Marinator() {\n }", "private Supervisor() {\r\n\t}", "private WolUtil() {\n }", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private SingletonObject() {\n\n\t}", "private XMLUtils() {\n }", "private Terms(){\n\t\t //this prevents even the native class from calling this ctor as well :\n\t\t throw new AssertionError();\n\t\t }", "private Util() { }", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Singleton() { }", "private EagerlySinleton()\n\t{\n\t}", "private Util() {\n }", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "private SingleObject(){}", "public Pleasure() {\r\n\t\t}", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "private StickFactory() {\n\t}", "private Util() {\n }", "private Util() {\n }", "private ClassifierUtils() {\n throw new AssertionError();\n }", "private Builder()\n {\n }", "private Mocks() { }", "protected VboUtil() {\n }", "private ClassUtil() {}" ]
[ "0.7745379", "0.7707285", "0.7602771", "0.7580024", "0.7521524", "0.74195397", "0.73710626", "0.73687595", "0.7367143", "0.7359746", "0.7332368", "0.73302007", "0.7327684", "0.72590905", "0.72309417", "0.7220057", "0.7150921", "0.71189815", "0.71060276", "0.70943487", "0.70846766", "0.70796984", "0.70767236", "0.7076169", "0.70708394", "0.70708394", "0.7067891", "0.7062456", "0.70534754", "0.7035381", "0.7032354", "0.7030083", "0.7017631", "0.7017495", "0.7005646", "0.70040035", "0.6967005", "0.6966088", "0.6961883", "0.69540733", "0.6951284", "0.6949707", "0.6947797", "0.69402725", "0.69329923", "0.69310206", "0.6910668", "0.69101346", "0.6904197", "0.6903625", "0.69015175", "0.689985", "0.6892865", "0.68914056", "0.6889774", "0.6885417", "0.6883683", "0.68808806", "0.6871547", "0.68705153", "0.68687415", "0.6857857", "0.68522424", "0.68494284", "0.68437135", "0.68379575", "0.68379575", "0.6828684", "0.68282694", "0.6827423", "0.68227184", "0.68227184", "0.68227184", "0.68227184", "0.68227184", "0.68214923", "0.6803939", "0.6802604", "0.6799475", "0.6799156", "0.67960316", "0.67960274", "0.6790473", "0.6790473", "0.6790473", "0.6790473", "0.6789816", "0.67894334", "0.6788883", "0.6777294", "0.6776665", "0.6774338", "0.67696697", "0.6761131", "0.6755947", "0.6755947", "0.6754193", "0.67485446", "0.6747245", "0.67455894", "0.67442864" ]
0.0
-1
Returns the cloned object of the given animal.
public static Animal getCopy(Animal animalType) throws CloneNotSupportedException { return animalType.makeCopy(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Animal extends Cloneable {\r\n\tAnimal makeCopy();\r\n}", "public Animal deepCopy() {\n return new Eagle(this);\n }", "public abstract Object clone() ;", "Object clone();", "Object clone();", "public abstract Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone(){ \r\n\t\tBaseballCard cloned = new BaseballCard();\r\n\t\tcloned.name = this.getName();\r\n\t\tcloned.manufacturer=this.getManufacturer();\r\n\t\tcloned.year = this.getYear();\r\n\t\tcloned.price = this.getPrice();\r\n\t\tcloned.size[0]= this.getSizeX();\r\n\t\tcloned.size[1]= this.getSizeY();\r\n\t\treturn cloned;\r\n\t}", "public abstract GameObject clone();", "public T cloneDeep();", "public Object clone()\n\t{\n\t\tObject myClone = new Object();\n\t\tmyClone = myName + myNumberWins;\n\t\treturn myClone;\n\t}", "public Object clone() {\n return this.copy();\n }", "public Object clone() throws CloneNotSupportedException {\n\tthrow new CloneNotSupportedException(\"This is a Singleton Ojbect; Buzz off\");\n }", "public abstract Shape clone() throws CloneNotSupportedException;", "public Function clone();", "public Theater cloneTheater() {\n return new Theater(this);\n }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public abstract Shape getCopy();", "public Object clone(){\n\t\tVehicle car;\n\t\ttry{\n\t\t\tcar = (Vehicle) super.clone();\n\t\t} catch(CloneNotSupportedException e){\n\t\t\treturn null;\n\t\t}\n\t\t\treturn car;\n\t\t}", "@Override\r\n\tpublic Dog Clone() throws CloneNotSupportedException {\r\n\t\treturn new Poodle(this.getName(), this.getWeight(), this.getColor(), this.getGender(), this.getInfo()); \r\n\t}", "@Override\n\tpublic Object clone()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn new Molecule(((Molecule) super.clone()).getSequence());\n\t\t}\n\t\tcatch (CloneNotSupportedException e)\n\t\t{\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t}", "@Override \n public Door clone()\n {\n try\n {\n Door copy = (Door)super.clone();\n \n //a copy of the location class\n copy.room = room.clone(); \n \n return copy;\n }\n catch(CloneNotSupportedException e)\n {\n throw new InternalError();\n }\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "interface Person {\n Person clone();\n}", "public abstract Pessoa clone();", "public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "public Object clone() throws CloneNotSupportedException {\n // return INSTANCE\n throw new CloneNotSupportedException();\n }", "public final Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "public Restaurant clone() {\r\n return new Restaurant(this);\r\n }", "public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException(\"clone() is not supported in \"+this.getClass().getName());\n }", "public Object clone() {\n \ttry {\n \tMyClass1 result = (MyClass1) super.clone();\n \tresult.Some2Ob = (Some2)Some2Ob.clone(); ///IMPORTANT: Some2 clone method called for deep copy without calling this Some2.x will be = 12\n \t\n \treturn result;\n \t} catch (CloneNotSupportedException e) {\n \treturn null; \n \t}\n\t}", "@Override\n public Drop clone() {\n try {\n return (Drop) super.clone();\n } catch (CloneNotSupportedException ex) {\n // Never.\n return null;\n }\n }", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "Component deepClone();", "public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n // return super.clone(); // OR we can return the already present :: return getInstance();\n }", "public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}", "public Pizza clone(){\n\t\tPizza otherP = null;\n\t\ttry { \n\t\t\totherP = new Pizza(Size, Cheese, Ham, Pepperoni);\n\t\t} catch (IllegalPizza ite) {\n\t\t\t//shouldn't get here\n\t\t}\n\t\treturn otherP;\n\t}", "public Object clone()\n {\n Object o = null;\n try\n {\n o = super.clone();\n }\n catch (CloneNotSupportedException e)\n {\n e.printStackTrace();\n }\n return o;\n}", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "YangType<T> clone();", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }", "public Object clone() throws CloneNotSupportedException\n\t{\n\t\tthrow new CloneNotSupportedException();\n\t}", "public RMShape cloneDeep() { return clone(); }", "public Animal reproduce(final Cell location) {\n return new Herbivore(location);\n }", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "static <T> T clone(T in) throws IOException {\n\t\tByteArrayOutputStream bOut = new ByteArrayOutputStream();\n\t\tMap<Long, Object> smugglerCache = new HashMap<>();\n\t\ttry (ObjectOutputStream out = new LiveObjectOutputStream(bOut, smugglerCache)) {\n\t\t\tout.writeObject(in);\n\t\t}\n\t\ttry {\n\t\t\treturn (T) new LiveObjectInputStream(\n\t\t\t\t\tnew ByteArrayInputStream(bOut.toByteArray()),\n\t\t\t\t\tsmugglerCache)\n\t\t\t\t.readObject();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new AssertionError(\"We just serialized this object a minute ago. The class cannot be missing\", e);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n \tprivate <T extends Entity<T>> T _clone(Entity<T> obj) throws RaplaException {\n \t\tEntity<T> deepClone = ((Mementable<T>) obj).deepClone();\n \t\tT clone = deepClone.cast();\n \n \t\tRaplaType raplaType = clone.getRaplaType();\n \t\tif (raplaType == Appointment.TYPE) {\n \t\t\t// Hack for 1.6 compiler compatibility\n \t\t\tObject temp = clone;\n \t\t\t((AppointmentImpl) temp).removeParent();\n \t\t}\n \t\tif (raplaType == Category.TYPE) {\n \t\t\t// Hack for 1.6 compiler compatibility\n \t\t\tObject temp = clone;\n \t\t\t((CategoryImpl) temp).removeParent();\n \t\t}\n \n \t\tsetNew((RefEntity<T>) clone, this.workingUser);\n \t\treturn clone;\n \t}", "public abstract Piece clone();", "public abstract Piece clone();", "@Override\n public JokerVehicle clone(){\n return new JokerVehicle();\n }", "@Override\npublic Creature clone() {\n\treturn null;\n}", "public Object clone() throws CloneNotSupportedException{\n\t\tthrow (new CloneNotSupportedException());\n\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}", "public interface Prototype {\n\n Prototype clone();\n}", "public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}", "public Carta clone(){\n\t\treturn new Carta(palo, numero);\n\t}", "public Object clone()\n {\n Object o = null;\n try \n { o = super.clone(); } \n catch(CloneNotSupportedException e) \n { System.err.println(\"Erreur dans le clonage de la cellule...\"); }\n return o;\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "public abstract State clone();", "public dice clone()\r\n\t{\r\n\t\ttry {\r\n\t\t\treturn (dice) super.clone();\r\n\t\t} catch (CloneNotSupportedException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t}", "public abstract INodo copy();", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public abstract Instance duplicate();", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic <T> T clon(){\n\t\ttry {\n\t\t\treturn (T) this.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn (T) new Object();\n\t}", "public Object clone() {\n return new RelevantObjectsCommand(name, \n relevantStateVariables, \n relevantObjects,\n relevancyRelationship);\n }", "public Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public ChessPiece getClone(ChessOwner owner){\n\t\tChessPiece temp = new ChessPiece(pieceName, uniquePieceID, attackDirectionVectors,\n\t\t\t\tmovementDirectionVectors, specialMovementVectors, movementVectors,\n\t\t\t\tattackVectors, blackArtFile, whiteArtFile, NPCArtFile);\n\t\ttemp.setOwner(owner);\n\t\treturn temp;\n\t}", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public final Object clone() throws java.lang.CloneNotSupportedException {\n\t\tthrow new java.lang.CloneNotSupportedException();\n\t}", "@Override\n public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "public d clone() {\n ArrayList arrayList = this.e;\n int size = this.e.size();\n c[] cVarArr = new c[size];\n for (int i = 0; i < size; i++) {\n cVarArr[i] = ((c) arrayList.get(i)).clone();\n }\n return new d(cVarArr);\n }", "public CMObject copyOf();", "public Object clone() throws CloneNotSupportedException {\n Bond clone = (Bond) super.clone();\n // clone all the Atoms\n if (atoms != null) {\n clone.atoms = new IAtom[atoms.length];\n for (int f = 0; f < atoms.length; f++) {\n if (atoms[f] != null) {\n clone.atoms[f] = (IAtom) ((IAtom) atoms[f]).clone();\n }\n }\n }\n return clone;\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n /* Cannot happen */\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "public Animal getRandomAnimal() {\n //Randomize all characteristics of an animal\n int spc = (int) Math.round(rd.nextDouble() * (Animal.enumSpecies.values().length - 1));\n boolean isPet = rd.nextBoolean();\n\n //Construct an animal with random characteristic\n //Animal(int age, Gender g, BodyType b, enumSpecies espec, boolean ispet)\n A = new Animal(Animal.enumSpecies.values()[spc], isPet);\n return A;\n }", "@Override\r\n\tprotected A clone() throws CloneNotSupportedException {\r\n\t\tA clone = (A)super.clone();\r\n//\t\tclone.b = new B();\r\n\t\treturn clone;\r\n\t}", "public abstract B copy();", "public Object clone() throws CloneNotSupportedException {\n/* 354 */ SlidingCategoryDataset clone = (SlidingCategoryDataset)super.clone();\n/* 355 */ if (this.underlying instanceof PublicCloneable) {\n/* 356 */ PublicCloneable pc = (PublicCloneable)this.underlying;\n/* 357 */ clone.underlying = (CategoryDataset)pc.clone();\n/* */ } \n/* 359 */ return clone;\n/* */ }", "public MobileEntity getclone(MobileEntity ws){\n return ws.MakeCopy();\n }", "public Object clone() { return new ReferenceType((Name) name.clone()); }", "@Override\r\n\tprotected B clone() throws CloneNotSupportedException {\r\n\t\tB clone = (B)super.clone();\r\n//\t\tclone.a = new A();\r\n\t\treturn clone;\r\n\t}", "public MovableObject lightClone()\n\t\t{\n\t\t\tfinal MovableObject clone = new MovableObject();\n\t\t\tclone.assCount = this.assCount;\n\t\t\tclone.associatable = this.associatable;\n\t\t\tclone.bound = this.bound;\n\t\t\tclone.coords = new int[this.coords.length];\n\t\t\tfor(int i=0; i < this.coords.length; i++)\n\t\t\t\tclone.coords[i] = this.coords[i];\n\t\t\tclone.highlighted = this.highlighted;\n\t\t\tclone.hotSpotLabel = this.hotSpotLabel;\n\t\t\tclone.keyCode = this.keyCode;\n\t\t\tclone.label = this.label;\n\t\t\tclone.maxAssociations = this.maxAssociations;\n\t\t\tif(shape.equals(\"rect\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Rectangle(coords[0]-3,coords[1]-3,coords[2]+6,coords[3]+6);\n\t\t\t}\n\t\t\tif(shape.equals(\"circle\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[2]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"ellipse\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[3]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tfinal int xArr[] = new int[coords.length/2];\n\t\t\t\tfinal int yArr[] = new int[coords.length/2];\n\t\t\t\tint xCount = 0;\n\t\t\t\tint yCount = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i%2) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\txArr[xCount] = coords[i];\n\t\t\t\t\t\txCount++;\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\tyArr[yCount] = coords[i];\n\t\t\t\t\t\tyCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//TODO calculate the centre of mass\n\n\t\t\t\tclone.obj = new Polygon(xArr,yArr,xArr.length);\n\t\t\t}\n\t\t\tclone.pos = new Point(this.pos.x,this.pos.y);\n\t\t\tclone.shape = this.shape;\n\t\t\tclone.startPos = this.startPos;\n\t\t\tclone.value = this.value;\n\n\t\t\treturn clone;\n\t\t}", "public IStore<T> clone();", "@Override\n public MetaContainer clone() {\n return clone(false);\n }", "Prototype makeCopy();", "public static void main(String[] args) {\n\t\tCloneFactory factory = new CloneFactory();\n\t\t\n\t\tSheep billy = new Sheep();\n\t\t\n\t\tSheep clonedSheep = (Sheep) factory.getClone(billy);\n\t\t\n\t\tDog rufus = new Dog();\n\t\t\n\t\tDog clonedDog = (Dog) factory.getClone(rufus);\n\t\t\n\t\tSystem.out.println(clonedSheep + \"\\n\" + clonedDog);\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\n\t}" ]
[ "0.6853366", "0.684231", "0.6836891", "0.6828213", "0.6828213", "0.6798881", "0.6736078", "0.6736078", "0.6736078", "0.6736078", "0.63367826", "0.63196653", "0.6297866", "0.6273829", "0.6263014", "0.6259493", "0.6227726", "0.62203366", "0.6205956", "0.61776406", "0.61203724", "0.61171985", "0.6104944", "0.60958576", "0.6057685", "0.6050477", "0.60461164", "0.6026465", "0.6022465", "0.60156196", "0.5983296", "0.598033", "0.5976207", "0.59724075", "0.59665793", "0.5963606", "0.5963264", "0.59257317", "0.5913288", "0.5910027", "0.59078854", "0.5902967", "0.5895752", "0.5890447", "0.58719414", "0.58616966", "0.5846267", "0.5836499", "0.5835369", "0.5832858", "0.5824693", "0.581085", "0.5798244", "0.57906145", "0.5778449", "0.5768831", "0.5765231", "0.5765231", "0.57637745", "0.5753031", "0.5749626", "0.57487845", "0.5744293", "0.5737088", "0.57317954", "0.572434", "0.5723207", "0.57207644", "0.57110286", "0.57094353", "0.57002735", "0.5687233", "0.5687185", "0.5678957", "0.56755185", "0.56752264", "0.5660266", "0.56591207", "0.5657726", "0.56561136", "0.5652963", "0.5648217", "0.56339675", "0.56263447", "0.5616514", "0.561355", "0.5598295", "0.55931365", "0.5566628", "0.5563222", "0.5557958", "0.5549919", "0.5546997", "0.55432117", "0.5537996", "0.5535937", "0.5535871", "0.550015", "0.5493864", "0.5488674" ]
0.785819
0
The calling code must not call any methods after it called destroy().
public void destroy() { AwPacProcessorJni.get().destroyNative(mNativePacProcessor, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void destroy() {\n\t\t// Do nothing\n\t}", "@Override\r\n public void destroy() {\n }", "@Override\r\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\r\n\t\tpublic void destroy() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy()\r\n\t{\n\t\t\r\n\t}", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "@Override\n public void destroy() {\n }", "public void destroy() {}", "public void destroy() {}", "@Override\t\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\r\n\tpublic void destroy() {\n\t}", "public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n\tpublic void destroy() {\n\t}", "@Override\n public void destroy() {\n }", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n public void destroy() {\n\n }", "@Override\n public void destroy() {\n\n }", "@Override\n public void destroy() {\n\n }", "@Override\n public void destroy() {\n\n }", "@Override\n\tpublic void destroy(){\n\t\t\n\t}", "@Override\n public void destroy() {\n }" ]
[ "0.8051312", "0.80494815", "0.80494815", "0.8035055", "0.80272204", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.8014831", "0.80127394", "0.8008693", "0.8004845", "0.8004845", "0.8004845", "0.8004845", "0.8004845", "0.8000555", "0.8000555", "0.7982218", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.7975706", "0.797108", "0.79607433", "0.79489326", "0.79489326", "0.79489326", "0.79489326", "0.79489326", "0.79489326", "0.79489326", "0.79489326", "0.79489326", "0.7897646", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.7879953", "0.78791475", "0.7875636", "0.7875636", "0.7875636", "0.78681487", "0.7862533" ]
0.0
-1
Strategy to the current Amplience locale string. The Amplience locale string is a list of locales which Amplience will try to use in turn when resolving a resource. See the Amplience documentation for the format of the locale string.
public interface AmplienceLocaleStringStrategy { /** * Get the current Amplience locale string. * * @return The string that contains the Amplience locale string for the current context. */ String getCurrentLocaleString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "java.lang.String getLocale();", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "String getCurrentLocaleString();", "public interface LocaleContext {\n Locale getLocale();\n}", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "public void setPreferredLocale(Locale locale);", "public void setLocale (\r\n String strLocale) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getLocalizedString(Locale locale);", "public String getLocale ( ) {\n\t\treturn extract ( handle -> getLocale ( ) );\n\t}", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;", "@ZAttr(id=345)\n public String getLocaleAsString() {\n return getAttr(Provisioning.A_zimbraLocale, null);\n }", "private static Locale getUserPreferredLocale() {\n\t\tfinal ResourceLoader rl = new ResourceLoader();\n\t\treturn rl.getLocale();\n\t}", "String getLocalization();", "public static void resolveRestApiLocale() {\n\t\t((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest()\n\t\t\t\t.setAttribute(LocaleResolver.REST_API_LOCALE, CoreResources.getSystemLocale());\n\t\tresolveLocale();\n\t}", "public String locale() {\n return this.locale;\n }", "protected Locale resolveLocale()\n\t{\n\t\tLocale locale = getArchLocale();\n\t\tif (locale == null) {\n\t\t\tlocale = getFallbackLocale();\n\t\t}\n\t\tif (locale == null) {\n\t\t\t//Fallback to Spring locale\n\t\t\tlocale = LocaleContextHolder.getLocale();\n\t\t}\n\t\treturn locale;\n\t}", "Locale getDefaultLocale();", "Locale getDefaultLocale();", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "public Locale getLocale()\n/* */ {\n/* 487 */ return getULocale().toLocale();\n/* */ }", "public String getLocale()\n {\n return (m_taskVector == null || m_taskVector.size() == 0) ?\n DEFAULT_LOCALE :\n taskAt(0).getSourceLanguage();\n }", "private Locale getPreferredLocale() {\n return mActivity.getResources().getConfiguration().getLocales().get(0);\n }", "public String getLocale() {\n return this.locale;\n }", "ULocale getLocale() {\n\t\treturn locale;\n\t}", "public interface SupportedLocales {\n\n Locale getDefaultLocale();\n\n Collection<Locale> getSupportedLocales();\n\n SupportedLocales withLocale(Locale locale);\n\n SupportedLocales withLocaleParsingPolicy(LocalePolicy localeParsingPolicy);\n\n SupportedLocales withLocaleLookupPolicy(LocalePolicy localeLookupPolicy);\n\n Locale filterForParsing(Locale locale);\n\n Locale filterForLookup(Locale locale);\n\n LocalePolicy getLocaleParsingPolicy();\n\n LocalePolicy getLocaleLookupPolicy();\n}", "public void setFallbackLocale(Locale locale) { this.fallbackLocale = locale; }", "private void setLocale() {\n\t\tLocale locale = new Locale(this.getString(R.string.default_map_locale));\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config,\n getBaseContext().getResources().getDisplayMetrics());\n\t}", "public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }", "public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }", "@Override\n public void setLocale(Locale arg0) {\n\n }", "public static final void setLocaleFromPreferences(Context ctx) {\n String firstLocale = ctx.getResources().getConfiguration().locale.toString().substring(0, 2);\n String currentLocale = PreferenceManager.getDefaultSharedPreferences(ctx).getString(\"locale\", firstLocale);\n /**\n * Locale locale = new Locale((String) currentLocale); config.locale =\n * locale; Locale.setDefault(locale);\n */\n setLocale(ctx, currentLocale);\n }", "public void setLocale(Locale locale) {\n fLocale = locale;\n }", "@ApiModelProperty(value = \"The locale of the contained data\")\n public String getLocale() {\n return locale;\n }", "Language(Locale locale) {\n this.locale = locale;\n }", "public void testFindClosestAvailableLocale() {\n assertEquals(\"en\", findClosestAvailableLocale(\"en\"));\n assertEquals(\"en\", findClosestAvailableLocale(\"en_ZF\"));\n assertEquals(\"en_US\", findClosestAvailableLocale(\"en_US\"));\n }", "public static String getLanguage(final String rfcLocale) {\n return rfcLocale.toLowerCase(Locale.ENGLISH).substring(0, 2);\n }", "public Locale getLocale() { return this.locale; }", "public ULocale getLocale() {\r\n return this.locale;\r\n }", "@Bean\n\tpublic LocaleResolver localResolver(){\n\t\tSessionLocaleResolver slr = new SessionLocaleResolver();\n\t\tslr.setDefaultLocale(Locale.FRANCE);\n\t\treturn slr;\n\t}", "public static Locale getLocale() {\n return localeInfo.get();\n }", "public Locale getUserPreferedLanguage(HttpServletRequest request) {\n String lang = (String) request.getAttribute(EXPLICIT_LOCALE_KEY);\n if (lang != null && ! \"\".equals(lang)) {\n return request.getLocale();\n } else {\n return new Locale(lang);\n }\n }", "@Bean\n LocaleResolver localeResolver() {\n return new FixedLocaleResolver(Locale.ENGLISH);\n }", "@Override\n\tpublic void setLocale(Locale loc) {\n\t}", "public Locale getLocale()\n {\n return locale;\n }", "public String getUserLocale() {\n return sessionData.getUserLocale();\n }", "public void setLocale(Locale locale) {\n\n\t}", "public boolean enableLocaleOverride( ) {\n\t\ttry {\n\t\t\tURIBuilder builder = new URIBuilder( I18N_URL );\n\t\t\tbuilder.addParameter( \"locale\", \"en_US\" );\n\t\t\tHttpGet get = new HttpGet( builder.build( ).toURL( ).toString( ) );\n\t\t\tString result = EntityUtils.toString( this.httpClient( ).execute( get ).getEntity( ) ).trim( );\n\t\t\treturn result.contains(\"Succeeded\" );\n\t\t} catch( Exception e ) {\n\t\t\tthrow new FitbitExecutionException( e );\n\t\t}\n\t}", "@Override\n\t\tpublic Locale getLocale() {\n\t\t\treturn null;\n\t\t}", "public String changeLeguage(){\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tLocale miLocale = new Locale(\"en\",\"US\");\r\n\t\tcontext.getViewRoot().setLocale(miLocale);\r\n\t\treturn \"login\";\r\n\t}", "protected String getLocaleQueryParam() {\n return LocaleInfo.getLocaleQueryParam();\n }", "private void initLanguage() {\n try {\n Resources resources = getApplicationContext().getResources();\n DisplayMetrics displayMetrics = resources.getDisplayMetrics();\n Configuration configuration = resources.getConfiguration();\n Locale locale = new Locale(\"es\", \"ES\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n configuration.setLocale(locale);\n } else {\n //noinspection deprecation\n configuration.locale = locale;\n }\n resources.updateConfiguration(configuration, displayMetrics);\n } catch (Throwable throwable) {\n Log.d(TAG, \"Couldn't apply ES language.\", throwable);\n }\n }", "public void setLocale(String locale) {\n locale = fixLocale(locale);\n this.locale = locale;\n this.uLocale = new ULocale(locale);\n String lang = uLocale.getLanguage();\n if (locale.equals(\"fr_CA\") || lang.equals(\"en\")) {\n throw new RuntimeException(\"Skipping \" + locale);\n }\n cldrFile = cldrFactory.make(locale, false);\n UnicodeSet exemplars = cldrFile.getExemplarSet(\"\",WinningChoice.WINNING);\n usesLatin = exemplars != null && exemplars.containsSome(LATIN_SCRIPT);\n for (DataHandler dataHandler : dataHandlers) {\n dataHandler.reset(cldrFile);\n }\n }", "private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}", "protected Locale getArchLocale()\n\t{\n\t\tLocale locale = null;\n\t\ttry {\n\t\t\tfinal ContextoSesion sessionContext = ContextoLocator.getInstance().getContextoSesion();\n\t\t\tObject value, o = sessionContext.getCtxValue(ConstantesSesion.ARCH_LOCALE);\n\t\t\tif (o instanceof IDato) {\n\t\t\t\tvalue = ((IDato) o).getValor();\n\t\t\t} else {\n\t\t\t\tvalue = o;\n\t\t\t}\n\t\t\tif (value instanceof Locale) {\n\t\t\t\tlocale = (Locale) value;\n\t\t\t} else if (value instanceof String) {\n\t\t\t\tlocale = StringUtils.parseLocaleString((String)value);\n\t\t\t}\n\t\t} catch (PersistenciaException e) {\t}\n\t\treturn locale;\n\t}", "private Locale getLocale() {\n Locale selectedLocale = (Locale) Sessions.getCurrent().getAttribute(Attributes.PREFERRED_LOCALE);\n if (selectedLocale != null) {\n return selectedLocale;\n }\n Locale defaultLocale = ((HttpServletRequest) Executions.getCurrent().getNativeRequest()).getLocale();\n Sessions.getCurrent().setAttribute(org.zkoss.web.Attributes.PREFERRED_LOCALE, defaultLocale);\n return defaultLocale;\n }", "public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "protected Locale getLocale() {\n\t\treturn null;\n\t}", "public Locale getLocale() {\r\n return locale;\r\n }", "String toLocalizedPattern() {\n return toPattern(true);\n }", "public abstract String resolveText(Locale locale, String key, Serializable[] arguments);", "@Override\n public Locale getLocale() {\n return null;\n }", "private String getDefaultLocale() {\n return \"es-MX\";\n }", "public Locale getLocale () {\n return _locale;\n }", "public Locale getLocale(final String key) {\n return get(Locale.class, key);\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public void setLocale(Locale locale)\n {\n this.locale = locale;\n }", "@Bean\n public CookieLocaleResolver localeResolver() {\n CookieLocaleResolver localeResolver = new CookieLocaleResolver();\n Locale defautLocal = new Locale(defLang + \"_\" + defLocal);\n localeResolver.setDefaultLocale(defautLocal);\n return localeResolver;\n }", "public void attachBaseContext(Context context) {\n super.attachBaseContext(LocaleHelper.setLocale(context));\n }", "public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }", "public interface Locale {\n public String getStringById(int stringId);\n}", "public String getSimulationLocale() {\n return simSpec.getSimulationLocale();\n }", "public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }", "private void setLocale( String localeName )\r\n\t{\r\n\t\tConfiguration conf = getResources().getConfiguration();\r\n\t\tconf.locale = new Locale( localeName );\r\n\t\t\r\n\t\tsetCurrentLanguage( conf.locale.getLanguage() );\r\n\r\n\t\tDisplayMetrics metrics = new DisplayMetrics();\r\n\t\tgetWindowManager().getDefaultDisplay().getMetrics( metrics );\r\n\t\t\r\n\t\t// the next line just changes the application's locale. It changes this\r\n\t\t// globally and not just in the newly created resource\r\n\t\tResources res = new Resources( getAssets(), metrics, conf );\r\n\t\t// since we don't need the resource, just allow it to be garbage collected.\r\n\t\tres = null;\r\n\r\n\t\tLog.d( TAG, \"setLocale: locale set to \" + localeName );\r\n\t}", "public LocaleAieon( String name ) \r\n\t{\r\n\t\tsuper( name, S_LOCALE );\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "public interface Translator\n{\n Locale SWEDISH = Locale.forLanguageTag(\"sv\");\n\n List<Locale> supportedLanguages();\n Map<Locale, List<Locale>> supportedDirections();\n Translation translate(Translation message);\n String pageTranslationURL(String sourceURL, Translation message);\n}", "Locale getLocale(TransformerImpl transformer, int contextNode)\n throws TransformerException\n {\n\n Locale locale = null;\n\n if (null != m_lang_avt)\n {\n XPathContext xctxt = transformer.getXPathContext();\n String langValue = m_lang_avt.evaluate(xctxt, contextNode, this);\n\n if (null != langValue)\n {\n\n // Not really sure what to do about the country code, so I use the\n // default from the system.\n // TODO: fix xml:lang handling.\n locale = new Locale(langValue.toUpperCase(), \"\");\n\n //Locale.getDefault().getDisplayCountry());\n if (null == locale)\n {\n transformer.getMsgMgr().warn(this, null, xctxt.getDTM(contextNode).getNode(contextNode),\n XSLTErrorResources.WG_LOCALE_NOT_FOUND,\n new Object[]{ langValue }); //\"Warning: Could not find locale for xml:lang=\"+langValue);\n\n locale = Locale.getDefault();\n }\n }\n }\n else\n {\n locale = Locale.getDefault();\n }\n\n return locale;\n }", "public String getStringResource(LocaleResource resource){\n\t\tContext c = ConnectedApp.getContextStatic();\n\t\tswitch(resource){\t\t\n\t\tcase support_contact:\n default:\n\t\t\tint resId= c.getResources().getIdentifier(resource.toString()+\"_\"+ getCountryCode().toLowerCase(Locale.US), \"string\",\n\t\t\t\t\tc.getPackageName());\n\t\t\treturn c.getString(resId);\n\t\t}\n\t\t//return null;\n\t}", "public static String getUserLocale(final HttpServletRequest request) {\n String userLocaleStr = getUserLocale(request.getCookies());\n if (userLocaleStr == null && request.getLocale() != null) {\n userLocaleStr = request.getLocale().toString();\n }\n return userLocaleStr;\n }", "@Override\n\tpublic Locale getLocale() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Locale getLocale() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Locale getLocale() {\n\t\treturn null;\n\t}", "private Locale getBotLocale( HttpServletRequest request )\r\n {\r\n String strLanguage = request.getParameter( PARAMETER_LANGUAGE );\r\n\r\n if ( strLanguage != null )\r\n {\r\n return new Locale( strLanguage );\r\n }\r\n\r\n return LocaleService.getDefault( );\r\n }", "public void setLocales(List<Locale> locales);", "public String toLocalizedPattern() {\n\t\treturn translatePattern(pattern, DateFormatSymbols.patternChars, formatData.localPatternChars);\n\t}", "public String getLanguageValue(Locale locale) {\n\n\t\tString language = locale.getDisplayLanguage(this.locale);\n\t\t\n\t\tif(language.length() > 0) {\n\t\t\tlanguage = language.substring(0, 1).toUpperCase(this.locale) + language.substring(1);\n\t\t}\n\t\t\n\t\tString country = locale.getDisplayCountry(); \n\t\t\n\t\tif(country.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayCountry(this.locale); \n\t\t}\n\t\t\n\t\tString variant = locale.getDisplayVariant(); \n\n\t\tif(variant.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayVariant(this.locale); \n\t\t}\n\t\t\n\t\tif(locale == fallbackLocale) {\n\t\t\tlanguage = language + \" (fallback)\";\n\t\t}\n\t\t\n\t\treturn language;\n\t}", "public void setLocale(Locale locale) {\r\n this.locale = locale;\r\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public static String getLocale(Player player)\n {\n Object ep = null;\n try\n {\n ep = getMethod(\"getHandle\", player.getClass()).invoke(player, (Object[]) null);\n }\n catch (IllegalAccessException | IllegalArgumentException| InvocationTargetException e)\n {\n e.printStackTrace();\n }\n Field f = null;\n try\n {\n f = ep.getClass().getDeclaredField(\"locale\");\n }\n catch (NoSuchFieldException | SecurityException e)\n {\n e.printStackTrace();\n }\n f.setAccessible(true);\n String language = null;\n try\n {\n language = (String) f.get(ep);\n }\n catch (IllegalArgumentException | IllegalAccessException e)\n {\n e.printStackTrace();\n }\n return language;\n }", "public Locale getLocale() {\n return getULocale().toLocale();\n }", "public Locale getLocale () {\n\t\treturn locale;\n\t}", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "private static Locale getLocale(String strCode) {\n for (Locale locale : NumberFormat.getAvailableLocales()) {\n String code = NumberFormat.getCurrencyInstance(locale).getCurrency().getCurrencyCode();\n if (strCode.equals(code)) {\n return locale;\n }\n }\n return null;\n }" ]
[ "0.65554637", "0.63637966", "0.6293512", "0.6177255", "0.6093718", "0.6035126", "0.5996084", "0.59700525", "0.5946917", "0.5881669", "0.58634317", "0.570811", "0.56562364", "0.5649776", "0.5628237", "0.5627703", "0.55519366", "0.5547548", "0.5547548", "0.55445176", "0.5532099", "0.5486685", "0.54810417", "0.5473518", "0.5408841", "0.54043174", "0.5387527", "0.5377529", "0.5367455", "0.5367455", "0.53392607", "0.5334209", "0.5332004", "0.5293851", "0.5293568", "0.52812725", "0.52789736", "0.52555156", "0.5246", "0.5238816", "0.5234016", "0.52308774", "0.5228308", "0.52280796", "0.5218112", "0.5212026", "0.5209081", "0.5205902", "0.5205401", "0.5200474", "0.5199647", "0.5193396", "0.51878685", "0.5182565", "0.5175726", "0.5165234", "0.5157367", "0.5151066", "0.51464015", "0.5145594", "0.5139064", "0.51222056", "0.51216453", "0.5117872", "0.51105475", "0.5109448", "0.51037174", "0.5102123", "0.5102123", "0.5102123", "0.5096221", "0.5088353", "0.5084326", "0.50786895", "0.50673544", "0.50643104", "0.5064124", "0.50608456", "0.5058832", "0.5054797", "0.50480056", "0.5033623", "0.50288135", "0.50278693", "0.50227267", "0.50227267", "0.50227267", "0.5022702", "0.50169116", "0.5007619", "0.5006687", "0.5006676", "0.5006481", "0.5006481", "0.49936157", "0.49802357", "0.49720335", "0.49659026", "0.49659026", "0.49596837" ]
0.7818969
0
Get the current Amplience locale string.
String getCurrentLocaleString();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AmplienceLocaleStringStrategy\n{\n\t/**\n\t * Get the current Amplience locale string.\n\t *\n\t * @return The string that contains the Amplience locale string for the current context.\n\t */\n\tString getCurrentLocaleString();\n}", "java.lang.String getLocale();", "public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }", "public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }", "@ZAttr(id=345)\n public String getLocaleAsString() {\n return getAttr(Provisioning.A_zimbraLocale, null);\n }", "public String getLocale ( ) {\n\t\treturn extract ( handle -> getLocale ( ) );\n\t}", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "public String locale() {\n return this.locale;\n }", "String getLocalizedString(Locale locale);", "public String getUserLocale() {\n return sessionData.getUserLocale();\n }", "String getLocalization();", "public String getSimulationLocale() {\n return simSpec.getSimulationLocale();\n }", "protected String getCurrentLocaleName() {\n return LocaleInfo.getCurrentLocale().getLocaleName();\n }", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;", "public String getLocale()\n {\n return (m_taskVector == null || m_taskVector.size() == 0) ?\n DEFAULT_LOCALE :\n taskAt(0).getSourceLanguage();\n }", "public String toString() {\n\t\treturn toString(Locale.getDefault());\n\t}", "public String getCurrentLanguage() {\n return getStringData(Key.APP_CURRENT_LANGUAGE + \"\", \"zh\");\n }", "public String getLocale() {\n return this.locale;\n }", "public static Locale getLocale() {\n return localeInfo.get();\n }", "private static String getCurrentLanguageCode() {\n return Locale.getDefault().getLanguage();\n }", "public java.util.Locale getLocale() {\n MenuContainer parent = MenuComponent.this.getParent();\n if (parent instanceof Component)\n return ((Component)parent).getLocale();\n else\n return java.util.Locale.getDefault();\n }", "public static String getDefaultLocale()\n {\n return Locale.getDefault().toString();\n }", "public String getLocalString() {\r\n return localizedString;\r\n }", "public Locale getLocale()\n/* */ {\n/* 487 */ return getULocale().toLocale();\n/* */ }", "public Locale getLocale() {\n return getULocale().toLocale();\n }", "public String getLang() {\n return (String)getAttributeInternal(LANG);\n }", "public String getLangMeaning() {\n return (String) getAttributeInternal(LANGMEANING);\n }", "public String toDisplayString() {\n return toDisplayString(Locale.getDefault());\n }", "public static Locale get() {\n return STACK.peek();\n }", "com.google.protobuf.ByteString\n getLocaleBytes();", "@Override\n public String toString() {\n return toString(Locale.getDefault(), true);\n }", "public static String getKeyboardLocale()\n {\n final InputMethodManager imm = (InputMethodManager) MwmApplication.get().getSystemService(Context.INPUT_METHOD_SERVICE);\n if (imm != null)\n {\n final InputMethodSubtype ims = imm.getCurrentInputMethodSubtype();\n if (ims != null)\n return ims.getLocale();\n }\n\n return getDefaultLocale();\n }", "public String getGuiTranslationLanguageIso() {\n final FxLanguage lang = getUserTicket().getLanguage();\n return FxSharedUtils.isTranslatedLocale(lang.getIso2digit())\n ? lang.getIso2digit().toLowerCase()\n : \"en\";\n }", "private String getSystemLanguage() {\n String language;\n if (System.getProperty(COUNTRY) == null) {\n language = System.getProperty(LANGUAGE);\n } else {\n language = System.getProperty(LANGUAGE) + \"-\"\n + System.getProperty(COUNTRY).toLowerCase(Locale.ENGLISH);\n }\n return language;\n }", "public static String getAppLanguage() {\n return Locale.getDefault().getLanguage().toLowerCase().substring(0, 2);\n }", "public static String getCurrentLanguage() {\n\t\tif ( currentLanguage == null || currentLanguage.isEmpty() ) {\r\n\t\t\tcurrentLanguage = Locale.getDefault().getLanguage();\r\n\t\t}\r\n\t\treturn currentLanguage;\r\n\t}", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "public java.lang.String getAmpm() {\r\n return ampm;\r\n }", "public ULocale getLocale() {\r\n return this.locale;\r\n }", "String getLang();", "public String getShopperLocale() {\n return shopperLocale;\n }", "public String getLocalizedName() {\n return resourceMap.getString(getLocalizationKey());\n }", "public Locale getCurrentLocale() {\r\n\t\t// NOTE: should be written in some properties file\r\n\t\tLocale defaultLocale = getLocale();\r\n\t\tLocale locale = getUsersLocale();\r\n\t\t\r\n\t\tif (locale == null) {\r\n\t\t\treturn defaultLocale;\r\n\t\t}\r\n\t\treturn locale;\r\n\t}", "public String getFormatedLanguageCode() {\n String result = \"\";\n final String name = this.name();\n final String[] nameArray = name.split(\"_\");\n\n if (nameArray.length == 1) {\n result = nameArray[0].toLowerCase();\n } else if (nameArray.length == 2) {\n result = nameArray[0].toLowerCase() + \"-\" + nameArray[1].toUpperCase();\n }\n\n return result;\n }", "ULocale getLocale() {\n\t\treturn locale;\n\t}", "public String getPrimaryLanguage(){\n return sharedPreferences.getString(PRIMARY_LANGUAGE, \"LANG_NOT_FOUND\");\n }", "String getLanguage();", "String getLanguage();", "String getLanguage();", "public String getServerLocale(){\n return this.serverLocale;\n }", "public Locale getLocale () {\n return _locale;\n }", "protected Locale getCurrentLocale()\n\t{\n\t\tLocale locale = getArchLocale();\n\t\tif (locale == null) {\n\t\t\t//Fallback to Spring locale\n\t\t\tlocale = LocaleContextHolder.getLocale();\n\t\t}\n\t\treturn locale;\n\t}", "public Locale getLocale()\n {\n return locale;\n }", "public Locale getLocaleL() {\n\t\treturn panelVirtualKeyboard.getLocaleL();\n\t}", "public java.lang.String getLang()\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(LANG$28);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "protected Locale getArchLocale()\n\t{\n\t\tLocale locale = null;\n\t\ttry {\n\t\t\tfinal ContextoSesion sessionContext = ContextoLocator.getInstance().getContextoSesion();\n\t\t\tObject value, o = sessionContext.getCtxValue(ConstantesSesion.ARCH_LOCALE);\n\t\t\tif (o instanceof IDato) {\n\t\t\t\tvalue = ((IDato) o).getValor();\n\t\t\t} else {\n\t\t\t\tvalue = o;\n\t\t\t}\n\t\t\tif (value instanceof Locale) {\n\t\t\t\tlocale = (Locale) value;\n\t\t\t} else if (value instanceof String) {\n\t\t\t\tlocale = StringUtils.parseLocaleString((String)value);\n\t\t\t}\n\t\t} catch (PersistenciaException e) {\t}\n\t\treturn locale;\n\t}", "Locale getDefaultLocale();", "Locale getDefaultLocale();", "public String getAuthorizedLang() {\n return (String)getAttributeInternal(AUTHORIZEDLANG);\n }", "public String getAmplitud() {\r\n return amplitud;\r\n }", "@AutoEscape\n\tpublic String getLanguage();", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public String getLanguageValue(Locale locale) {\n\n\t\tString language = locale.getDisplayLanguage(this.locale);\n\t\t\n\t\tif(language.length() > 0) {\n\t\t\tlanguage = language.substring(0, 1).toUpperCase(this.locale) + language.substring(1);\n\t\t}\n\t\t\n\t\tString country = locale.getDisplayCountry(); \n\t\t\n\t\tif(country.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayCountry(this.locale); \n\t\t}\n\t\t\n\t\tString variant = locale.getDisplayVariant(); \n\n\t\tif(variant.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayVariant(this.locale); \n\t\t}\n\t\t\n\t\tif(locale == fallbackLocale) {\n\t\t\tlanguage = language + \" (fallback)\";\n\t\t}\n\t\t\n\t\treturn language;\n\t}", "public static String getUserLocale(final HttpServletRequest request) {\n String userLocaleStr = getUserLocale(request.getCookies());\n if (userLocaleStr == null && request.getLocale() != null) {\n userLocaleStr = request.getLocale().toString();\n }\n return userLocaleStr;\n }", "public final native String toLocaleString() /*-{\n return this.toLocaleString();\n }-*/;", "public Locale getLocale() { return this.locale; }", "public Locale getLocale() {\r\n return locale;\r\n }", "private Locale getPreferredLocale() {\n return mActivity.getResources().getConfiguration().getLocales().get(0);\n }", "public Locale getLocale() {\r\n return Locale.getDefault();\r\n }", "public static String getLocale(Player player)\n {\n Object ep = null;\n try\n {\n ep = getMethod(\"getHandle\", player.getClass()).invoke(player, (Object[]) null);\n }\n catch (IllegalAccessException | IllegalArgumentException| InvocationTargetException e)\n {\n e.printStackTrace();\n }\n Field f = null;\n try\n {\n f = ep.getClass().getDeclaredField(\"locale\");\n }\n catch (NoSuchFieldException | SecurityException e)\n {\n e.printStackTrace();\n }\n f.setAccessible(true);\n String language = null;\n try\n {\n language = (String) f.get(ep);\n }\n catch (IllegalArgumentException | IllegalAccessException e)\n {\n e.printStackTrace();\n }\n return language;\n }", "public Locale getLocale () {\n\t\treturn locale;\n\t}", "public static String getLanguage(final String rfcLocale) {\n return rfcLocale.toLowerCase(Locale.ENGLISH).substring(0, 2);\n }", "private static Locale getUserPreferredLocale() {\n\t\tfinal ResourceLoader rl = new ResourceLoader();\n\t\treturn rl.getLocale();\n\t}", "java.lang.String getLanguageCode();", "java.lang.String getLanguageCode();", "private Locale getLocale() {\n\t\treturn ((Component) getParent()).getLocale();\n\t}", "public interface LocaleContext {\n Locale getLocale();\n}", "public Locale getLocale() {\n\t\t\n\t\treturn locale;\n\t}", "public int getIdAnagrafeLocale() {\r\n return idAnagrafeLocale;\r\n }", "public String getLocalizedString( String name ) {\n\t\tString outString = \"\";\r\n\t\tint id = getResources().getIdentifier( name, \"string\", getPackageName() );\r\n\t\tif ( id == 0 )\r\n\t\t{\r\n\t\t\t// 0 is not a valid resource id\r\n\t\t\tLog.v(\"VrLocale\", name + \" is not a valid resource id!!\" );\r\n\t\t\treturn outString;\r\n\t\t} \r\n\t\tif ( id != 0 ) \r\n\t\t{\r\n\t\t\toutString = getResources().getText( id ).toString();\r\n\t\t\t//Log.v(\"VrLocale\", \"getLocalizedString resolved \" + name + \" to \" + outString);\r\n\t\t}\r\n\t\treturn outString;\r\n\t}", "String getLanguageCode();", "protected String getCurrentLocaleQueryParam() {\n return LocaleInfo.getCurrentLocale().getLocaleQueryParam();\n }", "public Locale getLocale() {\n return locale;\n }", "public AVT getLang()\n {\n return m_lang_avt;\n }", "public Locale getLocale() {\n\t\treturn Locale.US;\r\n\t}", "public java.lang.String getLanguage()\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(LANGUAGE$14);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public java.lang.String getLanguage()\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(LANGUAGE$14);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public java.lang.String getAUART() {\n return AUART;\n }", "protected String getLocaleQueryParam() {\n return LocaleInfo.getLocaleQueryParam();\n }", "public Locale getLocale() {\n/* 380 */ Locale locale = super.getLocale();\n/* 381 */ if (locale == null) {\n/* 382 */ return Locale.getDefault();\n/* */ }\n/* 384 */ return locale;\n/* */ }", "public java.lang.String getXmlLang()\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(XMLLANG$26);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public java.lang.String getCA() {\n return CA;\n }", "public String getLocalizedName() {\n\t\treturn this.name().toUpperCase();\n\t}", "public final String getLangAttribute() {\n return getAttributeValue(\"lang\");\n }", "public String getLanguage()\r\n\t{\r\n\t\treturn (String) queryParams.get(AUTH_LANGUAGE);\r\n\t}", "public Locale getLocale() {\n\t\treturn null;\n\t}" ]
[ "0.7454999", "0.6989749", "0.6849447", "0.6849447", "0.68484885", "0.6808048", "0.6581093", "0.65135866", "0.64711386", "0.63204557", "0.6287046", "0.6207329", "0.6200015", "0.61513203", "0.61475974", "0.6144941", "0.6086509", "0.6081781", "0.60738724", "0.60430616", "0.59862703", "0.596998", "0.59619117", "0.5895489", "0.5882456", "0.58691293", "0.585062", "0.58444524", "0.58305985", "0.5813437", "0.5800927", "0.5773853", "0.5759468", "0.5734232", "0.5726582", "0.5725405", "0.5717891", "0.57085896", "0.57085896", "0.5706918", "0.5703962", "0.56870496", "0.56733626", "0.565428", "0.5641965", "0.56346583", "0.561171", "0.56109494", "0.56069326", "0.56069326", "0.56069326", "0.5592059", "0.5577517", "0.5571942", "0.55714285", "0.5564448", "0.55625105", "0.5560545", "0.55415714", "0.55415714", "0.5531848", "0.5524386", "0.5520569", "0.5510765", "0.5510765", "0.5510765", "0.55082643", "0.55057174", "0.55032605", "0.55029196", "0.5500186", "0.54979295", "0.54906994", "0.54901135", "0.5489802", "0.54803985", "0.54672134", "0.5463648", "0.5463648", "0.54226136", "0.5418353", "0.5415784", "0.5414669", "0.5408098", "0.54061353", "0.5405415", "0.54008067", "0.53729093", "0.5369631", "0.53691643", "0.53691643", "0.5359342", "0.53484195", "0.5348291", "0.53317785", "0.5321647", "0.53099084", "0.53030413", "0.5299963", "0.52995163" ]
0.7566103
0
className:DepartmentDao discription: author:zn createTime:20190114 09:39
public interface DepartmentDao { /** * 部门列表查询 * @return */ @Select("select deptno,dname,loc from department") List<Map> getDeptList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface DeptDao {\n //动态查询\n @SelectProvider(type=DeptDynaSqlProvider.class,method = \"selectWithParam\")\n List<Dept> selectByPage(Map<String,Object> params);\n @SelectProvider(type=DeptDynaSqlProvider.class,method = \"count\")\n Integer count(Map<String,Object> params);\n @Select(\"select * from \"+DEPTTABLE+\" \")\n List<Dept> selectAllDept();\n @Select(\"select * from \"+DEPTTABLE+\" where id = #{id}\")\n Dept selectById(int id);\n @Delete(\"delete from \"+DEPTTABLE+\" where id = #{id}\")\n void deleteById(int id);\n //动态插入部门\n @InsertProvider(type=DeptDynaSqlProvider.class,method = \"insertDept\")\n void save(Dept dept);\n //动态修改部门\n @UpdateProvider(type=DeptDynaSqlProvider.class,method = \"updateDept\")\n void update(Dept dept);\n}", "public interface DepartmentDao extends BaseDao<Department,String> {\n\n List<Department> getDeptListByPage(Integer pageNumber, Integer pageSize,String name,String parentName);\n Integer getSize(String name,String parentName);\n}", "public interface DepartmentDAO {\n\n /**\n * This method is used to retrieve a list of all departments.\n *\n * @return List of generic type {@link Department}\n */\n public List<Department> getAllDepartments();\n\n /**\n * This method is used when adding a department.\n *\n * @param department of type {@link Department}\n */\n public void addDepartment(Department department);\n\n /**\n * This method is used to update the department table.\n *\n * @param department of type {@link Department}\n * @param newDeptName of type String *\n */\n public void updateDepartment(Department department, String newDeptName);\n\n /**\n * This method is used to delete departments by department number.\n *\n * @param dept_no of type integer\n */\n public void deleteDepartmentByDeptNo(int dept_no);\n\n /**\n * This method is use to delete departments by name.\n *\n * @param dept_name of type String\n */\n public void deleteDepartmentByDeptName(String dept_name);\n\n /**\n * This method is responsible for returning a department by dept_no.\n *\n * @param dept_no of type integer\n * @return ResultSet\n */\n public ResultSet getDepartmentByID(int dept_no);\n\n /**\n * This method is responsible for returning a department by dept_name\n *\n * @param dept_name of type String\n * @return ResultSet\n */\n public ResultSet getDepartmentByName(String dept_name);\n}", "public interface DeptDao {\n void insertDept(Dept dept);\n void deleteDept(String name);\n void updateDept(Dept dept);\n List<Dept> queryAllDepts();\n}", "public interface DeptDao {\n\n public Dept selectDept(int id);\n\n public List<Dept> queryAll(@Param(\"tableName\") String tableName);\n\n public void login(@Param(\"name\") String name,@Param(\"password\") String password);\n}", "public interface EmpDao {\n\n /**\n * 列出员工信息及部门信息\n * @return\n */\n List<Emp> listEmpsAndDept();\n\n /**\n * 根据部门名称查询员工信息(存储过程调用)\n * @param paramMap\n */\n void execProListEmpsByDeptName(Map paramMap);\n\n /**\n * 部门删除\n * @param deptNo\n * @return\n */\n int deleteById(int deptNo);\n}", "public interface ErpDao {\r\n //登录验证\r\n\tUsers logonValidateById(String username, String userpassword);\r\n\t //基础维护 里面的 部门维护\r\n\tPageBean<Department> departmentalManagement(Integer indexpage);\r\n\t //基础维护 里面的员工维护\r\n\tPageBean<Employee> employee(Integer indexpage);\r\n\t//基础维护里面 的角色维护\r\n\tPageBean<Role> roleSelectById(Integer indexpage);\r\n\t//基础维护 里面的 部门维护 里面的新建部门\r\n\tvoid addDept(Department deparment);\r\n\t //基础维护 里面的 部门维护 里面的修改 根据id查出\r\n Department diteDepa(int id);\r\n //基础维护 里面的 部门维护 里面的修改\r\n void ModifyById(Department deparment);\r\n //基础维护 里面的 部门维护 里面的删除\r\n void delect(Integer id);\r\n \r\n // //基础维护里面的员工维护里面的新增员工\r\n void newlyAdded(Employee emp);\r\n}", "public interface TEndProjectCommentDAO extends BaseDao<TEndProjectComment> {\n //获取一个教师可以评审的结题\n List<TEndProjectComment> findMyReviewEndPros(String teaCode, PageBean pageBean);\n\n int findMyReviewEndProsCount(String teaCode);\n\n List findByEndprojectcommentAdvise(Object endprojectcommentAdvise);\n\n List findByEndprojectcommentContent(Object endprojectcommentContent);\n\n List findByIsdeleted(Object isdeleted);\n}", "AuthorDao getAuthorDao();", "public interface CatalogDescriptionDao {\r\n\r\n public void init();\r\n\r\n /**\r\n * Return a catalog description based on the database id\r\n * \r\n * @param id - the database id of the catalog description\r\n * @return - the CatalogDescription\r\n */\r\n public CatalogDescription getCatalogDescription(Long id);\r\n \r\n /**\r\n * Return the active catalog description based on the course id\r\n * \r\n * @param id - the course id of the catalog description\r\n * @return - the last version of the CatalogDescription\r\n */\r\n public CatalogDescription getCatalogDescription(String course_id);\r\n\r\n /**\r\n * Return the last version of a catalog description based on the course id\r\n * \r\n * @param id - the course id of the catalog description\r\n * @return - the last version of the CatalogDescription (null if nothing is found)\r\n */\r\n public CatalogDescription getLastVersionCatalogDescription(String courseId);\r\n\r\n \r\n /**\r\n * Return active catalog descriptions that correspond to the given department\r\n * (can be null for all)\r\n * \r\n * @return - the list of CatalogDescription\r\n */\r\n public List<CatalogDescription> getCatalogDescriptionsByDepartment(String department);\r\n \r\n /**\r\n * Return active catalog descriptions that correspond to the given department with flag to indicate if we return or not inactive catalog descriptions \r\n */\r\n public List<CatalogDescription> getCatalogDescriptionsByDepartment(String department, boolean showInactives);\r\n \r\n \r\n /**\r\n * Return active catalog descriptions that correspond to the given academic career\r\n * (can be null for all)\r\n * \r\n * @return - the list of CatalogDescription\r\n */\r\n public List<CatalogDescription> getCatalogDescriptionsByCareer(String career);\r\n \r\n /**\r\n * Return active catalog descriptions that correspond to the given academic career with flag to indicate if we return or not inactive catalog descriptions\r\n */\r\n public List<CatalogDescription> getCatalogDescriptionsByCareer(String career, boolean showInactives);\r\n \r\n \r\n /**\r\n * Return all active catalog descriptions for certificates programs\r\n * (can be null for all)\r\n * \r\n * @return - the list of CatalogDescription\r\n */\r\n \r\n public List<CatalogDescription> getAllCatalogDescriptionsForCertificate();\r\n \r\n /**\r\n * Return all active catalog descriptions for certificates programs with flag to indicate if we return or not inactive catalog descriptions\r\n */\r\n \r\n public List<CatalogDescription> getAllCatalogDescriptionsForCertificate(boolean showInactives);\r\n \r\n \r\n /**\r\n * Return active catalog descriptions that correspond to the given criteria map\r\n * (can be null for all)\r\n * \r\n * @return - the list of CatalogDescription\r\n */\r\n public List<CatalogDescription> getCatalogDescriptions(Map<String, String> eqCriteria, Map<String, String> searchCriteria);\r\n\r\n /**\r\n * save the catalog description to the database\r\n * \r\n * @param cd - the catalog description to save\r\n * @throws StaleDataException\r\n * @throws DatabaseException\r\n */\r\n public void saveCatalogDescription(CatalogDescription cd)\r\n\t throws StaleDataException, DatabaseException;\r\n\r\n /**\r\n * Return a list of Course id (used by quartz job to determine if the catalog description is already created)\r\n * \r\n * @return - the list of Course id\r\n */\r\n public List<String> getListCourseId();\r\n \r\n \r\n /** \r\n * @return all active catlog descriptions\r\n */\r\n public List<CatalogDescription> getAllCatalogDescriptions();\r\n \r\n \r\n /**\r\n * Set all catalog description to \"inactive\" status\r\n * \r\n */\r\n public void setCatalogDescriptionToInactive();\r\n \r\n /**\r\n * Get catalog description from department that have no description and which are not certificate courses\r\n * \r\n */\r\n public List<CatalogDescription> getCatalogDescriptionsByDepartmentWithNoDescription(String department);\r\n \r\n \r\n /**\r\n * Get catalog description for certificates courses that have no description\r\n * \r\n */\r\n public List<CatalogDescription> getAllCatalogDescriptionsForCertificatesWithNoDescription();\r\n \r\n /**\r\n * Get all departments that have at least one catalog description with an empty description\r\n * \r\n */\r\n public List<String> getDepartmentNameWithAtLeastOneCaWithNoDescription();\r\n \r\n \r\n /**\r\n * return whether or not the specified Catalog Description exists.\r\n * \r\n * @param course_id - the course_id of the catalog description\r\n * @return true if the catalog description exists, false otherwise\r\n */\r\n public boolean descriptionExists(String course_id);\r\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "D getDao();", "public interface JobtitleDao {\n\n int addJobtitle(Jobtitle jobtitle);\n int addJobtitleIfNotExists(Jobtitle jobtitle);\n boolean isJobtitleExists(String jobtitleName);\n int[] addListOfJobtitle(List<Jobtitle> jobtitleList);\n Jobtitle findJobtitleByName(String jobtitleName);\n Jobtitle findJobtitleById(long id);\n List<Jobtitle> findAllJobtitles();\n int deleteJobtitleByJobtitleName(String jobtitleName);\n long findJobtitleIdByJobtitleName(String jobtitleName);\n void deleteAllJobtitles();\n\n}", "UserInfoDao getUserInfoDao();", "public DescritoresDAO() {\n\t\t\n\t}", "public DepartmentsDaoImpl() {\n\t\tsuper();\n\t}", "public interface ExampleDao {\r\n\r\n /**\r\n * 列出所有测\r\n * @return\r\n */\r\n public List<Example> findExamples() ;\r\n\r\n /**\r\n * 取得总记录数\r\n * @return 记录数量\r\n */\r\n int getExamplesCount();\r\n\r\n /**\r\n * 取得总记录数\r\n * @return 记录数量\r\n */\r\n int getExamplesCount(Query query);\r\n\r\n int getExamplesCount1(TimeQuery query);\r\n\r\n /**\r\n * 取得相关的记录数\r\n * @param query 查询参数\r\n * @return 相关记录\r\n */\r\n List<Example> findExamplesPage(Query query);\r\n\r\n List<Example>findExamplesPage1(TimeQuery query);\r\n\r\n /**\r\n * 创建对象\r\n * @param example\r\n */\r\n void createExample(Example example);\r\n\r\n List<Example> findExamplesByTime(String startDate,String endDate);\r\n\r\n\r\n List<Example> findExamplesByTime1(TimeQuery query);\r\n}", "BookDao getBookDao();", "public interface TitleDao {\n boolean isExist(String title);\n boolean addTitle(int id,String title);\n boolean deleteTitle(String title);\n}", "public interface ContentUpgradeDao extends EntityObjectDao{\r\n\t/**\r\n\t * 新建时检测是否名字重复\r\n\t * @param name\r\n\t * @return\r\n\t */\r\n\tboolean obtainNameExists(String name);\r\n\t\r\n\t/**\r\n\t * 更新时检测是否有重复\r\n\t * @param name\r\n\t * @param uuid\r\n\t * @return\r\n\t */\r\n\tboolean obtainNameExists(String name, String uuid);\r\n\r\n\t/**\r\n\t * 获取指定关键词和分页信息的内容升级列表\r\n\t * @param keyword 查找的关键词\r\n\t * @param startPosition 起始位置\r\n\t * @param size 获取大小\r\n\t * @return\r\n\t */\r\n\tList<ContentUpgrade> loadContentUpgrades(String keyword, int startPosition, int size);\r\n\t\r\n\t/**\r\n\t * 获取指定关键词的数量\r\n\t * @param keyword 指定关键词\r\n\t * @return\r\n\t */\r\n\tint loadAmount(String keyword);\r\n\t\r\n\t\r\n\tList<ContentUpgrade> loadAllContentUpgrades();\r\n}", "public interface LeadersDao {\r\n\r\n @Select(\"select * from leaders where dept_id=#{deptId}\")\r\n List<Leaders> selectLeadersByDept(@Param(\"deptId\") Integer dept_id);\r\n \r\n @Select(\"select * from leaders where lid=#{lid}\")\r\n Leaders selectLeadersByid(@Param(\"lid\") Integer lid);\r\n\r\n @Insert(\"INSERT INTO leaders (lid,dept_id) \" +\r\n \" VALUES (#{lid},#{deptId})\")\r\n int insertLeader(@Param(\"lid\")Integer lid, @Param(\"deptId\")Integer dept_id);\r\n\r\n @Delete(\"delete from leaders where lid = #{lid}\")\r\n int deleteLeader(Integer lid);\r\n}", "public abstract ToDoDao toDoDao();", "public interface BookDao {\n //////////////////////小试牛刀///////////////////\n //加载所有图书信息\n public List<Book> bookList()throws Exception;\n //按ID查询图书信息\n public Book byIdSelect(int id) throws IOException;\n //添加图书\n public int Add(Book book) throws IOException;\n //删除图书\n public int Del(int id)throws IOException;\n //修改图书\n public int Up(Book book)throws Exception;\n //模糊查询 显示图书信息 (单条件)\n public List<Book> LikeBookInfo(@Param(\"bookname\") String name)throws Exception;\n //多条件查询 显示图书信息\n public List<Book> ByNeedSelect( Book book)throws Exception;\n //多条件查询2\n public List<Book> LikeBookName(Map<String,Object> map)throws Exception;\n //查询图书的分类和作者 在Book实体类中加上分类名称属性- private String catename;\n public List<Book> SelectBookTypeAndAuthor()throws Exception;\n //按图书ID查询图书的分类和作者 重复练习加强记忆\n public Book ByIdSelectBookTypeAndAuthor(@Param(\"bookid\") int id)throws Exception;\n //按图书类型ID获取该类型图书信息\n public List<Book> ByTypeIdGetBookInfo(@Param(\"bookcategory\")int id)throws Exception;\n //按图书类型ID获取该类型图书信息2\n public List<Book> ByTypeIdGetBookInfo2(@Param(\"bookcategory\")int id)throws Exception;\n //智能标签if\n public List<Book> BookListByIf(Book book)throws Exception;\n //智能标签choose\n public List<Book> BookListChoose(int[] ints)throws Exception;\n //智能标签List\n public List<Book> BookListList(List<Book> list)throws Exception;\n\n\n\n\n\n\n}", "public interface BookDao {\n //查询所有\n List findAll();\n // 分类查询\n List findOne(String cid);\n\n // 查询书的详细信息\n Book findOnlyOne(String cid);\n\n // 加载图书\n Book load(String bid);\n\n // 添加图书\n void add(Book book);\n\n // 删除图书\n void del(String bid);\n // 编辑图书\n void edit(Book book);\n\n\n}", "public interface IndentDao extends BaseDao<Indent,Integer>{\n\n /**\n * 通过订单关联查询到买家信息\n */\n void queryBuyerByIndentNO();\n}", "public interface HelloDao {\n\n String getName();\n\n void InsertAdCustomRelation(AdGroupSum adGroupSum);\n\n}", "public interface AdDao extends GenericDao<Ad, Long> {\n\n\t/**\n\t * Retourne toutes les publicité éligible\n\t * @param date\n\t * @return\n\t * @throws Exception\n\t */\n\tList<Ad> getAll(Date date)throws Exception;\n\n \n}", "public interface HelloDao {\n\tpublic void insertHello(Hello h);\n\tpublic Hello selectHello(String helloId);\n\tpublic List<Hello> selectHelloList(String dateMMDDYYYY);\n}", "public interface CompanyDao {\n /**\n * 根据主键ID获取企业信息\n *\n * @param id\n * @return\n */\n Company getById(Long id);\n\n /**\n * 根据会员ID获取企业信息\n *\n * @param memberId\n * @return\n */\n Company getByMemberId(Long memberId);\n \n /**\n * 根据企业名字查询\n *\n * @param company\n * @return\n */\n public Company getByName(String name);\n /**\n * 查询数量\n * @param name\n * @return\n */\n public int getCountByName(@Param(\"name\")String name,@Param(\"statuss\")int statuss[]);\n /**\n * 保存\n * @param company\n */\n public void save(Company company);\n /**\n * 更新\n * @param company\n */\n public void update(Company company);\n}", "public interface TermDao {\n /**\n * 根据学校编号查询\n * @param universityId 学校编号\n * @return\n */\n public List<Term> queryByUniversity(@Param(\"universityId\")int universityId);\n}", "public interface PersonDao {\n boolean insertPerson(PersonDo personDo); //添加\n PersonDo queryPersonByName(String name); //添加\n// public boolean deleteById(int id); //删除\n// public boolean updatePerson(PersonDo personDo); //修改\n// public PersonDo queryById(int id); //根据ID查询\n List<PersonDo> queryPersonList(PersonDo personDo); //查询全部\n}", "public static List getAlumniByDept(String department)\n { \n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"from Alumni_data where department=:department\").setString(\"department\", department).list();\n session.close();\n return li;\n }", "public interface DemoDao {\r\n /**\r\n * 保存用户\r\n * @param user\r\n * @throws Exception\r\n */\r\n void insert(DemoUser user)throws Exception;\r\n\r\n /**\r\n * 根据用户Id查询用户信息\r\n * @param userId\r\n * @return\r\n * @throws Exception\r\n */\r\n DemoUser selectById(Integer userId)throws Exception;\r\n\r\n /**\r\n * 更新用户信息\r\n * @param demoUser\r\n * @throws Exception\r\n */\r\n void updateById(DemoUser demoUser)throws Exception;\r\n\r\n\r\n /**\r\n * 根据Id删除用户信息\r\n * @param userId\r\n * @throws Exception\r\n */\r\n void deleteById(Integer userId)throws Exception;\r\n\r\n /**\r\n * 根据用户信息查询用户列表\r\n * 可以传一个对象,或是多个参数\r\n * @param userName\r\n * @param age\r\n * @return\r\n * @throws Exception\r\n */\r\n List<DemoUser> selectList(@Param(\"userName\")String userName, @Param(\"age\")Integer age)throws Exception;\r\n}", "public interface AirWaybillDangerousDetailDao {\r\n \r\n public int count() throws DaoException;\r\n\r\n public int deleteById(Integer id) throws DaoException;\r\n\r\n public int insert(AirWaybillDangerousDetail airWaybillDangerousDetail) throws DaoException;\r\n\r\n public AirWaybillDangerousDetail findById(Integer id) throws DaoException;\r\n\t\r\n\tpublic int update(AirWaybillDangerousDetail airWaybillDangerousDetail) throws DaoException;\r\n\t\r\n\tpublic int countByAirWaybillDangerousDetailExample(AirWaybillDangerousDetailExample airWaybillDangerousDetailExample) throws DaoException;\r\n\t\r\n\tpublic AirWaybillDangerousDetail findByAirWaybillDangerousDetailExample(AirWaybillDangerousDetailExample airWaybillDangerousDetailExample) throws DaoException;\r\n\t\r\n public List<AirWaybillDangerousDetail> findAllByAirWaybillDangerousDetailExample(AirWaybillDangerousDetailExample airWaybillDangerousDetailExample) throws DaoException;\r\n \r\n public List<AirWaybillDangerousDetail> findAllByAirWaybillDangerousDetailExample(AirWaybillDangerousDetailExample airWaybillDangerousDetailExample, int limit) throws DaoException;\r\n \r\n public List<AirWaybillDangerousDetail> findAllByAirWaybillDangerousDetailExample(AirWaybillDangerousDetailExample airWaybillDangerousDetailExample, int offset, int limit) throws DaoException;\r\n}", "public interface IIndentDao {\n\n public boolean add(Indent indent);\n //增加商品订单\n\n public boolean delete(Indent indent);\n //删除订单\n\n public boolean deleteFromId(String indent_id);\n //根据订单id删除订单\n\n public Indent findFromIndent_id(String indent_id) throws SQLException;\n //跟据订单id查找商品\n\n public List<Indent> findFromBuyer_id(String buyer_id) throws SQLException;\n //跟据购买者id,查找其所有订单\n\n public List<Indent> findAllIndent() throws SQLException;\n //查询所有订单\n\n public List<Indent> findFromAfterOneday(Timestamp time) throws SQLException;\n //查找某一天以前定下的所有订单\n\n public List<Indent> findFromStatus(int status) throws SQLException;\n //查找已结清或未结清的订单0未结清,1已结清\n\n public List<Indent> findFromDeadline(Timestamp time) throws SQLException;\n //查找某一截至日期的订单\n \n public boolean changeStatus(String indent_id,int status);\n //跟据订单id,把某一订单结算情况变\n\n //根据订单id,改变订单结算方式\n public boolean changeMethod(String indent_id,String method);\n}", "public interface SDeptDao extends BaseMapper<SDept> {\n\t\n}", "public interface EepHeadLoadDAO extends DAO<EepHeadLoad> {\r\n\t/**\r\n\t * Sletter alle linjer tilhørende gitt hode\r\n\t * \r\n\t * @param head\r\n\t */\r\n\tvoid deleteImportFile(EepHeadLoad head);\r\n\r\n\t/**\r\n\t * Finner alle for gitt sekvensnummer\r\n\t * \r\n\t * @param nr\r\n\t * @return alle for gitt sekvensnummer\r\n\t */\r\n\tEepHeadLoad findBySequenceNumber(Integer nr);\r\n}", "public interface BeeDataDao {\n\n /*获取兼职数据*/\n BeeJobTime getBeeJobTime();\n\n /*分页获取兼职数据*/\n BeeJobTime getBeeJobTimes(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工数据*/\n BeeSummerJob getBeeSummerJob();\n\n /*分页获取暑期工数据*/\n BeeSummerJob getBeeSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*根据JID获取兼职详细信息*/\n BeeJobTimeDetailed getBeeJobTimeDetailed(int jid);\n\n /*根据SID获取兼职详细信息*/\n BeeSummerJobDetailed getSummerJobDetailed(int sid);\n\n /*分页获取兼职报名信息*/\n UserMessageList getSignUpJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取兼职报名List*/\n UserMessageList getSignUpJobFair();\n\n /*根据phone查询兼职报名人员*/\n UserMessageList selectJobFairUser(String phone);\n\n /*兼职报名*/\n void putSignUpJobFair(@Param(\"userMessage\") UserMessage userMessage);\n\n /*根据UserId查询报名人员*/\n String selectSignUpJobFairByUserId(int UserId);\n\n /*插入amount*/\n void insertAmount(@Param(\"amount\") String amount,@Param(\"jobNames\") String jobNames,@Param(\"userId\") int userId);\n\n /*暑期工报名*/\n void putSignUpSummerJob(@Param(\"userMessage\") UserMessage userMessage);\n\n /*暑期工发布*/\n void publishSummerJob(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*兼职发布*/\n void publishJobFair(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*分页获取暑期工报名信息*/\n UserMessageList getSignUpSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工报名List*/\n UserMessageList getSignUpSummerJob();\n\n BeeSummerJobDetailedList AuditingJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeSummerJobDetailedList AuditingJobFair();\n\n BeeSummerJobDetailedList AuditingSummerJob();\n\n BeeSummerJobDetailedList AuditingSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n String selectSignUpJobFairByJIDS(int userId);\n\n UserMessageList selectSummerJobUser(String phone);\n\n String selectSignUpSummerJobByJIDS(int userId);\n\n String selectSignUpSummerJobByUserId(int userId);\n\n void insertAmount1(String jids, String jobNameS, int userId);\n\n int getSid(int id);\n\n int getJid(int id);\n\n void putOpenId(@Param(\"openId\") Object openId,@Param(\"targetId\") int targetId);\n\n BeeJobTime getAuditingBeeJobTimeByOpenId(String openId);\n\n BeeJobTime getAuditingBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimeByOpenId(String openId);\n\n int selectIsGet(int i);\n\n UserMessageList getSignUpJobFairsByJid();\n\n UserMessageList getSignUpJobFairByJid(@Param(\"jid\") String jid,@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n int selectargetId(String openId);\n\n BeeJobTimeDetailed getAuditingBeeJobTimeDetailed(int jid);\n\n int selectOpenId(Object openId);\n\n Object selectOpenIds(Object openId);\n\n List<Integer> getJidByOpenId(String openId);\n\n void getJobTimeUserByJid(List<Integer> jid);\n\n String getJidsByOpenId(String openId);\n\n BeeJobTime getJobTimeByOpenId(@Param(\"jidS\") List<String> jidS);\n\n BeeJobTime getBeeJobTimesByOpenIds(int startIndex, int endAmount);\n\n String getJidsByJid(int i);\n\n String[] getJids();\n}", "public interface ProgramaTVDAO {\n\t/**\n\t * Crea una nueva monitorización\n\t * @param titulo Título del programa\n\t * @param episodeCode Código del Episodio (ej. T01E03)\n\t * @param fechaInicio Fecha y hora de Inicio\n\t * @param fechaFin Fecha y hora de Fin\n\t * @param hashtag Hashtag que se monitorizará\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV crearMonitorizacion(String titulo, String episodeCode, Date fechaInicio, Date fechaFin, String hashtag);\n\n\t/**\n\t * Monitorización por clave primaria\n\t * @param primaryKey Clave primaria\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV programaPorId(Long primaryKey);\n\t\n\t/**\n\t * Todas las monitorizaciones que llevan el mismo hashtag\n\t * @param hashtag Hashtag\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> ProgramasPorHashtag(String hashtag);\n\t\n\t/**\n\t * Lista de monitorizaciones del mismo programa\n\t * @param titulo Título del programa\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> programasPorTitulo(String titulo);\n\t\n\t /**\n\t * Todas las monitorizaciones\n\t * @return Lists de todos los objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> todosLosProgramas();\n\t\n\t/**\n\t * Top 5 programas más vistos\n\t * @return Array ordenado de los 5 programas más vistos\n\t */\n\tpublic ProgramaTV[] programasTop5();\n\n\t/**\n\t * Actualiza monitorizacion\n\t * @param prog Objeto ProgramaTV\n\t */\n\tpublic void updateProgramaTV(ProgramaTV prog);\n\n\n\t/**\n\t * Borra una monitorización\n\t * @param prog Clave primaria de la monitorización\n\t */\n\tpublic void deleteProgramaTV(Long prog);\n\t\n\t/**\n\t * Borra todos los programas\n\t */\n\tpublic void deleteAll();\n\t\n\n\t\n\n\t}", "public interface ReadDao {\n\n /**\n * 根据手机号码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone}\")\n UserModel getUserByPhone(@Param(\"phone\") String phone);\n\n /**\n * 根据用户名密码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone} and passwd=substr(md5(#{pwd}),9,8)\")\n UserModel getUserByPassword(@Param(\"phone\") String phone, @Param(\"pwd\") String pwd);\n\n /**\n * 根据商品名查询商品\n *\n * @return\n */\n @Select(\"select id goodsid,name,price from t_goods where name like #{name}\")\n List<Commodity> queryCommodity(@Param(\"name\") String name);\n\n /**\n * 根据关键字查询\n *\n * @param keyword\n * @param size\n * @return\n */\n @Select(\"select * from t_goods where name like #{keyword} limit 0,#{size}\")\n public List<Commodity> getCommodityByKeyword(@Param(\"keyword\") String keyword, @Param(\"size\") int size);\n\n\n /**\n * 根据ID获取商品\n *\n * @param id\n * @return\n */\n @Select(\"select * from t_goods where id=#{id}\")\n public Commodity getCommodityById(@Param(\"id\") long id);\n\n /**\n * 查询所有商品类别\n * @return\n */\n @Select(\"select id,category1,category2 from t_goods_category\")\n public List<CommodityCategory> queryCategorys();\n\n /**\n * 查询所有商品\n * @return\n */\n @Select(\"select * from t_goods\")\n public List<Commodity> queryAllCommodityes();\n\n\n /**\n * 根据父级名称获取子级名称\n *\n * @param name\n * @return\n */\n @Select(\"select * from t_goods_category where category1=#{name}\")\n public List<CommodityCategory> getCommodityCategoryByParentName(@Param(\"name\") String name);\n\n /**\n * 获取一级分类名称\n *\n * @return\n */\n @Select(\"select DISTINCT(category1) as category1 from t_goods_category\")\n public List<CommodityCategory> getParentCommodityCateory();\n}", "public interface TaskDefineDao {\n List findAll(String domainId);\n\n int add(TaskDefineModel m);\n\n String delete(List<TaskDefineModel> m);\n\n int update(TaskDefineModel m);\n}", "public interface RightInfoDAO extends BaseDAO {\n /** The name of the DAO */\n public static final String NAME = \"RightInfoDAO\";\n\n\t/**\n\t * Insert one <tt>RightInfoDTO</tt> object to DB table <tt>azdai_right_info</tt>, return primary key\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>insert into azdai_right_info(code,title,memo,gmt_create,gmt_modify) values (?, ?, ?, ?, ?)</tt>\n\t *\n\t *\t@param rightInfo\n\t *\t@return String\n\t *\t@throws DataAccessException\n\t */\t \n public String insert(RightInfoDTO rightInfo) throws DataAccessException;\n\n\t/**\n\t * Update DB table <tt>azdai_right_info</tt>.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>update azdai_right_info set title=?, memo=?, gmt_modify='NOW' where (code = ?)</tt>\n\t *\n\t *\t@param rightInfo\n\t *\t@return int\n\t *\t@throws DataAccessException\n\t */\t \n public int update(RightInfoDTO rightInfo) throws DataAccessException;\n\n\t/**\n\t * Query DB table <tt>azdai_right_info</tt> for records.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>select * from azdai_right_info where (code = ?)</tt>\n\t *\n\t *\t@param code\n\t *\t@return RightInfoDTO\n\t *\t@throws DataAccessException\n\t */\t \n public RightInfoDTO find(String code) throws DataAccessException;\n\n\t/**\n\t * Query DB table <tt>azdai_right_info</tt> for records.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>select * from azdai_right_info order by code ASC</tt>\n\t *\n\t *\t@return List<RightInfoDTO>\n\t *\t@throws DataAccessException\n\t */\t \n public List<RightInfoDTO> findAll() throws DataAccessException;\n\n\t/**\n\t * Query DB table <tt>azdai_right_info</tt> for records.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>select * from azdai_right_info order by code ASC</tt>\n\t *\n\t *\t@param userNo\n\t *\t@return List<RightInfoDTO>\n\t *\t@throws DataAccessException\n\t */\t \n public List<RightInfoDTO> findUserRights(String userNo) throws DataAccessException;\n\n\t/**\n\t * Delete records from DB table <tt>azdai_right_info</tt>.\n\t *\n\t * <p>\n\t * The sql statement for this operation is <br>\n\t * <tt>delete from azdai_right_info where (code = ?)</tt>\n\t *\n\t *\t@param code\n\t *\t@return int\n\t *\t@throws DataAccessException\n\t */\t \n public int delete(String code) throws DataAccessException;\n\n}", "@AutoDao\npublic interface CalendarDao {\n\n List<CalendarMessage.Calendar> findCalendarList(String startTime, String endTime, String keyword, Long calCategoryId, Integer priority);\n}", "public interface IProvinceLoginByDayDao {\n /**\n * 根据省份后期多日登录数据\n * @param province\n * @param beginDate\n * @param endDate\n * @return\n */\n ArrayList<AreaLoginByDayPo> findByProvince(String province,int beginDate,int endDate);\n}", "public interface StuDao {\n\n boolean addStu(TbStu stu); //增加学生\n\n boolean deleteStu(TbStu stu); //删除学生\n\n boolean updateStu(TbStu stu); //修改学生\n\n TbStu findStuById(int id); //根据id查询学生\n\n List findStuList();// 查询学生信息\n\n\n}", "public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }", "public interface DVDCategorieDAO {\n /**\n * This is the method to be used to initialize\n * database resources ie. connection.\n */\n public void setDataSource(DataSource ds);\n\n /**\n * This is the method to be used to create\n * a record in the Graduate table.\n */\n public void create(int id, DVD dvd, Categorie categorie);\n\n /**\n * This is the method to be used to list down\n * a record from the Graduate table corresponding\n * to a passed graduate id.\n */\n public DVDCategorie getDVDCategorie(int id);\n\n /**\n * This is the method to be used to list down\n * all the records from the Graduate table.\n */\n public List<DVDCategorie> listDVDCategorie();\n\n /**\n * This is the method to be used to delete\n * a record from the Graduate table corresponding\n * to a passed graduate id.\n */\n public void delete(Integer id);\n\n /**\n * This is the method to be used to update\n * a record into the Graduate table.\n */\n public void update(Integer id, DVD dvd, Categorie categorie);\n}", "public interface DomainDao extends GenericDao<Domain, Integer> {\r\n\t/**\r\n\t * \r\n\t * @param unitName\r\n\t * @return Returns a domain by unit name\r\n\t * @throws Exception\r\n\t */\r\n\tpublic Domain getDomainByUnitName(String unitName) throws Exception;\r\n\r\n\t/**\r\n\t * \r\n\t * @param domainName\r\n\t * @return Returns a domain by name\r\n\t * @throws Exception\r\n\t */\r\n\tpublic Domain getDomainByName(String domainName) throws Exception;\r\n\r\n\t/**\r\n\t * \r\n\t * @param domainName\r\n\t * @return Returns the admin login of the domain\r\n\t * @throws Exception\r\n\t */\r\n\tpublic Login getGoogleDomainAdminLogin(String domainName) throws Exception;\r\n\r\n\t/**\r\n\t * \r\n\t * @param domainName\r\n\t * @return Returns all domains by name\r\n\t * @throws Exception\r\n\t */\r\n\tpublic List<Domain> getAllByDomainName(String domainName) throws Exception;\r\n}", "public interface LabDao {\n\n List<Lab> findAll();\n\n Lab findById(long id);\n\n void insert(LabDto labDto);\n\n void update(LabDto labDto, long id);\n\n void delete(long id);\n\n}", "public interface CategoryDao {\n\n /**\n * Method adds category to database\n * @param category\n */\n void addCategory(Category category);\n\n /**\n * Method updates category in database\n * @param category\n */\n void updateCategory(Category category);\n\n /**\n * Methods returns category by id\n * @param id\n * @return\n */\n Category selectCategory(long id);\n\n /**\n * Methods returns category by category name\n * @param name\n * @return category\n */\n Category selectCategory(String name);\n\n /**\n * Method returns category list\n * @return category list\n */\n List<Category> selectCategoryList();\n\n /**\n * Method deletes category by id\n * @param id\n */\n void deleteCategory(long id);\n\n /**\n * Method deletes category parameter\n * @param id\n */\n void deleteParameter(long id);\n\n /**\n * Method deletes category products\n * @param id\n */\n void deleteCategoryProducts(long id);\n\n /**\n * Method delete category parameter product details\n * @param id\n */\n void deleteCategoryParameterProductDetails(long id);\n}", "public interface ProductDAO {\n\n /**\n * 添加商品\n * @param product\n */\n public void addProduct(Product product);\n\n /**\n * 分页查询\n * @param pager\n * @param fileId\n * @param fType\n * @param days1\n * @return\n */\n public Pager4EasyUI<ProductInfo> pager(Pager4EasyUI<ProductInfo> pager, String fileId, String fType);\n\n /**\n * 计数\n * @param fileId\n * @return\n */\n public int count(String fileId);\n\n /**\n * 批量添加\n */\n public void addProducts(List<Product> products);\n\n}", "public interface TProjectChangeContentDAO extends BaseDao<TProjectChangeContent> {\n List findByProjectchangecontentField(Object projectchangecontentField);\n\n List findByProjectchangecontentFieldname(\n Object projectchangecontentFieldname);\n\n List findByProjectchangecontentOvalue(\n Object projectchangecontentOvalue);\n\n List findByProjectchangecontentNvalue(\n Object projectchangecontentNvalue);\n\n List findByIsdeleted(Object isdeleted);\n}", "public ArAgingDetailReportDAO () {}", "public Departmentdetails getDepartmentByName(String departmentName);", "@Repository\npublic interface UserDao {\n int getuid(String user_name);\n void addqiandao(qiandao qiandao);\n List<Role> getqx(String user_name);\n List<qiandao> gety(String user_name);\n List<qiandao> getj();\n List<qiandao> getall();\n Timestamp getoldtime(int uid);\n void delete1(int qid);\n\n\n}", "public interface SectionDao extends Dao{\n}", "public interface IKindOfDaoDao {\n\n\t/**\n\t * Create a new element.\n\t * @param exempleDirect Element to create.\n\t \t * @throws DaoException If a DAO problem occurs.\n\t */\n\tpublic void createExempleDirect(ExempleDirect exempleDirect) throws DaoException;\n\n\t/**\n\t * Update an existing element.\n\t * @param exempleDirect Element to update. \n * If the element has an id, it may use it.\n \t * @throws DaoException If a DAO problem occurs.\n\t */\n\tpublic void updateExempleDirect(ExempleDirect exempleDirect) throws DaoException;\n\n\t/**\n\t * Delete an element.\n * Only id can be used to find which element must be deleted.\n\t * @param exempleDirect Element which will be delete. \n\t \t * @throws DaoException If a DAO problem occurs.\n\t */\n\tpublic void deleteExempleDirect(ExempleDirect exempleDirect) throws DaoException;\n\n\t/**\n\t * Find all elements.\n\t * @return A list with all elements, without any filter.\n\t \t * @throws DaoException If a DAO problem occurs.\n\t */\n\tpublic Collection<ExempleDirect> findAllExempleDirects() throws DaoException;\n\n\t/**\n\t * Find one entity by its primary key.\n * @param id The PK of the entity.\n\t * @return The entity found.\n\t \t * @throws DaoException If a DAO problem occurs.\n\t */\n\tpublic ExempleDirect findExempleDirectById(String id) throws DaoException;\n\n\t//Start of user code for technicals dao access api\n\t//End of user code\n}", "public ResultSet getDepartmentByID(int dept_no);", "Department findById(long id);", "public interface DutyManageDao {\r\n\r\n void getDutyRecordByUID(Page<DutyMainUserVo,DutyMainUserVo> page );\r\n\r\n List<Map<String,Object>> getDutyStatistics(DutyMonthUserQuery dutyMonthUserQuery);\r\n\r\n int interDutyMain(List<DutyMain> dutyMain);\r\n List<DutyTypeVo> getDutyType(DutyMain main);\r\n List<String> getUsersByTypeId(String typeId,String searchText);\r\n int setInUserInfo(DutyMainUserVo userVo);\r\n int setDelUser(String id);\r\n int insertToMain(DutyMain dutyMain); //插入duty_main表格中一条数据\r\n int insertToUser(List<DutyMainUserVo> userList);\r\n List<DutyMain> selectDutyList(DutyTypeVo dutyTypeVo);\r\n\r\n List<DutyMain> selectAllDutyList(DutyTypeVo dutyTypeVo);\r\n\r\n List<DutyMainUserVo> getDutyInfoByDutyDate(DutyTypeVo dutyTypeVo);\r\n int insertToMainLine(DutyMain dutyMain); //向itsm_duty_main中插入一行数据得到dutyId\r\n int insertToMainList(List<DutyMainUserVo> listVo); //将复制的数据插入到duty_main_user表中\r\n Date getMaxDate(); //获得日期表中最大时间\r\n String getMinDate(); //获得日期表中最小日期\r\n int updateDutyState(DutyMainUserVo dutyMainUserVo); //更新值班状态\r\n int delLineUser(List<Long> delIds); //编辑保存时删除itsm_duty_main_user表格中的数据\r\n int getMainUserInfo(String typeUserName,String dutyTypeId); //根据人员名查相关的信息userId\r\n int addMan(List<DutyMainUserVo> addMan); //编辑时添加的人员\r\n long checkByDutyDate(String shiftDate); //根据时间查询该时间是否排班\r\n\r\n List<DutyMain> getDutyDateByUserId(Long id,String startDate,String endDate);\r\n\r\n List<DutyMainUserVo> getDutyUserByDate(String today);\r\n\r\n List<DutyMain> getDutyMainByDate(String date);\r\n\r\n List<DutyMonthUser> getUserDutyInfoList(Page page);\r\n\r\n int getTypeNumByUserId(long userId, int type);\r\n\r\n int getHasDutyMonth(long userId, int dutyType);\r\n\r\n List<DutyTypeVo> listAll();\r\n List<DutyTypeVo> listAllByDomainId(String domainId);\r\n\r\n void insertDutyTypeRecord(List<DutyTypeVo> dutyTypeVos);\r\n List<DutyTypeVo> selectDutyTypeById (long dutyId);\r\n List<DutyMainUserVo> selectDutyManById (long dutyId);\r\n List<DutyTypeVo> getDutyClassByTime(String shiftTime, long userId);\r\n\r\n List<DutyTypeVo> getShiftDutyClassByTime (Map timeMap);\r\n List<DutyMainUserVo> getShiftDutyClassByTimeAndDutyType(long shiftType,String time) throws ParseException;\r\n\r\n Long getLeaveDateByUserId(Long id, String startDate, String endDate);\r\n\r\n\r\n void addDutyLog(DutyLog dutyLog);\r\n\r\n List<DutyLog> getDutyLogBydutyTime(String dutyTime,Long subDutLogUserId);\r\n\r\n List<DutyLog> findDutyLog(Long dutyMainId,Long subDutyUserId);\r\n\r\n DutyLog findDutyLog(Long dutyMainId,Long dutyTypeId,Long subDutyUserId);\r\n\r\n DutyLog findAdminDutyLog(Map<String,Object> map);\r\n\r\n void delDutyLogById(Long id);\r\n\r\n void updateDutyLog(DutyLog dutyLog);\r\n\r\n List<DutyMain> findAllDutyList(DutyTypeVo dutyTypeVo);//根据域获取值班日期\r\n\r\n List<String> findUserByDomainId(String typeId, String searchText, Long domainId);\r\n\r\n List<DutyMainUserVo> selectDutyManById(Long dutyId, Long domainId);\r\n\r\n List<DutyTypeVo> findAllDutyTypeByDomainId(Long domainId);\r\n\r\n Date getMaxDate(Long domainId);\r\n\r\n List<DutyTypeVo> selectDutyTypeById(Long dutyId, Long domainId);\r\n\r\n List<Map<String, Object>> getDutyStatistics(Date beginTime, Date endTime, String domainId);\r\n\r\n /*保存延续按周排班*/\r\n int addWeek(List<DutyWeekUserVo> dutyWeekUserVo);\r\n\r\n List<DutyWeekUserVo> findWeek();\r\n\r\n\r\n List<DutyTypeVo> findDutyTypeById(Long dutyTypeId);\r\n\r\n List<Long> findDutyTime();\r\n\r\n List<DutyWeekUserVo> findWeekDuty(Long dutyId);\r\n\r\n /*更新编辑按周排班*/\r\n int delWeekUser(List<Long> delIds);\r\n\r\n int delMainUserByIds(List<Long> delIds);\r\n\r\n int addMans(List<DutyWeekUserVo> addMan);\r\n\r\n int addDutyMans(List<DutyMainUserVo> addMan);\r\n\r\n List<DutyTypeUserVo> findTypeUser(Long typeId,String searchText);\r\n\r\n List<DutyMainUserVo> findDutyMainUserByTypeId(Long typeId);\r\n\r\n void updateDutyMainUser(DutyMainUserVo dutyMainUserVo);\r\n\r\n int delWeekUsers();\r\n\r\n List<Long> findMinId();\r\n\r\n //查询最大时间\r\n Date findDesc();\r\n //查询最小时间\r\n Date findAsc();\r\n\r\n List<DutyMainUserVo> findDutyMainUserListByListID(Long listId);\r\n\r\n /**\r\n * jwt 同findDutyMainUserListByListID一样,只是获取itsm_duty_main_user的startTime和endTime\r\n * @param listId\r\n * @return\r\n */\r\n List<DutyMainUserVo> selectDutyMainUserListByListID(Long listId);\r\n\r\n List<DutyMainUserVo> findDutyMainUserListByDate(Map<String,Object> map);\r\n\r\n List<DutyMain> findDutyMainByListId(Long listId);\r\n\r\n List<DutyMain> findDutyMainByListId(Map<String,Object> map);\r\n\r\n List<DutyMainUserVo> findDutyMainUserListByDutyId(Long dutyId);\r\n\r\n void deleteDutyMainByDate(Map<String,Object> map);\r\n\r\n void deleteDutyMainByListId(Long listId);\r\n\r\n void deleteRecordByDutyId(Long dutyId);\r\n\r\n List<DutyMain> getAllDutyDateByDomainId(Map<String,Object> map);\r\n\r\n void upDateDutyUserContactsInfo(DutyMainUserVo dutyMainUserVo);\r\n\r\n\r\n void getMyDutyPage(Page<DutyMainUserVo,DutyMainUserQo> page);\r\n\r\n void updateDutyUserStatus(DutyMainUserVo dutyMainUserVo);\r\n\r\n List<DutyLog> getLogListByDutyIdAndTypeId(Map<String,Object> map);\r\n\r\n List<DutyTypeJobVo> findDutyMainTypeListByCDate(String currentDate);\r\n\r\n List<DutyMainUserVo> findUserListByDutyIdAndTypeId(Map<String,Object> map);\r\n\r\n void batchOffDutyList(Map<String,Object> map);\r\n\r\n void updateDutyLogByDutyTypeUser(DutyLog dutyLog);\r\n\r\n //jwt query获取itsm_duty_main_user表\r\n List<DutyMainUserVo> queryDutyMainUser(Page<DutyMainUserPageVo,DutyMainUserPageVo> page);\r\n}", "public interface WebRecommendationDao extends GenericDao<WebRecommendation, Long> {\n\t\n\t/**\n\t * Fetches a list of all web recommendations ordered by sequence number.\n\t * \n\t * @return A list of web recommendations.\n\t */\n\tpublic List<WebRecommendation> findAllOrderBySequence();\n\n}", "public interface EpicsDataDao {\n\n /**\n * Delete all EPICS data for a run from the database.\n *\n * @param run the run number\n */\n public void deleteEpicsData(EpicsType epicsType, int run);\n\n /**\n * Get EPICS data by run.\n *\n * @param run the run number\n * @param epicsType the type of EPICS data (1s or 10s)\n * @return the EPICS data\n */\n List<EpicsData> getEpicsData(EpicsType epicsType, int run);\n\n /**\n * Insert a list of EPICS data into the database.\n * <p>\n * The run number comes from the header information.\n *\n * @param epicsDataList the list of EPICS data\n */\n void insertEpicsData(List<EpicsData> epicsDataList, int run);\n}", "public GenericDao<Autorization> getAutorizationDao();", "public interface IdeaCommentDao extends GenericDao<IdeaComment, Long>{\n\n\tList<IdeaComment> findIdeaCommentList(String ideaId);\n\n}", "@Override\r\n public Dept deptDetailList(int dept_seq) {\n return sqlSession.selectOne(\"deptDAO.deptDetailList\", dept_seq);\r\n }", "public interface ForumPostDao {\n\n List<ForumPostPO> getPostModels(int topic_id,int page, int page_size);\n\n ForumPostPO getPostModel(int id);\n\n int addPostModel(ForumPostPO post);\n\n int deletePostModels(int topic_id);\n\n int deletePostModel(int id);\n\n int updatePostModel(int id, ForumPostPO post);\n\n int getNumOfPosts(int topic_id);\n\n}", "@Override\r\npublic int create(Detalle_pedido d) {\n\treturn detalle_pedidoDao.create(d);\r\n}", "public interface VideoCollectCommentDao {\n\n\tpublic int insertVideoCollectComment(VideoCollectComment videoCollectComment);\n\n \tpublic int updateVideoCollectComment(VideoCollectComment videoCollectComment);\n\n \tpublic VideoCollectComment getVideoCollectCommentByWhere(String where);\n \n \tpublic List<VideoCollectComment> getVideoCollectCommentListByWhere(String where,int offset,int limit);\n \t\n \tpublic List<VideoCollectComment> getVideoCollectCommentListByCondition(VideoCollectCommentSearchBean condition);\n \n \tpublic List<VideoCollectComment> getVideoCollectCommentListBySql(String sql);\n \n \tpublic int getVideoCollectCommentCountByWhere(String where);\n \t\n \tpublic int getVideoCollectCommentCountByExample(VideoCollectComment videoCollectComment);\n \t\n \tpublic int getVideoCollectCommentCountByCondition(VideoCollectCommentSearchBean condition);\n \n \tpublic int updateVideoCollectCommentByWhere(String where);\n \n \tpublic int deleteVideoCollectCommentByWhere(String where);\n \t\n \tpublic List<BatchResult> batchInsertVideoCollectComment(List<VideoCollectComment> list);\n \t\n \tpublic VideoCollectComment getVideoCollectCommentByExample(VideoCollectComment videoCollectComment);\n \t\n \tpublic List<VideoCollectComment> getVideoCollectCommentListByExample(VideoCollectComment videoCollectComment);\n \t\n \tpublic int deleteVideoCollectCommentByExample(VideoCollectComment videoCollectComment);\n \t\n \tpublic int deleteVideoCollectCommentByCondition(VideoCollectCommentSearchBean condition);\n \t\n \tpublic List<BatchResult> batchDeleteVideoCollectCommentByExample(List<VideoCollectComment> list);\n \t\n \tpublic List<VideoCollectComment> getVideoCollectCommentByCondition(VideoCollectCommentSearchBean condition);\n \t\n \tpublic int updateVideoCollectComment(VideoCollectCommentSearchBean condition);\n \t\n \tpublic Map<String,Object> getVideoCollectCommentColumnByCondition(VideoCollectCommentSearchBean condition);\n \t\n \tpublic List<Map<String,Object>> getVideoCollectCommentColumnListByCondition(VideoCollectCommentSearchBean condition);\n \t\n \tpublic int updateVideoCollectCommentByExample(VideoCollectComment videoCollectComment);\n}", "public interface DrugRecordDao {\r\n\r\n List<DrugRecord> getList(@Param(\"drugId\") String drugId);\r\n\r\n /**\r\n * 创建\r\n * @param drugRecord\r\n * @return\r\n */\r\n int create(@Param(\"drugRecord\") DrugRecord drugRecord);\r\n}", "public interface DUserDao {\n /**\n * 根据手机和密码,查询返回病患信息\n * 若不存在返回空,若密码不对返回id=0的医生\n * @param phone 医生手机\n * @return\n */\n DUser queryByPhone(@Param(\"phone\") String phone);\n\n /**\n * 新建一个医生用户\n * @param dUser\n * @return\n */\n boolean save(DUser dUser);\n\n /**\n * 查询所有的医生用户\n * @return\n */\n ArrayList<DUser> queryAll();\n\n /**\n * 更新医生\n * @param dUser\n * @return\n */\n boolean updateDUser(DUser dUser);\n}", "public interface DemoSysDbLogDao extends BaseDao<DemoSysDbLog, Long> {\r\n public void rewriteLogToDb(Collection<DemoSysDbLog> logs);\r\n}", "DepartReportDAOJDBC(DAOFactory daoFactory) {\r\n this.daoFactory = daoFactory;\r\n }", "@Repository\npublic interface DepartmentRepository extends JpaRepository<Department, Long> {\n /**\n * 根据ID和名称模糊匹配获取部门\n * @param id\n * @param name\n * @return\n */\n List<Department> findByIdOrName(Long id, String name);\n /**\n * 根据部门名称模糊匹配\n * @param name\n * @return\n */\n Department getByName(String name);\n Department getByNameEquals(String name);\n Department getByNameLike(String name);\n}", "public interface TagDAO {\n\n\t/** Tag id for host country - country tag */\n\tpublic static final int HOSTCOUNTRY_COUNTRY_TAG_ID = 2001;\n\t\n\t/** Keywords associated with this dataset */\n\tpublic static final int DATA_RESOURCE_KEYWORDS = 4000;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_COUNTRY = 4100;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_BOUNDING_BOX = 4101;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_WKT_POLYGON = 4102;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_DATE_RANGE = 4120;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_MONTH = 4121;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_SPECIES = 4140;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_GENUS = 4141;\n\t\n\tpublic static final int DATA_RESOURCE_OCCURRENCES_FAMILY = 4142;\n\t\n\tpublic static final int DATA_RESOURCE_TAXONOMIC_SCOPE = 4150; \n\t\n\tpublic static final int DATA_RESOURCE_ASSOCIATED_KINGDOM = 4151;\n\n\t/** Species common names associated with this resource */\n\tpublic static final int DATA_RESOURCE_COMMON_NAMES = 4152;\n\n\t/** Indicates whether a data resource contains type records */\n\tpublic static final int DATA_RESOURCE_CONTAINS_TYPE_SPECIMENS = 4160;\n\n\t/** Names of collectors who have collected for this dataset */\n\tpublic static final int DATA_RESOURCE_COLLECTOR = 4161;\n}", "public interface VisitLineDao extends BaseDao<VisitLine, Long> {\n\n List<VisitLineListModel> getAllVisitLineListModel();\n\n List<VisitLineListModel> getAllVisitLineListModel(Date from, Date to);\n\n List<LabelValue> getAllVisitLineLabelValue();\n\n VisitLineListModel getVisitLineListModelByBackendId(long visitlineBackendId);\n\n VisitLine getVisitLineByBackendId(Long backendId);\n\n}", "public interface DistrictSanteDao extends ImogBeanDao<DistrictSante> {\n\n\t/* relation dependencies */\n\n}", "public interface IDictionariesDao {\n\n Dictionaries findById(@Param(value = \"dicId\") String dicId);\n\n List<Dictionaries> findByCommodityId(@Param(value = \"commodityId\") String commodityId);\n\n int update(Dictionaries dictionaries);\n\n int insertdictionaries(Dictionaries dictionaries);\n\n List<Dictionaries> findDcList(@Param(value = \"dictionaries\") Dictionaries dictionaries,@Param(value = \"status\") String status,@Param(value = \"startPos\") Integer startPos, @Param(value = \"pageSize\") Integer pageSize);\n\n List<Dictionaries> getCount(@Param(value = \"dictionaries\") Dictionaries dictionaries,@Param(value = \"status\") String status);\n\n List<Dictionaries> findDcListAll(@Param(\"dictionaries\") Dictionaries dictionaries);\n\n List<Dictionaries> findAll(@Param(value = \"dictionaries\") Dictionaries dictionaries,@Param(value = \"stockxName\") String stockxName,@Param(value = \"commodityName\") String commodityName,@Param(value = \"startPos\") Integer startPos, @Param(value = \"pageSize\") Integer pageSize,@Param(\"datetimeStart\")String datetimeStart , @Param(\"datetimeEnd\")String datetimeEnd);\n\n int findCount(@Param(\"dictionaries\") Dictionaries dictionaries,@Param(\"stockxName\") String stockxName,@Param(\"commodityName\")String commodityName,@Param(\"datetimeStart\")String datetimeStart , @Param(\"datetimeEnd\")String datetimeEnd);\n}", "public interface DBDao {\n /**\n * 添加本地缓存\n * @param url 插入的数据的url\n * @param content 插入的数据的json串\n */\n public void insertData(String url,String content,String time);\n\n /**\n * 删除指定的本地存储数据\n * @param url 指定url\n */\n public void deleteData(String url);\n\n /**\n * 更新本地缓存数据\n * @param url 指定url\n * @param content 需要更新的内容\n * @param time 更新的时间\n */\n public void updateData(String url,String content,String time);\n\n /**\n * 查询指定url的缓存数据\n * @param url 指定的url\n * @return 返回缓存数据content\n */\n public String queryData(String url);\n /**\n * 查询指定url的缓存数据\n * @param url 指定的url\n * @return 返回缓存数据的存储时间\n */\n public String queryDataTime(String url);\n}", "public empresaDAO(){\r\n \r\n }", "@Repository(\"articleDao\")\npublic interface ArticleDao {\n void insertArticle(Article article);\n Article findById(Integer id);\n List<Article> findByUserId(@Param(\"assortmentId\")Integer assortmentId ,@Param(\"userId\") Integer userId, Page page);\n void deleteById(Integer id);\n void updateArticle(Article article);\n void updateByMap(@Param(\"map\") Map map);\n List<Article> findBycurrentAccountIdAndAssortment(@Param(\"userId\")Integer userId,\n @Param(\"assortmentId\")Integer assortmentId,\n Page page);\n /**\n * 描述:获取这个人的文章分类\n * @param user_id\n * @return\n */\n List<Map<String,Object>> findGroupByUserId(Integer user_id);\n\n /**\n * 描述:获取这个人文章阅读排名\n * @param userId\n * @return\n */\n List<Article> findHistoryMax(@Param(\"userId\")Integer userId, Page page);\n List<Article> findGroupByCreateTime(Integer userId);\n\n List<Article> findByCreateTimeAndvisitTimes(@Param(\"searchKey\")String searchKey, Page page);\n}", "public Department getDepartmentById(Integer id);", "public interface DotaMaxDAO {\n\n\n /**\n * 将hero实例存储到数据库。\n */\n void insertHeroes(List<Heroes> heroList);\n\n /**\n * 将Item实例存储到数据库。\n */\n void insertItems(List<Items> itemsList);\n\n\n /**\n * 加载英雄列表\n * @return\n */\n Heroes getHeroes(int id);\n\n\n\n\n\n\n void insertMatch(MatchDetails match);\n\n /**\n * 加载数据库里已有的数据\n * @param id\n * @return\n */\n MatchDetails getMatch(long id);\n\n /**\n * 加载用户的数据\n * @param account_id\n * @return\n */\n List<MatchDetails> getMatchByAccountId(long account_id);\n\n\n String getItemsNameById(String item_id);\n\n\n\n /**\n * 添加到User表\n */\n boolean insertUser(User user);\n\n /**\n * 从User表读取所有的用户\n */\n List<Long> getUser();\n\n\n\n}", "public interface TenderDao {\n\n public void persist(Tender tender);\n\n public void update(Tender tender);\n\n public Tender findById(int id);\n\n public List<Tender> findByProposal(Tender tender);\n\n public List<Tender> findByStatus(TenderStatus tenderStatus);\n\n public List<Tender> findAll();\n\n public void delete(Tender tender);\n}", "public interface AdminDao extends BaseDao{\n\n /**\n * 根据用户名查询该用户信息\n * @param admin\n * @return\n */\n public Admin findAdminByName(Admin admin);\n}", "public interface NameDAO {\n /**\n * Retrieves all names from the Name table given idPerson and for Parent.\n * <p/>\n * This method is used for updating the CSUP_PERSON_OUTBOUND table\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Object[] findDistinctNameByIdPersonAndRelPA(int idPerson);\n\n /**\n * Retrieves all names from the Name table given idPerson.\n * <p/>\n * This method is used for updating the CSUP_PERSON_OUTBOUND table\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Name findDistinctNameByIdPerson(int idPerson);\n \n /**\n * This selects a row from Name where indNamePrimary = 'Y'\n *\n * @param idPerson\n * @return\n */\n Name findNameByPersonPrimary(int idPerson);\n\n /**\n * Gets dtNameEndDate field given idName.\n * <p/>\n *\n * @param idName\n * @return\n */\n Date findNameDtNameEndDateByIdName(int idName);\n\n /**\n * Retrieves the rows from Name and PhoneticName tables for the given idPerson and for indNamePrimary = 'Y' and\n * cdPhkNameType = 'NA'\n *\n * @param idPerson\n * @return List of objects/rows\n */\n @SuppressWarnings({\"unchecked\"})\n Map findNameFromNameAndPhoneticNameByIdPerson(int idPerson);\n\n /**\n * Retrieves all aliases for a specified stage ID, considering closure and end dating.\n * <p/>\n *\n * @param idStage\n * @return keys idPerson, nmNameFirst, nmNameMiddle, nmNameLast, cdNameSuffix, dtNameEndDate, dtNameStartDate, idName,\n * indNameInvalid, indNamePrimary, dtLastUpdate\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdStage(int idStage);\n\n /**\n * Gets name fields given idPerson and dtSysTsQuery.\n * <p/>\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Name findNameByIdPersonDtSysTsQuery(int idPerson, Date dtSysTsQuery);\n\n /**\n * This gets list of Person ID for the given first, middle and last names and filters\n * out the Adopted Person if the Sealed Indicator attribute of the user is N \n * @param first\n * @param middle\n * @param last\n * @param indSealed\n * @return List of Person ID\n */\n List<Integer> findPrimaryIdPersonsByFirstLastMiddle(String first, String last, String middle, String indSealed);\n \n /**\n * This gets list of Person ID for the given first and last names and filters\n * out the Adopted Person if the Sealed Indicator attribute of the user is N \n *\n * @param first\n * @param last\n * @return List of Person ID\n */\n @SuppressWarnings({\"unchecked\"})\n List<Integer> findPrimaryIdPersonsByFirstLast(String first, String last, String indSealed);\n \n /**\n * Counts the number of Name ID for the given ID Person and dtSysTsQuery.\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"}) \n long countNameIdName(int idPerson, Date dtSysTsQuery);\n\n /**\n * Retrieve Name information given idPerson and maxDate.\n * <p/>\n *\n * @param idPerson\n * @param maxDate\n * @return Name\n */\n Name findNameByIdPersonAndMaxDate(int idPerson, Date maxDate);\n\n /**\n * This gets a count of idName based on idPerson and maxDate.\n *\n * @param idPerson\n * @param maxDate\n * @return Integer\n */\n long countIdNameByIdPersonAndMaxDate(int idPerson, Date maxDate);\n\n long countNameIdNameByNmFull(String first, String mid, String last);\n\n /**\n * Retrieves valid names from the Name table given idPerson and dtSysTsQuery.\n * <p/>\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPersonAndDtNameStartDate(int idPerson, Date dtSysTsQuery);\n\n /**\n * Retrieves all names from the Name table given idPerson.\n * <p/>\n *\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPerson(int idPerson);\n\n /**\n * Inserts into Name table\n *\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param nmNameFirst\n * @param nmNameMiddle\n * @param nmNameLast\n * @param indNamePrimary\n * @param cdNameSuffix\n * @param dtDtNameStartDate\n * @return\n */\n int insertName(int idPerson, String indNameInvalid, String nmNameFirst, String nmNameMiddle, String nmNameLast,\n String indNamePrimary, String cdNameSuffix, Date dtDtNameStartDate);\n\n /**\n * Updates Name table\n *\n * @param idName\n * @param dtDtNameEndDate\n * @param tsLastUpdate\n * @return\n */\n \n int updateName(int idName, Date dtDtNameEndDate, Date tsLastUpdate);\n\n /**\n * Updates table Name field nmNameLast given idName and idPerson\n * <p/>\n *\n * @param nmNameLast\n * @param idName\n * @param idPerson\n */\n \n \n int updateNameNmNameLast(String nmNameLast, int idName, int idPerson);\n\n /**\n * Inserts into Name table\n *\n * @param nmNameLast\n * @param idPerson\n * @return\n */\n int insertName(String nmNameLast, int idPerson);\n\n /**\n * Insert a row into the Name table.The primary key used is SEQ_NAME.\n *\n * @param idPerson\n * @param nmNameFirst\n * @param nmNameMiddle\n * @param nmNameLast\n * @param cdNameSuffix\n * @param indNamePrimary\n * @param indNameInvalid\n * @param dtNameStartDate\n * @param dtNameEndDate\n * @return\n */\n int insertName(int idPerson, String nmNameFirst, String nmNameMiddle, String nmNameLast,\n String cdNameSuffix, String indNamePrimary, String indNameInvalid,\n Date dtNameStartDate, Date dtNameEndDate\n );\n\n /**\n * Partial insert of Name table using the supplied parameters(column values). (Note that the insert is done using\n * straight SQL)\n *\n * @param cdNameSuffix\n * @param dtNameEndDate\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @return int The number of entities effected by the 'insert' operation.\n */\n int insertName(String cdNameSuffix, Date dtNameEndDate, int idName, int idPerson, String indNameInvalid,\n String indNamePrimary, String nmNameFirst, String nmNameLast, String nmNameMiddle);\n\n /**\n * Partial insert of Name table using the supplied parameters(column values). (Note that the insert is done using\n * straight SQL)\n *\n * @param cdNameSuffix\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @return int The number of entities effected by the 'insert' operation.\n */\n int insertName(String cdNameSuffix, int idName, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle);\n\n /**\n * Partial update of Name table using the supplied parameters(column values).\n *\n * @param cdNameSuffix\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @param idName\n * @param lastUpdate\n * @return int The number of entities effected by the 'update' operation.\n */\n int updateNameIncludingDtNameEndDate(String cdNameSuffix, int idPerson, String indNameInvalid,\n String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName,\n Date lastUpdate);\n\n /**\n * Partial update of Name table using the supplied parameters(column values).\n *\n * @param cdNameSuffix\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @param idName\n * @param lastUpdate\n * @return int The number of entities effected by the 'update' operation.\n */\n int updateName(String cdNameSuffix, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName, Date lastUpdate);\n\n /**\n * Delete {@link gov.georgia.dhr.dfcs.sacwis.db.Name} objects.\n *\n * @param idName\n * @param dtLastUpdate\n * @return The number of rows deleted.\n */\n int deleteName(int idName, Date dtLastUpdate);\n /**\n * This gets a count of idName.\n *\n * @param idPerson\n * @return\n */\n long countNameIdNameByIdPerson(int idPerson);\n \n /**\n * Inserts or updates a Name record\n * @param name\n * @return\n */\n int saveOrUpdateName(Name name) ;\n}", "public interface SummaryDao {\n\n public List<String> getBatchCount(String startDate);\n\n public List<String> getBatchCountAll();\n\n public List<CustBatchDetail> getTradedCust(String batchNo);\n\n public boolean saveFundIncomes(List<SyncIncomeStat> list);\n\n public boolean saveTradeRecords(List<SyncTrade> list);\n\n public boolean saveBatchLog(SyncBatchLog batchLog);\n\n public boolean isTaskFinished(String taskName, String date);\n}", "public interface BookDao {\n// 录入书籍\n boolean add(Book book);\n\n// 通过 isbn 号,查询\n boolean findByIsbn(String isbn);\n\n// 更新库存量\n boolean modifyQuantity(String isbn, int quantity);\n\n List<Book> findByBook();\n\n int findByIsbnQuantity(String isbn);\n\n double getByIsbnSalePrice(String isbn);\n\n List<Book> getByName(String text);\n}", "public interface XiaoShouContactDao extends EntityObjectDao {\n \n List<XiaoShouContact> findOverviewXiaoShouContact(String keyWords, String userUuid, String startTime, String endTime, String sortBy, String sortWay, String contactStatus, int startPosition, int pageSize);\n\n int findOverviewXiaoShouSize(String keyWords, String userUuid, String startTime, String endTime, String sortBy, String sortWay, String contactStatus);\n\n //查找重复的编号\n boolean findXiaoShouOrderDuplicate(String temp);\n\n //未付账单用户\n List<Object[]> obtainAllCompanyWithOnCreateBillOnLoginUser();\n\n //特定用户所有未付款history\n List<XiaoShouContactRentingFeeHistory> findSpecUserOnCreateBill(String selectCarrierUuid);\n\n /*******************************************扣款历史*******************************************/\n List<XiaoShouContactRentingFeeHistory> findXiaoShouHistory(List<String> historyUuids);\n\n List<XiaoShouContactRentingFeeHistory> obtainXiaoShouHistoryByVehicleNumber(String contactUuid, String vehicleNumber);\n}", "public interface GuruDao {\n public int findTotal();\n public int insertGuru(@Param(\"guru\") Guru guru);\n public int updateGuru(@Param(\"guru\") Guru guru);\n public Guru findGuru(@Param(\"context\") String context);\n public List<Guru> findByPage(@Param(\"start\") int start,@Param(\"rows\")int rows);\n}", "BookReservationDao getBookReservationDao();", "@Dao\npublic interface CommentDao {\n\n}", "public List<Departmentdetails> getDepartmentDetails();", "public interface ServicoDao extends EntidadeDao<Servico> {\n Long contarTotalServicos();\n Long contarServicosStatus(StatusServico statusServico);\n @Override\n List<Servico> listar();\n\n List<Servico> listarServicos();\n public List<Servico> listarMeusServicos(Long id);\n public List<Servico> listarServicosEmAberto();\n Long servicoPorSetor(Long id);\n Servico BuscarPorId(Long id);\n void salvarLogServico(LogServico logServico);\n\n public void verificarConlusaoEAtualizar(Long id);\n\n Long meusServicos();\n Long contarPorSetor(Long id);\n List<Object[]> contarDeAteDataPorSetorDESC(LocalDate dtDe, LocalDate dtAte);\n List<Object[]> contarAPartirDePorSetorDESC(LocalDate dtDe);\n List<Object[]> contarAteDataPorSetorDESC(LocalDate dtAte);\n List<Object[]> contarDeAteDataDESC(LocalDate dtDe, LocalDate dtAte);\n List<Servico> filtrarDeAteDataPorSetorDESC(Long id, LocalDate dtDe, LocalDate dtAte);\n List<Servico> filtrarAPartirDePorSetorDESC(Long id, LocalDate dtDe);\n List<Servico> filtrarAteDataPorSetorDESC(Long id, LocalDate dtAte);\n List<Servico> filtrarDeAteDataDESC(LocalDate dtDe, LocalDate dtAte);\n\n List<Servico> filtrarMaisRecentesPorSetor(Long id);\n}", "public interface RoomTypeDao {\n\n /**\n * 新增房间类型\n * @param roomType\n */\n public void save(RoomType roomType);\n\n /**\n * 删除房间类型\n * @param id\n */\n public void delete(int id);\n\n /**\n * 根据id查找对应房间类型\n * @param id\n * @return\n */\n public RoomType find(int id);\n\n /**\n * 根据类型查找对应id\n * @param type\n * @return\n */\n public RoomType queryByType(String type);\n\n /**\n * 获得所有房间类型\n * @return\n */\n public List<RoomType> getAllType();\n\n /**\n * 验证该房间类型是否存在\n * @param type\n * @return\n */\n public boolean isExist(String type);\n\n /**\n * 获得下一个房间类型的id号\n * @return\n */\n public long getNextId();\n\n}", "public interface IDepartmentService {\n\n /**\n * 获取所有Department对象\n */\n public List<Department> getAllList();\n\n /**\n * 获取PageResult对象\n */\n public PageResult getQuery(BaseQuery query);\n\n /**\n * 获取Department对象\n */\n public Department get(Department department);\n\n /**\n * 保存Department对象\n */\n public void save(Department department);\n\n /**\n * 更新Department对象\n */\n public void update(Department department);\n\n /**\n * 更新Department对象\n */\n public void delete(Department department);\n\n /**\n * 批量删除Department对象\n * @param ids\n */\n public void batchDelete(List<Long> ids);\n}", "public interface InvMainDao extends GenericDao<InvMain, String> {\n\tpublic JQueryPager getInvMainCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic boolean checkAllInitInvMainConfirm(String orgCode,String copyCode,String kjYear,String storeId);\n\tpublic InvMain getInvMainByNo(String no, String orgCode, String copyCode);\n\tpublic boolean checkAllDocsInStore(String storeId,String orgCode,String copyCode,String kjYear);\n\tpublic void deleteInvDictAccount(String storeId, String orgCode,String copyCode,String kjYear);\n\n}", "public OnibusDAO() {}", "public interface MaintenanceDao extends JpaRepository<Maintenance, Long> {\n}", "public Department() \n {\n name = \"unnamed department\";\n }", "public interface EscalaDAO {\r\n\r\n /**\r\n * Select numero manifiesto aeat.\r\n *\r\n * @param srvcId\r\n * the srvc id\r\n * @return the string\r\n */\r\n String selectNumeroManifiestoAeat(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del estado de una escala a partir del estado de sus atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateRecalcularEstado(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del codigo de exencion de una escala a partir del codigo de exencion de sus atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateExencion(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de estancia de una escala a partir del tipo de estancia de sus atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateEstancia(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de navegacion de entrada de una escala a partir del puerto anterior.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateNavegacionEntrada(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de navegacion de salida de una escala a partir del puerto siguiente.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateNavegacionSalida(final Long srvcId);\r\n\r\n /**\r\n * Modificacion del tipo de IVA de una escala a partir de datos de la escala.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateTipoIva(final Long srvcId);\r\n\r\n /**\r\n * Modificacion de las fechas de inicio/fin de una escala a partir las fechas de inicio/fin de sus\r\n * atraques.\r\n *\r\n * @param srvcId\r\n * Identificador del servicio de escala.\r\n * @return Numero de filas modificadas.\r\n */\r\n int updateRecalcularFechas(final Long srvcId);\r\n}" ]
[ "0.69014204", "0.683227", "0.6773911", "0.6578795", "0.65422404", "0.6430999", "0.6367531", "0.6266676", "0.62588483", "0.6231974", "0.6231808", "0.61647713", "0.6090195", "0.6088904", "0.60807306", "0.60704595", "0.6054674", "0.6053635", "0.6043026", "0.6042478", "0.6029729", "0.5987878", "0.59537375", "0.5953037", "0.59504503", "0.5950218", "0.59469867", "0.59107536", "0.5892331", "0.5885202", "0.587963", "0.5871411", "0.5868282", "0.5865973", "0.58437884", "0.583488", "0.58289754", "0.5816179", "0.5814825", "0.58098245", "0.5807028", "0.5799126", "0.5793106", "0.57909054", "0.5790759", "0.5788262", "0.5782666", "0.5782354", "0.5781889", "0.5776641", "0.5773137", "0.57674426", "0.57639843", "0.57582116", "0.5754859", "0.57482135", "0.5745352", "0.574008", "0.57268703", "0.5726628", "0.5719101", "0.57154983", "0.5713154", "0.57127225", "0.57051986", "0.57021743", "0.5690591", "0.5683317", "0.56809884", "0.5672922", "0.5670542", "0.5664138", "0.56608033", "0.5652114", "0.5649861", "0.56496555", "0.56496334", "0.5647492", "0.56435454", "0.5640537", "0.563562", "0.5632659", "0.5626418", "0.56263024", "0.5626018", "0.56247634", "0.5623326", "0.56201375", "0.5616405", "0.5614884", "0.5614449", "0.5613768", "0.56107056", "0.56081486", "0.56051266", "0.56008047", "0.55998033", "0.5599469", "0.5598731", "0.5594931" ]
0.6611724
3
private Filter myFilter; private boolean isFiltered; private boolean inDeletionMode = false; private Set countersToDelete = new HashSet();
public ArrayListFoodAdapter(Context context, FoodDAO foodDAO, AutoCompleteTextView refAutocomplete) { super(foodDAO.getAllFood()); this.foodDAO = foodDAO; mResults = foodDAO.getAllFood(); // refAutocomplete.setAdapter(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(37)\n boolean getFilterCleared();", "boolean hasFiltered() {\n return filtered;\n }", "@Override\n\tpublic String delete(Set<String> filterField) {\n\t\treturn null;\n\t}", "public void setFiltered(boolean filtered) {\n this.filtered = filtered;\n }", "void compareDeletion();", "private void clearAllFilter() {\n }", "boolean isPreFiltered();", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "public void setDeleted();", "boolean doFilter() { return false; }", "@Override\n public void resetFilteredLists() {\n\n }", "public void setFilter(EntityFilter filter);", "public void setFilteredComments(Set<Comment> filteredComments);", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "@PreRemove\r\n public void preRemove(){\r\n this.isDeleted=true;\r\n }", "public void refreshDataFilter();", "public abstract void updateFilter();", "public interface CustomerSubsetFilterStrategy {\r\n Set<Customer> applyFilter(List<Customer> customers);\r\n}", "public interface iFilter {\n\n /**\n * method to add a value to datastructure.\n *\n * @param value\n */\n void add(String value);\n\n /**\n * method to check whether datastructure has value.\n *\n * @param value\n * @return boolean\n */\n boolean contains(String value);\n}", "public boolean isDeleted() {\r\n\treturn isDeleted;\r\n}", "public void setSelections(Set<Filterable> selections);", "@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}", "public synchronized void filtered() {\n filteredCountStat.received();\n filteredCount++;\n }", "public static interface SetFilter extends KeyValueFilter {\r\n\t\tObject put(String name, Object value);\r\n\t}", "public void resetFilter();", "public interface Filter {\n\n}", "public void removeFilter() {\r\n\t\tfilter = null;\r\n\t}", "Get<K, C> setFilterOp(BooleanOp op);", "public boolean isFiltered() {\n return filtered;\n }", "boolean isDeleted();", "public DDataFilter() {\n filters = new ArrayList<>();\n operator = null;\n value = null;\n externalData = false;\n valueTo = null;\n attribute = ROOT_FILTER;\n }", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 93 */ return this.maquinaDao.contarPorCriterio(filters);\r\n/* 46: */ }", "public static void test(){\n System.out.println(new CollectDAOImpl().hasWatched(1,14));\n// System.out.println(new CollectDAOImpl().hasWatched(1,14));\n// System.out.println(new CollectDAOImpl().removeHasWatched(1,14));\n// System.out.println(new CollectDAOImpl().hasWatched(1,14));\n System.out.println(new CollectDAOImpl().preference(1,15,true));\n System.out.println(new CollectDAOImpl().preference(1,19,false));\n// System.out.println(new CollectDAOImpl().preference(1,14,false));\n// System.out.println(new CollectDAOImpl().removePreference(1,14));\n// System.out.println(new CollectDAOImpl().removeHasWatched(1,14));\n }", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45:95 */ return this.categoriaArticuloServicioDao.contarPorCriterio(filters);\r\n/* 46: */ }", "@Override\n public boolean shouldFilter() {\n return true;\n }", "public void clearFilter(){\n\t\tthis.filterApplied=false;\n\t\tindex_begin=0;\n\t\tindex_end=models.size()-1;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t\treturn;\n\t}", "Collection<T> doFilter(RepositoryFilterContext context);", "public void saveFilterValues(String filterCriteria);", "public abstract void filter();", "public RegisterFilter() {\n\t\tqueryList = new ArrayList<QueryPart>();\n\t\torderList = new ArrayList<OrderPart>();\n\t}", "void setIfCanRemove(boolean set);", "public interface ReferencesFilter extends SerializableDataObjectFilter {\n\t/**\n\t * Returns the data object identifier of the reference a valid data object must contain.\n\t * @return Data object identifier.\n\t */\n\tpublic String getReferenceId();\n}", "interface Filter extends Mutator {\n\n }", "public void updateFilterList() {\n filteredList.clear();\n filteredList.addAll(searchList);\n filteredList.retainAll(mediaCategoryList);\n }", "public void setDeleted(boolean deleted);", "private Remove initAttributesFilter(BitSet subset) throws Exception {\n\t\tRemove attributesFilter = new Remove();\n\t\tint[] indices = CommonUtilities.bitsetToIntegerArray(subset, true);\n\n\t\tindices[indices.length - 1] = instances.classIndex();\n\t\tattributesFilter.setAttributeIndicesArray(indices);\n\t\tattributesFilter.setInvertSelection(true);\n\t\tattributesFilter.setInputFormat(instances);\n\t\treturn attributesFilter;\n\t}", "@Override public Filter getFilter() { return null; }", "@Test\n public void testFilter() throws Exception {\n for (int i=0; i<10; i++) {\n assertJQ(req(\"q\",\"*:* \"+ i, \"fq\",\"filter(just_to_clear_the_cache) filter(id:10000\" + i + \") filter(id:10001\" + i + \")\")\n ,\"/response/numFound==0\"\n );\n }\n assertU(adoc(\"id\",\"777\"));\n delI(\"777\");\n assertU(commit()); // arg... commit no longer \"commits\" unless there has been a change.\n\n\n final SolrInfoMBean filterCacheStats\n = h.getCore().getInfoRegistry().get(\"filterCache\");\n assertNotNull(filterCacheStats);\n final SolrInfoMBean queryCacheStats\n = h.getCore().getInfoRegistry().get(\"queryResultCache\");\n\n assertNotNull(queryCacheStats);\n\n\n long inserts = (Long) filterCacheStats.getStatistics().get(\"inserts\");\n long hits = (Long) filterCacheStats.getStatistics().get(\"hits\");\n\n assertJQ(req(\"q\",\"doesnotexist filter(id:1) filter(qqq_s:X) filter(abcdefg)\")\n ,\"/response/numFound==2\"\n );\n\n inserts+=3;\n assertEquals(inserts, ((Long) filterCacheStats.getStatistics().get(\"inserts\")).longValue() );\n assertEquals(hits, ((Long) filterCacheStats.getStatistics().get(\"hits\")).longValue() );\n\n assertJQ(req(\"q\",\"doesnotexist2 filter(id:1) filter(qqq_s:X) filter(abcdefg)\")\n ,\"/response/numFound==2\"\n );\n\n hits+=3;\n assertEquals(inserts, ((Long) filterCacheStats.getStatistics().get(\"inserts\")).longValue() );\n assertEquals(hits, ((Long) filterCacheStats.getStatistics().get(\"hits\")).longValue() );\n\n // make sure normal \"fq\" parameters also hit the cache the same way\n assertJQ(req(\"q\",\"doesnotexist3\", \"fq\",\"id:1\", \"fq\", \"qqq_s:X\", \"fq\", \"abcdefg\")\n ,\"/response/numFound==0\"\n );\n\n hits+=3;\n assertEquals(inserts, ((Long) filterCacheStats.getStatistics().get(\"inserts\")).longValue() );\n assertEquals(hits, ((Long) filterCacheStats.getStatistics().get(\"hits\")).longValue() );\n\n // try a query deeply nested in a FQ\n assertJQ(req(\"q\",\"*:* doesnotexist4\", \"fq\",\"(id:* +(filter(id:1) filter(qqq_s:X) filter(abcdefg)) )\")\n ,\"/response/numFound==2\"\n );\n\n inserts+=1; // +1 for top level fq\n hits+=3;\n assertEquals(inserts, ((Long) filterCacheStats.getStatistics().get(\"inserts\")).longValue() );\n assertEquals(hits, ((Long) filterCacheStats.getStatistics().get(\"hits\")).longValue() );\n\n // retry the complex FQ and make sure hashCode/equals works as expected w/ filter queries\n assertJQ(req(\"q\",\"*:* doesnotexist5\", \"fq\",\"(id:* +(filter(id:1) filter(qqq_s:X) filter(abcdefg)) )\")\n ,\"/response/numFound==2\"\n );\n\n hits+=1; // top-level fq should have been found.\n assertEquals(inserts, ((Long) filterCacheStats.getStatistics().get(\"inserts\")).longValue() );\n assertEquals(hits, ((Long) filterCacheStats.getStatistics().get(\"hits\")).longValue() );\n\n\n // try nested filter with multiple top-level args (i.e. a boolean query)\n assertJQ(req(\"q\",\"*:* +filter(id:1 filter(qqq_s:X) abcdefg)\")\n ,\"/response/numFound==2\"\n );\n\n hits+=1; // the inner filter\n inserts+=1; // the outer filter\n assertEquals(inserts, ((Long) filterCacheStats.getStatistics().get(\"inserts\")).longValue() );\n assertEquals(hits, ((Long) filterCacheStats.getStatistics().get(\"hits\")).longValue() );\n\n // test the score for a filter, and that default score is 0\n assertJQ(req(\"q\",\"+filter(*:*) +filter(id:1)\", \"fl\",\"id,score\", \"sort\",\"id asc\")\n ,\"/response/docs/[0]/score==0.0\"\n );\n\n assertJQ(req(\"q\",\"+filter(*:*)^=10 +filter(id:1)\", \"fl\",\"id,score\", \"sort\",\"id asc\")\n ,\"/response/docs/[0]/score==10.0\" \n );\n\n }", "public ZSelectionDeleteHandler(ZCanvas aFilteredKeyEventSouce) {\n super(null, aFilteredKeyEventSouce);\n fListenerList = new EventListenerList();\n }", "public SearchBooksBean() {\r\n \t\tclearFilter();\r\n \t}", "@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuery<Long> criteriaQueryCount = cb.createQuery(Long.class);\r\n Root<T> entity = criteriaQuery.from(T);\r\n criteriaQueryCount.select(cb.count(entity));\r\n criteriaQuery.select(entity);\r\n \r\n // collect all filters relevant for affected entity\r\n List<Object> filters = new ArrayList<Object>();\r\n getPreFilters(filters, T, filter);\r\n \r\n filters.add(filter);\r\n List<Hint> hints = new ArrayList<Hint>();\r\n \r\n if (!filters.isEmpty()) {\r\n List<Predicate> filterPredicates = new ArrayList<Predicate>();\r\n for (Object queryCriteria : filters) {\r\n \r\n List<Predicate> orPredicates = new ArrayList<Predicate>();\r\n List<Predicate> andPredicates = new ArrayList<Predicate>();\r\n FilterContextImpl<T> filterContext = new FilterContextImpl<T>(entity, criteriaQuery, getEm(), queryCriteria);\r\n hints.addAll(filterContext.getHints());\r\n \r\n List<Field> fields = AbstractFilteringRepository.getInheritedPrivateFields(queryCriteria.getClass());\r\n for (Field field : fields) {\r\n // I want to skip static fields and fields which are cared of in different(specific way)\r\n if (!Modifier.isStatic(field.getModifiers()) && !ignoredFields.contains(field.getName())) {\r\n if (!field.isAccessible()) {\r\n field.setAccessible(true);\r\n }\r\n \r\n /**\r\n * Determine field path\r\n */\r\n // anottaion specified path has always highest priority, so is processed in the first place processing\r\n FieldPath fieldPathAnnotation = field.getAnnotation(FieldPath.class);\r\n Field f;\r\n if (fieldPathAnnotation != null && StringUtils.isNotBlank(fieldPathAnnotation.value())) {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(fieldPathAnnotation.value(), FieldPath.FIELD_PATH_SEPARATOR), true);\r\n } else {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(field.getName(), StructuredPathFactory.FILTER_PATH_SEPARATOR), true);\r\n }\r\n \r\n // tries to find CustmoProcessor annotation or some annotation metaannotated by custom processor\r\n CustomProcessor processor = field.getAnnotation(CustomProcessor.class);\r\n if (processor == null) {\r\n processor = getMetaAnnotation(CustomProcessor.class, field);\r\n }\r\n \r\n ProcessorContext<T> processorContext = filterContext.getProcessorContext(andPredicates, orPredicates, field);\r\n Object filterFieldValue = getFilterFieldValue(field, queryCriteria);\r\n if (processor == null && f != null) {\r\n processTypes(filterFieldValue, processorContext);\r\n // If field is not pressent in Entity, it needs special care\r\n } else {\r\n Class<CustomFieldProcessor<T, ?>> processorClass = null;\r\n if (processor != null) {\r\n processorClass = (Class<CustomFieldProcessor<T, ?>>) processor.value();\r\n processCustomFields(filterFieldValue, processorContext, processorClass);\r\n } else {\r\n if (!processCustomTypes(filterFieldValue, processorContext)) {\r\n if (shouldCheck(processorContext.getField())) {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" wasn't handled. \");\r\n throw new UnsupportedOperationException(\"Custom filter fields not supported in \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \", required field: \" + processorContext.getField().getName());\r\n } else {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" marked with @Unchecked annotation wasn't handled. \");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!andPredicates.isEmpty() || !orPredicates.isEmpty()) {\r\n Predicate filterPredicate = null;\r\n if (!andPredicates.isEmpty()) {\r\n Predicate andPredicate = cb.and(andPredicates.toArray(new Predicate[1]));\r\n filterPredicate = andPredicate;\r\n }\r\n if (!orPredicates.isEmpty()) {\r\n Predicate orPredicate = cb.or(orPredicates.toArray(new Predicate[1]));\r\n if (filterPredicate != null) {\r\n filterPredicate = cb.and(filterPredicate, orPredicate);\r\n } else {\r\n filterPredicate = orPredicate;\r\n }\r\n }\r\n filterPredicates.add(filterPredicate);\r\n }\r\n }\r\n if (!filterPredicates.isEmpty()) {\r\n Predicate finalPredicate = cb.and(filterPredicates.toArray(new Predicate[1]));\r\n criteriaQuery.where(finalPredicate);\r\n criteriaQueryCount.where(finalPredicate);\r\n }\r\n }\r\n \r\n \r\n TypedQuery<T> query = getEm().createQuery(criteriaQuery);\r\n TypedQuery<Long> queryCount = getEm().createQuery(criteriaQueryCount);\r\n if (filter != null && filter.getPageSize() > 0) {\r\n query = query.setFirstResult(filter.getOffset());\r\n query = query.setMaxResults(filter.getPageSize());\r\n }\r\n // add hints\r\n if (!hints.isEmpty()) {\r\n for (Hint hint : hints) {\r\n query.setHint(hint.getName(), hint.getValue());\r\n queryCount.setHint(hint.getName(), hint.getValue());\r\n }\r\n }\r\n \r\n \r\n PageImpl<T> result = new PageImpl<T>(query.getResultList(), filter, queryCount.getSingleResult().intValue());\r\n return result;\r\n }", "public boolean isDeleted();", "public void clearFilters() {\n // TODO [assignment_final] vycisteni aktualne nastavenych filtru\n }", "public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }", "public void filterTable(String filter) {\n\t\tif (fullBackup.isEmpty() || fullBackup == null) {\n\t\t\tfullBackup.addAll(list);\n\t\t}\n\n\t\t// always clear selected items\n\t\tselectionModel.clear();\n\t\tlist.clear();\n\n\t\tif (filter.equalsIgnoreCase(\"\")) {\n\t\t\tlist.addAll(fullBackup);\n\t\t} else {\n\t\t\tfor (Attribute attr : fullBackup){\n\t\t\t\t// store facility by filter\n\t\t\t\tif (attr.getFriendlyName().toLowerCase().startsWith(filter.toLowerCase())) {\n\t\t\t\t\tlist.add(attr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t\tloaderImage.loadingFinished();\n\n\t}", "public void resetFilter() {\n filters.clear();\n modifiedSinceLastResult = true;\n }", "@Override\n\tpublic boolean shouldFilter() {\n\t\treturn true;\n\t}", "public Set<Filterable> getSelections();", "Ack deleteFilter(ID branchId, String name);", "@Override\n protected void updateEliminations() {\n\n }", "public void clear() {\n \tsuper.clear();\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void deleteResults(){\n }", "public FilterData() {\n }", "public Filter () {\n\t\tsuper();\n\t}", "public java.lang.Boolean getDeleted();", "private boolean updateFilter() {\n \tList<Rankable> items = rankings.getRankings();\n \tHashSet<String> hashtags = new HashSet<String>();\n \t\n \tfor (Rankable item: items) {\n \thashtags.add((String)item.getObject());\n }\n \t\n \n \t\n \tfor(String word: initialWords){\n \t\thashtags.add(word);\n \t}\n \n \tif(filter.equals(hashtags)){\n \t\treturn false;\n \t} else {\n \t\tfilter = hashtags;\n \t\treturn true;\n \t}\n \n\t\t\n\t}", "private void updateFilter(BasicOutputCollector collector) {\n if (updateFilter()){\n \tValues v = new Values();\n v.add(ImmutableList.copyOf(filter));\n \n collector.emit(\"filter\",v);\n \t\n }\n \n \n \n }", "private Set<Integer> filterSelectionUnit() {\n singlefilter = false;\n Map<Integer, Integer> dsCounter = new HashMap<>();\n int counter = 0;\n for (DatasetPieChartFilter filter : filtersSet.values()) {\n if (filter.isActiveFilter()) {\n counter++;\n }\n\n filter.getSelectedDsIds().stream().map((id) -> {\n if (!dsCounter.containsKey(id)) {\n dsCounter.put(id, 0);\n }\n return id;\n }).forEach((id) -> {\n dsCounter.put(id, dsCounter.get(id) + 1);\n });\n\n }\n Set<Integer> finalSelectionIds = new HashSet<>();\n dsCounter.keySet().stream().filter((dsId) -> (dsCounter.get(dsId) == 6)).forEach((dsId) -> {\n finalSelectionIds.add(dsId);\n });\n if (counter == 1) {\n singlefilter = true;\n }\n\n return finalSelectionIds;\n\n }", "public interface SharedWorkAreaFilter extends Filter {\n\n /**\n * @param userName\n */\n public void setUserName(String userName);\n \n /**\n * @return userName\n */\n public String getUserName();\n \n /**\n * @param firstName\n */\n public void setFirstName(String firstName);\n \n /**\n * @return First Name\n */\n public String getFirstName();\n \n /**\n * @param lastName\n */\n public void setLastName(String lastName);\n \n /**\n * @return Last Name\n */\n public String getLastName();\n \n /**\n * @param primaryDispatchCenter\n */\n public void setPrimaryDispatchCenter(String primaryDispatchCenter);\n \n /**\n * @return Primary Dispatch Center\n */\n public String getPrimaryDispatchCenter();\n \n /**\n * @param primaryOrganization\n */\n public void setPrimaryOrganization(String primaryOrganization);\n \n /**\n * @return Primary Organization\n */\n public String getPrimaryOrganization();\n \n /**\n * @return the {@link Collection} of roleVoIds\n */\n public Collection<Integer> getRoleVoIds();\n\n /**\n * @param roleVoIds the {@link Collection} of roleVoIds to set\n */\n public void setRoleVoIds(Collection<Integer> roleVoIds);\n \n public Collection<Long> getRoleVoIdsFromIntegers() throws Exception;\n \n /**\n\t * @param sharedUsers the sharedUsers to set\n\t */\n\tpublic void setSharedUsers(Boolean sharedUsers);\n\t\n\t/**\n\t * @return the sharedUsers\n\t */\n\tpublic Boolean getSharedUsers();\n}", "@Override\n \t\t\t\tpublic boolean isDeleted() {\n \t\t\t\t\treturn false;\n \t\t\t\t}", "protected AbstractJoSQLFilter ()\n {\n\n }", "public interface TransactionBatchFilter {\n\n /**\n * Filters transaction\n *\n * @param transactionBatch Iroha transaction batch\n * @return true - if the transaction should be processed, false - otherwise\n */\n boolean filter(TransactionBatch transactionBatch);\n\n}", "MapComp<K, V> removeAll(Predicate<K> p);", "public Hashtable getFilters() {\n // we need to build the hashtable dynamically\n return globalFilterSet.getFilterHash();\n }", "void setSampleFiltering(boolean filterFlag, float cutoffFreq) {\n }", "public Filter() {\n }", "public abstract Filter<T> filter();", "private final void clearTRFilter() {\r\n\t\tadvanceFilterTRModel.setObjIdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAirplaneModelFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjTypeFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjNoFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjHeadingFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjTextFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAssumptionFilter(\"\");\r\n\t\tadvanceFilterTRModel.setOwnerFilter(\"\");\r\n\t\tadvanceFilterTRModel.setDeviationsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setModifiedAplicableFilter(\"\");\r\n\t\tadvanceFilterTRModel.setExpReqMtPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAssgndToAssyPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAssgndToFTPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setFocalFilter(\"\");\r\n\t\tadvanceFilterTRModel.setStsAssmblyPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqFirstFlightFilter(\"\");\r\n\t\tadvanceFilterTRModel.setRationaleForFunctionFilter(\"\");\r\n\t\tadvanceFilterTRModel.setFuncExcepFilter(\"\");\r\n\t\tadvanceFilterTRModel.setFunctionFilter(\"\");\r\n\t\tadvanceFilterTRModel.setApplicableDAASystemsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setDevAssurApplicableFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAllocationsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setTraceReqmtsIDFilter(\"\");\r\n\t\tadvanceFilterTRModel.setDervdReqmtsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setScdChildFilter(\"\");\r\n\t\tadvanceFilterTRModel.setRationaleforDerivedreqmtsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt8reqdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt8verfCloseOutFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt9reqdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt9verfCloseOutFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt7reqdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt7verfCloseOutFilter(\"\");\r\n\t\tadvanceFilterTRModel.setEstWorkFilter(\"\");\r\n\t\tadvanceFilterTRModel.setStatusWithSEFilter(\"\");\r\n\t\tadvanceFilterTRModel.setLinkStatusTRFilter(\"\");\r\n\t\tadvanceFilterTRModel.setMinorModFilter(\"\");\r\n\t\twsrdUtilController.pageSize((long) 0);\r\n\t\twsrdUtilController.getPageNumberByList();\r\n\t}", "public void deselectAll()\n {\n }", "public void setRemove(Boolean newValue);", "@Override\n public void clear() {\n original.clear();\n filtered.clear();\n notifyDataSetChanged();\n }", "public ActionCriteria getUsageFilter() {\n\t\treturn usageFilter;\n\t}", "void filterDelete(ServerContext context, DeleteRequest request,\n ResultHandler<Resource> handler, RequestHandler next);", "public Set getDeleted() {\r\n return Collections.unmodifiableSet(deleted);\r\n }", "public void Filter(LocalDateTime filterDate)\r\n {\r\n Iterator<ServiceRecord> iterator = this.records.iterator();\r\n ServiceRecord current = null;\r\n \r\n //Service records are organized in chronological order, so we can simply traverse\r\n //and remove records while they are less than or equal to the filter date.\r\n while (iterator.hasNext() && (Utilities.IsWithinDate((current = iterator.next()).GetCurrentDateTime(), filterDate)))\r\n {\r\n iterator.remove(); //Remove the record from the main disk.\r\n \r\n ServiceRecordList member = this.GetServiceList(this.recordsByMemberNum, current.GetMemberNumber());\r\n ServiceRecordList provider = this.GetServiceList(this.recordsByProviderNum, current.GetProviderNumber());\r\n \r\n //Remove the record from the corresponding member's and provider's service records, if it exists\r\n member.RemoveServiceRecord(current);\r\n provider.RemoveServiceRecord(current);\r\n }\r\n }", "protected void setFilterInMapChanged() {\n rowCount = null;\n }", "private void setUpFilter() {\n List<Department> departmentsList = departmentService.getAll(0, 10000);\n departments.setItems(departmentsList);\n departments.setItemLabelGenerator(Department::getDepartment_name);\n departments.setValue(departmentsList.get(0));\n category.setItems(\"Consumable\", \"Asset\", \"%\");\n category.setValue(\"%\");\n status.setItems(\"FREE\", \"IN USE\", \"%\");\n status.setValue(\"%\");\n show.addClickListener(click -> updateGrid());\n }", "public Boolean getDeleted() {\n return deleted;\n }", "@Override\r\n\t public Filter getFilter() {\n\t return null;\r\n\t }", "private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n if (matchesFilter(p)) {\n \tmainApp.getFilteredData().add(p);\n }\n }\n }", "void setFilter(Filter f);", "FeatureHolder filter(FeatureFilter filter);", "public int sizeFilter() {\n\t\treturn this.size(FILTER);\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tSystem.out.println(\"FirstFilter::destroy\");\r\n\t}", "@Override\n\tpublic boolean preDelete() {\n\t\treturn false;\n\t}", "@Override\npublic void setup(TableRefFilterContext context) {\n\t\n}", "void filterDisposed(Filter filter);", "@After\n public void tearDown() {\n for (Filter filter : filterService.createTaskFilterQuery().list()) {\n filterService.deleteFilter(filter.getId());\n }\n }", "boolean hasDelete();", "boolean hasDelete();" ]
[ "0.6466778", "0.6164823", "0.59751785", "0.5961166", "0.59257674", "0.5890892", "0.58385956", "0.57923496", "0.5743751", "0.5604553", "0.5601836", "0.5593092", "0.55881834", "0.55698466", "0.55698466", "0.5559448", "0.5557023", "0.5508923", "0.54852426", "0.5480784", "0.5468002", "0.5455888", "0.5439473", "0.5432833", "0.5432292", "0.5414002", "0.54000396", "0.5395677", "0.5375664", "0.5347246", "0.53305227", "0.5329721", "0.532515", "0.5310801", "0.53003293", "0.5294944", "0.5291413", "0.52880836", "0.52847576", "0.5280822", "0.52720314", "0.5260752", "0.52605236", "0.5247952", "0.5244664", "0.52435565", "0.52377695", "0.5237097", "0.52283084", "0.5226902", "0.5217097", "0.52134067", "0.52114975", "0.518657", "0.5181225", "0.51799756", "0.5173447", "0.5169568", "0.5166012", "0.51602167", "0.51597685", "0.514574", "0.5140505", "0.51365864", "0.5115883", "0.5115251", "0.51122266", "0.51116", "0.5102334", "0.5100036", "0.50983995", "0.5096073", "0.5095276", "0.50895554", "0.5085288", "0.5076958", "0.50676036", "0.5063641", "0.50572556", "0.50538284", "0.5045999", "0.5043204", "0.50396264", "0.50333035", "0.50189734", "0.5018737", "0.50171673", "0.50135964", "0.50109994", "0.5008587", "0.5006681", "0.5005763", "0.500246", "0.499854", "0.49945575", "0.49912107", "0.498612", "0.49821597", "0.4981222", "0.49808493", "0.49808493" ]
0.0
-1
/ wanyi.cpp Created on: 20121110 Author: 7
public static int Main() { int[] x = new int[1000]; int[] y = new int[1000]; char a; int i = 0; int j; int num = 0; int max = 0; int n; int minx = 10000; int maxy = 0; while ((x[i] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true))).length() > 0) { if (x[i] < minx) { minx = x[i]; } i++; cin.get(a); if (a == '\n') { break; } } n = i; i = 0; while ((y[i] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true))).length() > 0) { if (y[i] > maxy) { maxy = y[i]; } i++; cin.get(a); if (a == '\n' || i > n) { break; } } for (i = minx;i < maxy;i++) { for (j = 0;j < n;j++) { if (i >= x[j] != 0 && i < y[j]) { num++; if (num > max) { max = num; } } } num = 0; } System.out.print(n); System.out.print(" "); System.out.print(max); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "public static void hvitetest1w(){\r\n\t}", "void mo57278c();", "void mo1940i();", "public void mo21785J() {\n }", "void mo67924c();", "public void mo38117a() {\n }", "public void mo21784I() {\n }", "public void mo21783H() {\n }", "void mo57277b();", "public void mo97908d() {\n }", "private void strin() {\n\n\t}", "public void mo6081a() {\n }", "void mo88524c();", "private void kk12() {\n\n\t}", "public void mo21779D() {\n }", "void mo41086b();", "void mo27575a();", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "void mo41083a();", "public void mo3376r() {\n }", "void mo21072c();", "public void mo55254a() {\n }", "public void mo21794S() {\n }", "public void mo21877s() {\n }", "void mo71b();", "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 mo21825b() {\n }", "public void mo21786K() {\n }", "void mo80457c();", "public void mo5382o() {\n }", "public void mo9241ay() {\n }", "public void mo21781F() {\n }", "public void mo9848a() {\n }", "void mo17012c();", "public void mo12628c() {\n }", "void mo21073d();", "public void furyo ()\t{\n }", "public abstract String mo41086i();", "public void mo21793R() {\n }", "void mo80455b();", "void mo119581a();", "void mo21076g();", "void mo17021c();", "public void mo21791P() {\n }", "public void mo12930a() {\n }", "public void mo97906c() {\n }", "public void mo21780E() {\n }", "public void mo21787L() {\n }", "void mo60893b();", "void mo72113b();", "void mo119582b();", "void mo21070b();", "public void mo21789N() {\n }", "void mo72114c();", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "void mo12638c();", "public void mo2471e() {\n }", "void mo5018b();", "private stendhal() {\n\t}", "void mo4833b();", "public void mo3749d() {\n }", "void mo57275a();", "public void mo21878t() {\n }", "void mo1501h();", "@Override\n\tpublic void w() {\n\n\t}", "public void mo2470d() {\n }", "public void mo5248a() {\n }", "public void mo115190b() {\n }", "void mo10148a();", "public void mo9233aH() {\n }", "protected void mo6255a() {\n }", "public void mo2740a() {\n }", "void mo28306a();", "public abstract void mo27385c();", "public void mo21792Q() {\n }", "public abstract String mo9239aw();", "static void feladat9() {\n\t}", "void mo17013d();", "public Wingweaver(){\n super(\"Wingweaver\",7,2750,2400,\"n\",5,3);\n }", "public void mo5097b() {\n }", "void mo17023d();", "void mo88521a();", "public abstract void mo2624j();", "public void mo115188a() {\n }", "int mo27480a();", "void mo37810a();", "public void mo9137b() {\n }", "void mo21074e();", "public void mo21795T() {\n }", "void mo80452a();", "void mo54405a();", "public void method_4270() {}" ]
[ "0.6371275", "0.63628775", "0.6332236", "0.63242954", "0.63171047", "0.63112676", "0.63076335", "0.6274632", "0.62714034", "0.62551796", "0.6251298", "0.6244713", "0.6229502", "0.62244946", "0.622312", "0.6215881", "0.62003917", "0.61854416", "0.6182794", "0.6174523", "0.61723095", "0.615859", "0.6151754", "0.61237854", "0.6119138", "0.6117217", "0.6104089", "0.61032325", "0.61032325", "0.61032325", "0.61032325", "0.61032325", "0.61032325", "0.61032325", "0.60834867", "0.6080365", "0.60800177", "0.6076365", "0.60740066", "0.606952", "0.6062438", "0.60614395", "0.6060465", "0.60604364", "0.6049751", "0.6045621", "0.6035602", "0.60355616", "0.6031846", "0.6027245", "0.60249084", "0.602339", "0.6022878", "0.6019688", "0.6019013", "0.60173404", "0.6010401", "0.60099995", "0.59956473", "0.59941757", "0.5985794", "0.5984931", "0.5982557", "0.59785676", "0.59755844", "0.59625566", "0.59614843", "0.59576386", "0.59526163", "0.5947097", "0.5945652", "0.593192", "0.59269625", "0.5923112", "0.59212834", "0.591818", "0.5916751", "0.59123605", "0.5908244", "0.5896574", "0.5883634", "0.5883314", "0.58829236", "0.5882101", "0.5879641", "0.5877979", "0.5877717", "0.58761746", "0.58738345", "0.5865698", "0.5861722", "0.58591056", "0.58536637", "0.58471197", "0.58426285", "0.58423483", "0.58390814", "0.58350766", "0.58348405", "0.5834832", "0.5832907" ]
0.0
-1
Construct an Equation Data Structure from a file
public EqDS_DSPFFD(String file, EquationStandardSession session) { super(file, 37); this.file = file; setUp(session); // final setup initialDefaultValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, Equation> compile(File file) throws IOException;", "Map<String, Equation> compile(InputStream stream) throws IOException;", "public interface EquationFactory {\n\n /**\n * Creates a new ready-to-use data structure from configuration file\n *\n * @param file the configuration\n *\n * @return a map between group and the equation of the particular group\n *\n * @throws IOException if any IO errors occur.\n */\n Map<String, Equation> compile(File file) throws IOException;\n\n /**\n * Creates a new ready-to-use data structure from input stream\n *\n * @param stream the stream configuration\n *\n * @return a map between group and the equation of the particular group\n *\n * @throws IOException if any IO errors occur.\n */\n Map<String, Equation> compile(InputStream stream) throws IOException;\n\n}", "public IGraph<String,Double> read(String filename) throws FileNotFoundException, IOException {\n // Open the file\n Graph r = new Graph;\n INode n = r.nodeMaker(value);\n INode s = new Node;\n INode d = new Node;\n double w;\n\n\n\n BufferedReader br = new BufferedReader(new FileReader(filename));\n String st;\n char col;\n while ((st = br.readLine()) != null) {\n String[] var = s.split(\":\");\n s = (V) var[0];\n d = (V) var[1];\n w = (double) var[2];\n r.addNode(s);\n r.addNode(d);\n r.addEdge(s, d, w);\n\n }\n\n // Parse the lines. If a line does not have exactly 3 fields, ignore the line\n // For each line, add the nodes and edge\n //How many feilds and what is in each fields\n //After i have the right fields, need make nodes, weights, and add to graphs\n //...making nodes could be tricky... Could get multiple nodes with the same value\n\n // Return the graph instance\n return r;\n }", "private Program02(String fileName) {\n BinaryTree bt = new BinaryTree();\n Stack expression = new Stack();\n\n try {\n Scanner scanner = new Scanner(new File(fileName));\n\n while (scanner.hasNext()) {\n String curChar = scanner.next();\n expression.push(curChar);\n }\n\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n Node tree = createLevelOrder(expression, bt.getRoot(), 0, expression.length());\n\n // construct a binary tree to store parsed math expression\n bt.setRoot(tree);\n printInfo(bt);\n }", "public Vector loadAffyGCOSExpressionFile(File f) throws IOException {\r\n \tthis.setTMEVDataType();\r\n final int preSpotRows = this.sflp.getXRow()+1;\r\n final int preExperimentColumns = this.sflp.getXColumn();\r\n int numLines = this.getCountOfLines(f);\r\n int spotCount = numLines - preSpotRows;\r\n\r\n if (spotCount <= 0) {\r\n JOptionPane.showMessageDialog(superLoader.getFrame(), \"There is no spot data available.\", \"TDMS Load Error\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n \r\n int[] rows = new int[] {0, 1, 0};\r\n int[] columns = new int[] {0, 1, 0};\r\n //String value,pvalue;\r\n String detection;\r\n\r\n float cy3, cy5;\r\n\r\n String[] moreFields = new String[1];\r\n String[] extraFields=null;\r\n final int rColumns = 1;\r\n final int rRows = spotCount;\r\n \r\n ISlideData slideDataArray[]=null;\r\n AffySlideDataElement sde=null;\r\n FloatSlideData slideData=null;\r\n \r\n BufferedReader reader = new BufferedReader(new FileReader(f));\r\n StringSplitter ss = new StringSplitter((char)0x09);\r\n String currentLine;\r\n int counter, row, column,experimentCount=0;\r\n counter = 0;\r\n row = column = 1;\r\n this.setFilesCount(1);\r\n this.setRemain(1);\r\n this.setFilesProgress(0);\r\n this.setLinesCount(numLines);\r\n this.setFileProgress(0);\r\n float[] intensities = new float[2];\r\n \r\n while ((currentLine = reader.readLine()) != null) {\r\n if (stop) {\r\n return null;\r\n }\r\n// fix empty tabbs appending to the end of line by wwang\r\n while(currentLine.endsWith(\"\\t\")){\r\n \tcurrentLine=currentLine.substring(0,currentLine.length()-1);\r\n }\r\n ss.init(currentLine);\r\n \r\n if (counter == 0) { // parse header\r\n \t\r\n \tif(sflp.onlyIntensityRadioButton.isSelected()) \r\n \t\texperimentCount = ss.countTokens()- preExperimentColumns;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/2;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/3;\r\n \t\r\n \t\r\n \tslideDataArray = new ISlideData[experimentCount];\r\n \tSampleAnnotation sampAnn=new SampleAnnotation();\r\n \tslideDataArray[0] = new SlideData(rRows, rColumns, sampAnn);//Added by Sarita to include SampleAnnotation model.\r\n \r\n slideDataArray[0].setSlideFileName(f.getPath());\r\n for (int i=1; i<experimentCount; i++) {\r\n \tsampAnn=new SampleAnnotation();\r\n \tslideDataArray[i] = new FloatSlideData(slideDataArray[0].getSlideMetaData(),spotCount, sampAnn);//Added by Sarita \r\n \tslideDataArray[i].setSlideFileName(f.getPath());\r\n \t//System.out.println(\"slideDataArray[i].slide file name: \"+ f.getPath());\r\n }\r\n if(sflp.onlyIntensityRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[1];\r\n \t//extraFields = new String[1];\r\n \tfieldNames[0]=\"AffyID\";\r\n \tslideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[2];\r\n \textraFields = new String[1];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else{\r\n \tString [] fieldNames = new String[3];\r\n \textraFields = new String[2];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n fieldNames[2]=\"P-value\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n \r\n }\r\n ss.nextToken();//parse the blank on header\r\n for (int i=0; i<experimentCount; i++) {\r\n \tString val=ss.nextToken();\r\n\t\t\t\t\tslideDataArray[i].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\tslideDataArray[i].getSampleAnnotation().setAnnotation(\"Default Slide Name\", val);\r\n\t\t\t\t\tslideDataArray[i].setSlideDataName(val);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.mav.getData().setSampleAnnotationLoaded(true);\r\n\t\t\t \t \r\n if(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection\r\n ss.nextToken();//parse the pvalue\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection \r\n } \r\n }\r\n \r\n } else if (counter >= preSpotRows) { // data rows\r\n \trows[0] = rows[2] = row;\r\n \tcolumns[0] = columns[2] = column;\r\n \tif (column == rColumns) {\r\n \t\tcolumn = 1;\r\n \t\trow++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t} else {\r\n \t\tcolumn++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t}\r\n\r\n \t//affy ID\r\n \tmoreFields[0] = ss.nextToken();\r\n \r\n \t\r\n \t\r\n String cloneName = moreFields[0];\r\n if(_tempAnno.size()!=0) {\r\n \t \r\n \t \t \r\n \t if(((MevAnnotation)_tempAnno.get(cloneName))!=null) {\r\n \t\t MevAnnotation mevAnno = (MevAnnotation)_tempAnno.get(cloneName);\r\n\r\n \t\t sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields, mevAnno);\r\n \t }else {\r\n \t /**\r\n \t * Sarita: clone ID explicitly set here because if the data file\r\n \t * has a probe (for eg. Affy house keeping probes) for which Resourcerer\r\n \t * does not have annotation, MeV would still work fine. NA will be\r\n \t * appended for the rest of the fields. \r\n \t * \r\n \t * \r\n \t */\r\n \t\tMevAnnotation mevAnno = new MevAnnotation();\r\n \t\tmevAnno.setCloneID(cloneName);\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields, mevAnno);\r\n \t \t\t \r\n }\r\n }\r\n /* Added by Sarita\r\n * Checks if annotation was loaded and accordingly use\r\n * the appropriate constructor.\r\n * \r\n * \r\n */\r\n \r\n else {\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields);\r\n }\r\n \r\n \t\r\n \t//sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields);\r\n\r\n \tslideDataArray[0].addSlideDataElement(sde);\r\n \tint i=0;\r\n\r\n \tfor ( i=0; i<slideDataArray.length; i++) { \r\n \t\ttry {\t\r\n\r\n \t\t\t// Intensity\r\n \t\t\tintensities[0] = 1.0f;\r\n \t\t\tintensities[1] = ss.nextFloatToken(0.0f);\r\n \t\t\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t\textraFields[1]=ss.nextToken();//p-value\r\n \t\t\t\t\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t}\r\n\r\n \t\t} catch (Exception e) {\r\n \t\t\t\r\n \t\t\tintensities[1] = Float.NaN;\r\n \t\t}\r\n \t\tif(i==0){\r\n \t\t\t\r\n \t\t\tslideDataArray[i].setIntensities(counter - preSpotRows, intensities[0], intensities[1]);\r\n \t\t\t//sde.setExtraFields(extraFields);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t\tsde.setPvalue(new Float(extraFields[1]).floatValue());\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t}\r\n \t\t}else{\r\n \t\t\tif(i==1){\r\n \t\t\t\tmeta = slideDataArray[0].getSlideMetaData(); \t\r\n \t\t\t}\r\n \t\t\tslideDataArray[i].setIntensities(counter-preSpotRows,intensities[0],intensities[1]);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setPvalue(counter-preSpotRows,new Float(extraFields[1]).floatValue());\r\n \t\t\t}\r\n \t\t\tif(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n } else {\r\n //we have additional sample annoation\r\n \r\n \tfor (int i = 0; i < preExperimentColumns - 1; i++) {\r\n\t\t\t\t\tss.nextToken();\r\n\t\t\t\t}\r\n\t\t\t\tString key = ss.nextToken();\r\n\r\n\t\t\t\tfor (int j = 0; j < slideDataArray.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(slideDataArray[j].getSampleAnnotation()!=null){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString val=ss.nextToken();\r\n\t\t\t\t\t\tslideDataArray[j].getSampleAnnotation().setAnnotation(key, val);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tSampleAnnotation sampAnn=new SampleAnnotation();\r\n\t\t\t\t\t\t\tsampAnn.setAnnotation(key, ss.nextToken());\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotation(sampAnn);\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n \t}\r\n \t\r\n this.setFileProgress(counter);\r\n \tcounter++;\r\n \t//System.out.print(counter);\r\n \t}\r\n reader.close();\r\n \r\n \r\n Vector data = new Vector(slideDataArray.length);\r\n \r\n for(int j = 0; j < slideDataArray.length; j++)\r\n \tdata.add(slideDataArray[j]);\r\n \r\n this.setFilesProgress(1);\r\n return data;\r\n }", "void readData(String fileName){ \r\n\t\ttry{ \r\n\t\t\tScanner sc = new Scanner(new File(fileName), \"UTF-8\");\r\n\t\t\t\r\n\t\t\t// input grid dimensions and simulation duration in timesteps\r\n\t\t\tdimt = sc.nextInt();\r\n\t\t\tdimx = sc.nextInt(); \r\n\t\t\tdimy = sc.nextInt();\r\n\t\t\t//System.out.println(dimt+\" \"+dimx + \" \"+dimy);\r\n\t\t\t// initialize and load advection (wind direction and strength) and convection\r\n\t\t\tadvection = new Vector[dimt][dimx][dimy];\r\n\t\t\tconvection = new float[dimt][dimx][dimy];\r\n\t\t\tfor(int t = 0; t < dimt; t++)\r\n\t\t\t\tfor(int x = 0; x < dimx; x++)\r\n\t\t\t\t\tfor(int y = 0; y < dimy; y++){\r\n\t\t\t\t\t\tadvection[t][x][y] = new Vector();\r\n\t\t\t\t\t\tadvection[t][x][y].x = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tadvection[t][x][y].y = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tconvection[t][x][y] = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\t//System.out.println(advection[t][x][y].x+\" \"+advection[t][x][y].y + \" \"+convection[t][x][y]);\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\tclassification = new int[dimt][dimx][dimy];\r\n\t\t\tsc.close(); \r\n\t\t} \r\n\t\tcatch (IOException e){ \r\n\t\t\tSystem.out.println(\"Unable to open input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (InputMismatchException e){ \r\n\t\t\tSystem.out.println(\"Malformed input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static ArrayList<Data> getDataSet(String fileName) {\n ArrayList<Data> dataset = new ArrayList<>();\n Scanner input = new Scanner(Main.class.getResourceAsStream(fileName));\n input.nextLine();\n String line = null;\n int size = 0;\n\n while (input.hasNextLine()) {\n String str = null;\n\n line = input.nextLine();\n line = line.replace(\" \", \"\");\n\n size = line.length() - 1;\n Data data = new Data(size);\n\n for (int i = 0; i < line.length() - 1; i++) {\n data.variables[i] = Character.getNumericValue(line.charAt(i));\n }\n data.setOutput(Character.getNumericValue(line.charAt(size)));\n\n dataset.add(data);\n }\n\n dataset.forEach((data) -> {\n System.out.println(data.printVariables() + \" \" + data.getOutput());\n });\n System.out.println(\"Data loaded\");\n COND_LEN = size;\n GENE_SIZE = (COND_LEN + 1) * NUM_RULES;\n return dataset;\n }", "Graph<V,E> load(String filename);", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ObjModel(File file) throws FileNotFoundException {\r\n\r\n\t\tvertices = new ArrayList<>();\r\n\t\ttextureCoordinates = new ArrayList<>();\r\n\t\tfaces = new ArrayList<>();\r\n\r\n\t\tScanner scanner = new Scanner(file);\r\n\r\n\t\twhile (scanner.hasNextLine()) {\r\n\t\t\tString[] line = scanner.nextLine().split(\" \");\r\n\t\t\tif (line[0].equals(\"v\")) {\r\n\t\t\t\tfloat x = Float.parseFloat(line[1]);\r\n\t\t\t\tfloat y = Float.parseFloat(line[2]);\r\n\t\t\t\tfloat z = Float.parseFloat(line[3]);\r\n\t\t\t\tvertices.add(new Vector3f(x, y, z));\r\n\t\t\t} else if (line[0].equals(\"vt\")) {\r\n\t\t\t\tfloat x = Float.parseFloat(line[1]);\r\n\t\t\t\tfloat y = Float.parseFloat(line[2]);\r\n\t\t\t\ttextureCoordinates.add(new Vector3f(x, y));\r\n\t\t\t} else if (line[0].equals(\"f\")) {\r\n\t\t\t\tFace face = new Face();\r\n\t\t\t\tfor (int i = 1; i < line.length; i++) {\r\n\t\t\t\t\tString[] sections = line[i].split(\"/\");\r\n\t\t\t\t\tif (sections.length >= 1) {\r\n\t\t\t\t\t\tint vertex = Integer.parseInt(sections[0]);\r\n\t\t\t\t\t\tface.addVertex(vertex);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (sections.length >= 2) {\r\n\t\t\t\t\t\tint textureCoordinate = Integer.parseInt(sections[1]);\r\n\t\t\t\t\t\tface.addTextureCoordinate(textureCoordinate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfaces.add(face);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscanner.close();\r\n\t}", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "public static void readfile() {\r\n\t\t// read input file\r\n\t\ttry {\r\n\t\t File inputObj = new File(\"input.txt\");\r\n\t\t Scanner inputReader = new Scanner(inputObj);\r\n\t\t int i = 0;\r\n\t\t while (inputReader.hasNextLine()) {\r\n\t\t String str = inputReader.nextLine();\r\n\t\t str = str.trim();\r\n\t\t if(i == 0) {\r\n\t\t \tnumQ = Integer.parseInt(str);\r\n\t\t \torign_queries = new String[numQ];\r\n\t\t \t//queries = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(i == numQ + 1) {\r\n\t\t \tnumKB = Integer.parseInt(str);\r\n\t\t \torign_sentences = new String[numKB];\r\n\t\t \t//sentences = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(0 < i && i< numQ + 1) {\t\r\n\t\t \torign_queries[i-1] = str;\r\n\t\t \t//queries.add(toCNF(str));\r\n\t\t }\r\n\t\t else {\r\n\t\t \torign_sentences[i-2-numQ] = str;\r\n\t\t \t//sentences.add(toCNF(str));\r\n\t\t }\t\t \r\n\t\t i++;\r\n\t\t }\r\n\t\t inputReader.close();\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t System.out.println(\"An error occurred when opening the input file.\");\r\n\t\t }\r\n\t}", "@SuppressWarnings(\"resource\")//I ADDED\n\tpublic static CensusData parse(String filename) {\n\t\tCensusData result = new CensusData();\n\t\t\n try {\n BufferedReader fileIn = new BufferedReader(new FileReader(filename));\n \n // Skip the first line of the file\n // After that each line has 7 comma-separated numbers (see constants above)\n // We want to skip the first 4, the 5th is the population (an int)\n // and the 6th and 7th are latitude and longitude (floats)\n // If the population is 0, then the line has latitude and longitude of +.,-.\n // which cannot be parsed as floats, so that's a special case\n // (we could fix this, but noisy data is a fact of life, more fun\n // to process the real data as provided by the government)\n \n String oneLine = fileIn.readLine(); // skip the first line\n\n // read each subsequent line and add relevant data to a big array\n while ((oneLine = fileIn.readLine()) != null) {\n String[] tokens = oneLine.split(\",\");\n if(tokens.length != TOKENS_PER_LINE)\n \tthrow new NumberFormatException();\n int population = Integer.parseInt(tokens[POPULATION_INDEX]);\n if(population != 0)\n \tresult.add(population,\n \t\t\t Float.parseFloat(tokens[LATITUDE_INDEX]),\n \t\t Float.parseFloat(tokens[LONGITUDE_INDEX]));\n }\n\n fileIn.close();\n } catch(IOException ioe) {\n System.err.println(\"Error opening/reading/writing input or output file.\");\n System.exit(1);\n } catch(NumberFormatException nfe) {\n System.err.println(nfe.toString());\n System.err.println(\"Error in file format\");\n System.exit(1);\n }\n return result;\n\t}", "private void ReadFile (String filename)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner input = new Scanner(new FileReader(filename));\n\t\t\tScanner line = new Scanner(input.nextLine());\n\t\t\twhile (input.hasNextLine() || line.hasNext())\n\t\t\t{\n\t\t\t\tPolygon polygon = new Polygon ();\n\t\t\t\twhile (line.hasNextDouble())\n\t\t\t\t{\n\t\t\t\t\tdouble tmpX = line.nextDouble(),\n\t\t\t\t\t\t\ttmpY = line.nextDouble(),\n\t\t\t\t\t\t\ttmpZ = line.nextDouble();\n\t\t\t\t\tpolygon.add(new Vec4(tmpX, tmpY, tmpZ));\n\t\t\t\t}\n\t\t\t\tif (input.hasNextLine())\n\t\t\t\t{\n\t\t\t\t\tline = new Scanner(input.nextLine());\n\t\t\t\t}\n\t\t\t\tobject.add(polygon);\n\t\t\t}\n\t\t\tinput.close();\n\t\t\tline.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadFromFile(String cinderellaFilePath) throws IOException {\n\t\tString dataLine;\n\t\tBufferedReader bufferedReader = null;\n\t\t\n\t\tunzip(cinderellaFilePath);\n\t\t\n\t\ttry {\n\t\t\tbufferedReader = new BufferedReader(\n\t\t\t\t\tnew FileReader(TEMP_FOLDER + File.separator + \"construction.cdy\"));\n\t\t\twhile ((dataLine = bufferedReader.readLine()) != null) {\n\t\t\t\tif (dataLine.matches(\".*:=FreePoint.*\")) {\n\t\t\t\t\taddElement(parseFreePoint(dataLine));\t\t\t\t\t\n\t\t\t\t}else if (dataLine.matches(\".*:=Meet.*\")) {\n\t\t\t\t\taddElement(parseMeet(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=Mid.*\")) {\n\t\t\t\t\taddElement(parseMid(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=Join.*\")) {\n\t\t\t\t\taddElement(parseJoin(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=Segment.*\")) {\n\t\t\t\t\taddElement(parseSegment(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=Through.*\")) {\n\t\t\t\t\taddElement(parseThrough(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=Parallel.*\")) {\n\t\t\t\t\taddElement(parseParallel(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=Orthogonal.*\")) {\n\t\t\t\t\taddElement(parseOrthogonal(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=AngularBisector.*\")) {\n\t\t\t\t\taddElement(parseAngularBisector(dataLine));\n\t\t\t\t}\n\t\t\t\telse if (dataLine.matches(\".*:=CircleMP.*\")) {\n\t\t\t\t\taddElement(parseCircleMP(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=CircleByRadius.*\")) {\n\t\t\t\t\taddElement(parseCircleByRadius(dataLine));\n\t\t\t\t}else if (dataLine.matches(\".*:=CircleBy3.*\")) {\n\t\t\t\t\taddElement(parseCinderellaCircleBy3(dataLine));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void BuildFromFile(String Filename)\n\t{\n\t\tDataSetBuilder<t> dsb = new DataSetBuilder<t>(\"iris.data\");\n\t\t_data = dsb.getDataMembers();\n\t\t\n\t\t//Set reference to null to queue for garbage collection and to ensure the source file gets closed\n\t\tdsb = null;\n\t}", "public void readObjectDescription(String fileName) {\n Scanner in;\n try {\n in = new Scanner(new File(fileName));\n // Read the number of vertices\n numCtrlPoints = in.nextInt();\n controlPoints = new Point[numCtrlPoints];\n \n // Read the vertices\n for (int i = 0; i < numCtrlPoints; i++) {\n // Read a vertex\n int x = in.nextInt();\n int y = in.nextInt();\n //vertexArray[i] = new Point(x, y);\n controlPoints[i] = new Point(x, y);\n }\n } catch (FileNotFoundException e) {\n System.out.println(e);\n }\n\n }", "private static void parseEdges(File fileNameWithPath) throws Exception{\n\n\t\ttry {\n\n BufferedReader in = new BufferedReader(new FileReader(fileNameWithPath));\n\n\t\t /*\n\t\t * Read the first five lines from file as follows\n\t\t *\n\t\t * NAME: berlin52\n\t\t * COMMENT: 52 locations in Berlin (Groetschel)\n\t\t * DIMENSION: 52\n\t\t * EDGE_WEIGHT_TYPE: EUC_2D\n\t\t * OPTIMAL_COST: 7542\n\t\t * NODE_COORD_SECTION\n\t\t */ \n\t\t for (int i=0;i<6;i++){\n \tString str = in.readLine().trim();\n\t\t\tString[] strArray = str.split(\":\\\\s+\");\n\t\t\tif (strArray[0].equals(\"NAME\")) {\n\t\t\t\tProject.name = strArray[1]; \n\t\t\t} else if (strArray[0].equals(\"DIMENSION\")) {\n\t\t\t\tProject.dimension = new Integer(Integer.parseInt(strArray[1]));\n\t\t\t} else if (strArray[0].equals(\"OPTIMAL_COST\")) {\n\t\t\t\tProject.optimalCost = new Double(Double.parseDouble(strArray[1])); \n\t\t\t} else if (strArray[0].equals(\"EDGE_WEIGHT_TYPE\")) {\n\t\t\t\tProject.edgeWeightType = strArray[1]; }\n\t\t }\n\n\t\t if ( dimension == -1 ){\n\t\t\t throw new Exception(\"ERROR:Failed to read the file contents correctly from \"+fileNameWithPath.getPath());\n\t\t }\n\n\t\t /* read each vertex and its coordinates */\n\t\t Integer[] vertices = new Integer[Project.dimension];\n\t\t Double[] xCord = new Double[Project.dimension];\n\t\t Double[] yCord = new Double[Project.dimension];\n\t\t int vertexCount = 0;\n\n\t\t String str;\n while ((str = in.readLine().trim()) != null) {\n\t\t\tif (str.equals(\"EOF\"))\n\t\t\t\tbreak;\n\n\t\t \tString[] ar=str.split(\"\\\\s+\");\n\n\t\t\tvertices[vertexCount] =new Integer(Integer.parseInt(ar[0]));\n\t\t\txCord[vertexCount] =new Double(Double.parseDouble(ar[1]));\n\t\t\tyCord[vertexCount] =new Double(Double.parseDouble(ar[2]));\n\n\t\t\tvertexCount++;\n\t\t}\n\n in.close();\n\n\t\t/* \n\t\t * Generate the cost matrix between each pair of vertices\n\t\t * as a java HashMap<Integer,HashMap<Integer,Double>>\n\t\t*/\n\t\tfor (int i=0;i<Project.dimension;i++) {\n\t\t\tint vi = vertices[i].intValue();\n\t\t\tfor (int j=i+1;j<Project.dimension;j++) {\n\n\t\t\t\tint vj = vertices[j].intValue();\n\t\t\t\tdouble cost_ij = 0;\n\t\t\t\tif ( vi != vj)\n\t\t\t\t{\n\n\t\t\t\t\tif (Project.edgeWeightType.equals(\"GEO\")){\n\t\t\t\t\t\tint deg;\n\t\t\t\t\t\tdouble min;\n\t\n\t \t\t\t\t\tdeg = (int)(xCord[i].doubleValue());\n\t \t\t\t\t\tmin = xCord[i]- deg; \n\t \t\t\t\t\tdouble latitude_i = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdeg = (int)(yCord[i].doubleValue());\n\t \t\t\t\t\tmin = yCord[i]- deg; \n\t \t\t\t\t\tdouble longitude_i = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdeg = (int)(xCord[j].doubleValue());\n\t \t\t\t\t\tmin = xCord[j]- deg; \n\t \t\t\t\t\tdouble latitude_j = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdeg = (int)(yCord[j].doubleValue());\n\t \t\t\t\t\tmin = yCord[j]- deg; \n\t \t\t\t\t\tdouble longitude_j = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdouble q1 = Math.cos( longitude_i - longitude_j ); \n\t \t\t\t\t\tdouble q2 = Math.cos( latitude_i - latitude_j ); \n\t \t\t\t\t\tdouble q3 = Math.cos( latitude_i + latitude_j ); \n\n\t \t\t\t\t\tcost_ij = Math.floor( earthRadius * Math.acos( 0.5*((1.0+q1)*q2 - (1.0-q1)*q3) ) + 1.0);\n\n\t\t\t\t\t} else if (Project.edgeWeightType.equals(\"EUC_2D\")){\n\t\t\t\t\t\tdouble xd = xCord[i]-xCord[j];\n\t\t\t\t\t\tdouble yd = yCord[i]-yCord[j];\n\t\t\t\t\t\t\n\t\t\t\t\t\t//cost_ij = new Double(Math.sqrt( (xd*xd) + (yd*yd))).intValue();\n\t\t\t\t\t\tcost_ij = Math.round(Math.sqrt( (xd*xd) + (yd*yd)));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"ERROR:EDGE_WEIGHT_TYPE of GEO and EUC_WD are implemented , not implemented \"+Project.edgeWeightType);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t \t\tif (!sourceGTree.containsKey(vi)){\n\t\t \t\t\tsourceGTree.put(vi,new HashMap<Integer,Double>());\n\t\t \t\t}\n\n\t\t \t\tif (!sourceGTree.containsKey(vj)){\n\t\t \t\t\tsourceGTree.put(vj,new HashMap<Integer,Double>());\n\t\t \t\t}\n\n\t\t \t\tsourceGTree.get(vi).put(vj,cost_ij);\n\t\t \t\tsourceGTree.get(vj).put(vi,cost_ij);\n\n\t\t\t}\n\t\t}\n\n } catch (IOException e) {\n System.out.println(\"ERROR: Failed reading file \" + fileNameWithPath.getPath());\n\t\t throw e;\n }\n\n\t}", "public Input readFromFile (String fileName) {\n\t\tFileReader fr = null;\n\t\tBufferedReader br = null;\n\t\tString sCurrentLine = \"test\";\n\t\tint numberOfProducts = 0;\n\t\tint numberOfSurveys = 0;\n\t\tList <String> products = new ArrayList<> ();\n\t\tList <String> surveyPrices = new ArrayList<> ();\n\t\tInput input = new Input ();\n\t\t\n\t\ttry {\n\t\t\tfr = new FileReader(fileName);\n\t\t\tbr = new BufferedReader(fr);\n\t\t\tint line = 1;\n\t\t\tboolean isAllProductsAdded = false;\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\tif (line == 1 ) {\n\t\t\t\t\tnumberOfProducts = new Integer(sCurrentLine).intValue();\n\t\t\t\t}else {\n\t\t\t\t\tif (products.size() == numberOfProducts) {\n\t\t\t\t\t\tif (numberOfSurveys == 0) {\n\t\t\t\t\t\t\tnumberOfSurveys = new Integer(sCurrentLine).intValue();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsurveyPrices.add(sCurrentLine);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (products.size() < numberOfProducts )\n\t\t\t\t\t\t\tproducts.add(sCurrentLine);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tline++;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tinput.setNumberOfProducts(numberOfProducts);\n\t\tinput.setNumberofSurveyedPrices(numberOfSurveys);\n\t\tinput.setProducts(products);\n\t\tinput.setSurveys(surveyPrices);\n\t\treturn input;\n\t}", "public DoubleMatrixDataset(String fileName, String delimiter) throws IOException {\r\n if (!fileName.endsWith(\".txt\")) {\r\n throw new IllegalArgumentException(\"File type must be .txt when delimiter is given (given filename: \" + fileName + \")\");\r\n }\r\n LOGGER.log(Level.INFO, \"Loading dataset: {0}\", fileName);\r\n loadExpressionData(fileName, delimiter);\r\n }", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "public Mesh load(String filename)\r\n\t{\r\n\t\tMesh mesh = new Mesh(); mesh.addFileMetaData(filename);\r\n \r\n\t\t//Open file and read in vertices/faces\r\n\t\tScanner sc;\r\n\t\tString line;\r\n\t\t\r\n\t\ttry{\r\n\t\t\tBufferedReader ins = new BufferedReader(new FileReader(filename));\r\n\t\t\tins.readLine(); //ID; always \"nff\"\r\n\t\t\tins.readLine(); //Version\r\n\t\t\t\r\n\t\t\t//We need to move through the header to find the start of the first object\r\n\t\t\t//This will be the first line that contains text that does not start with\r\n\t\t\t//\"viewpos\" or \"viewdir\" (optional features) or \"//\" (comment)\r\n\t\t\twhile(true){\r\n\t\t\t\tline = ins.readLine();\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\r\n\t\t\t\tif(sc.hasNext() == true){\r\n\t\t\t\t\tString token = sc.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((\"viewpos\".equalsIgnoreCase(token) == false) && \r\n\t\t\t\t\t\t\t(\"viewdir\".equalsIgnoreCase(token) == false) &&\r\n\t\t\t\t\t\t\t(\"//\".equals(token.substring(0, 2)) == false)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsc.close();\r\n\t\t\t\r\n\t\t\t//The rest of the file is filled up with objects\r\n\t\t\twhile(true){\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\tString name = sc.next();\r\n\t\t\t\tsc.close();\r\n\t\t\t\t\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\r\n\t\t\t\tVector<Point> vertices = new Vector<Point>();\r\n\t\t\t\tVector<Face> faces = new Vector<Face>();\r\n\t\t\t\t\r\n\t\t\t\tint vertexCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have vertexCount lines next with 3 floats per line\r\n\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextFloat() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfloat x = sc.nextFloat();\r\n\t\t\t\t\t\tfloat y = sc.nextFloat();\r\n\t\t\t\t\t\tfloat z = sc.nextFloat();\r\n\t\t\t\t\t\tvertices.add(new Point(x, y, z));\r\n\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsc.close();\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\tint polygonCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have polygonCount lines defining the faces\r\n\t\t\t\t//The first int on each line gives the number of\r\n\t\t\t\t//vertices making up that particular face\r\n\t\t\t\t//Then the indexes of those vertices are listed\r\n\t\t\t\twhile(polygonCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextInt() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvertexCount = sc.nextInt();\r\n\t\t\t\t\t\tArrayList<Integer> al = new ArrayList<Integer>();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\t\t\tal.add(sc.nextInt());\r\n\t\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfaces.add(new Face(al));\r\n\t\t\t\t\t\tpolygonCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmesh.addData(vertices, faces, -1, name);\r\n\t\t\t\t\r\n\t\t\t\t//The last thing we need to do is read up to and including\r\n\t\t\t\t//the next object's name or until we reach the end of the file\r\n\t\t\t\t\r\n\t\t\t\twhile((line = ins.readLine()) != null){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//The next non-blank line that doesn't start with \"//\" is the start of the next object\r\n\t\t\t\t\tif((sc.hasNext() == true) && (sc.next().substring(0, 2).equals(\"//\") == false)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsc.close();\r\n\t\t\t\tif(line == null){ //EOF\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null; \r\n\t\t}\r\n\t\t\r\n\t\tmesh.initialize();\r\n \r\n\t\treturn mesh;\r\n\t}", "protected Program(String fileName, \n Map<FunctionSignature,FunctionLike> fileFunctions,\n Map<Type, DataDeclaration> structDecs,\n List<Expr> exprList) {\n \n this.fileName = fileName;\n this.fileFunctions = fileFunctions;\n this.structDecs = structDecs;\n this.exprList = exprList;\n }", "private static DecisionTree loadTree(File file) throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(file); // Read from file\r\n\t\t// First line of file is question at root node\r\n\t\tDecisionTree dt = new DecisionTree(scan.nextLine());\r\n\t\tBinaryNode<String> root = dt.getRootNode();\r\n\t\tfillTree(Branch.LEFT, scan, root); // Fill left subtree using Scanner\r\n\t\tfillTree(Branch.RIGHT, scan, root); // Fill right subtree using Scanner\r\n\t\tscan.close(); // Close the file loaded from\r\n\t\treturn dt;\r\n\t}", "public static Model loadModel(File f)\n\t{\n\t\ttry\n\t\t{\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(f));\n\n\t\t\tModel m = new Model(f.getPath());\n\t\t\tMaterial cur = null;\n\t\t\tList<Material> mats = new ArrayList<Material>();\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t{\n\t\t\t\t//Indicates a vertex\n\t\t\t\tif (line.startsWith(\"v \")) \n\t\t\t\t{\n\t\t\t\t\tfloat x = Float.valueOf(line.split(\" \")[1]);\n\t\t\t\t\tfloat y = Float.valueOf(line.split(\" \")[2]);\n\t\t\t\t\tfloat z = Float.valueOf(line.split(\" \")[3]);\n\t\t\t\t\tm.verts.add(new Vector3f(x, y, z));\n\t\t\t\t} \n\t\t\t\t//Indicates a vertex normal\n\t\t\t\telse if (line.startsWith(\"vn \")) \n\t\t\t\t{\n\t\t\t\t\tfloat x = Float.valueOf(line.split(\" \")[1]);\n\t\t\t\t\tfloat y = Float.valueOf(line.split(\" \")[2]);\n\t\t\t\t\tfloat z = Float.valueOf(line.split(\" \")[3]);\n\t\t\t\t\tm.norms.add(new Vector3f(x, y, z));\n\t\t\t\t} \n\t\t\t\t//Indicates a texture coordinate\n\t\t\t\telse if (line.startsWith(\"vt \")) \n\t\t\t\t{\n\t\t\t\t\tfloat x = Float.valueOf(line.split(\" \")[1]);\n\t\t\t\t\tfloat y = Float.valueOf(line.split(\" \")[2]);\n\t\t\t\t\tm.textureCoords.add(new Vector2f(x, y));\n\t\t\t\t} \n\t\t\t\t//Indicates a face\n\t\t\t\telse if (line.startsWith(\"f \")) \n\t\t\t\t{\n\t\t\t\t\t//If face is triangulated\n\t\t\t\t\tif(line.split(\" \").length == 4)\n\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\tVector3f vertexIndices = new Vector3f(\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1].split(\"/\")[0]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2].split(\"/\")[0]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3].split(\"/\")[0]));\n\n\n\t\t\t\t\t\t//Instantiate as null for scope reasons\n\t\t\t\t\t\tVector3f textureIndices = null;\n\n\t\t\t\t\t\tif(!line.split(\" \")[1].split(\"/\")[1].equals(\"\")&&!(line.split(\" \")[1].split(\"/\")[1].equals(null)))\n\t\t\t\t\t\t\ttextureIndices = new Vector3f(\n\t\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1].split(\"/\")[1]),\n\t\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2].split(\"/\")[1]),\n\t\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3].split(\"/\")[1]));\n\n\t\t\t\t\t\tVector3f normalIndices = new Vector3f(\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1].split(\"/\")[2]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2].split(\"/\")[2]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3].split(\"/\")[2]));\n\n\t\t\t\t\t\tFace mf = new Face();\n\n\t\t\t\t\t\t//Instantiate all the arrays\n\t\t\t\t\t\tmf.normals = new Vector3f[3];\n\t\t\t\t\t\tmf.points = new Vector3f[3];\n\n\t\t\t\t\t\t//// SETUP NORMALS ////\n\t\t\t\t\t\tVector3f n1 = m.norms.get((int)normalIndices.x - 1);\n\t\t\t\t\t\tmf.normals[0] = n1;\n\t\t\t\t\t\tVector3f n2 = m.norms.get((int)normalIndices.y - 1);\n\t\t\t\t\t\tmf.normals[1] = n2;\n\t\t\t\t\t\tVector3f n3 = m.norms.get((int)normalIndices.z - 1);\n\t\t\t\t\t\tmf.normals[2] = n3;\n\n\t\t\t\t\t\t//// SETUP VERTICIES ////\n\t\t\t\t\t\tVector3f v1 = m.verts.get((int)vertexIndices.x - 1);\n\t\t\t\t\t\tmf.points[0] = v1;\n\t\t\t\t\t\tVector3f v2 = m.verts.get((int)vertexIndices.y - 1);\n\t\t\t\t\t\tmf.points[1] = v2;\n\t\t\t\t\t\tVector3f v3 = m.verts.get((int)vertexIndices.z - 1);\n\t\t\t\t\t\tmf.points[2] = v3;\n\n\t\t\t\t\t\t//// SETUP TEXTURE COORDS ////\n\t\t\t\t\t\tif(textureIndices!=null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmf.textureCoords = new Vector2f[3];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat x1 = m.textureCoords.get((int)textureIndices.x - 1).x;\n\t\t\t\t\t\t\tfloat y1 = 1 - m.textureCoords.get((int)textureIndices.x - 1).y;\n\t\t\t\t\t\t\tVector2f t1 = new Vector2f(x1, y1);\n\t\t\t\t\t\t\tmf.textureCoords[0] = t1;\n\t\t\t\t\t\t\tfloat x2 = m.textureCoords.get((int)textureIndices.y - 1).x;\n\t\t\t\t\t\t\tfloat y2 = 1 - m.textureCoords.get((int)textureIndices.y - 1).y;\n\t\t\t\t\t\t\tVector2f t2 = new Vector2f(x2, y2);\n\t\t\t\t\t\t\tmf.textureCoords[1] = t2;\n\t\t\t\t\t\t\tfloat x3 = m.textureCoords.get((int)textureIndices.z - 1).x;\n\t\t\t\t\t\t\tfloat y3 = 1 - m.textureCoords.get((int)textureIndices.z - 1).y;\n\t\t\t\t\t\t\tVector2f t3 = new Vector2f(x3, y3);\n\t\t\t\t\t\t\tmf.textureCoords[2] = t3;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Set the face's material to the current material\n\t\t\t\t\t\tif(cur != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmf.material = cur;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Tell face to set up AABB\n\t\t\t\t\t\tmf.setUpAABB();\n\n\t\t\t\t\t\tm.faces.add(mf);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Indicates a reference to an exterior .mtl file\n\t\t\t\telse if(line.startsWith(\"mtllib \"))\n\t\t\t\t{\n\t\t\t\t\t//The file being referenced by mtllib call\n\t\t\t\t\tFile lib = new File(f.getParentFile()+File.separator+line.split(\" \")[1]);\n\n\t\t\t\t\t//Parse it and add all generated Materials to the mats list\n\t\t\t\t\tmats.addAll(parseMTL(lib, m));\n\t\t\t\t}\n\t\t\t\t//Telling us to use a material\n\t\t\t\telse if(line.startsWith(\"usemtl \"))\n\t\t\t\t{\n\t\t\t\t\tString name = line.split(\" \")[1];\n\n\t\t\t\t\tif(mats!=null)\n\t\t\t\t\t\t//Find material with correct name and use it\n\t\t\t\t\t\tfor(Material material : mats)\n\t\t\t\t\t\t\tif(material.name.equals(name))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcur = material;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\t//Tell model to set up AABB\n\t\t\tm.setUpAABB();\n\t\t\t\n\t\t\t//Remove the first element, because...\n\t\t\tm.faces.remove(0);\n\n\t\t\treturn m;\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void readData(String fileName) {\n\t\ttry {\n\t\t\tFile file = new File(fileName);;\n\t\t\tif( !file.isFile() ) {\n\t\t\t\tSystem.out.println(\"ERRO\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tBufferedReader buffer = new BufferedReader( new FileReader(file) );\n\t\t\t/* Reconhece o valor do numero de vertices */\n\t\t\tString line = buffer.readLine();\n\t\t\tStringTokenizer token = new StringTokenizer(line, \" \");\n\t\t\tthis.num_nodes = Integer.parseInt( token.nextToken() );\n\t\t\tthis.nodesWeigths = new int[this.num_nodes];\n\t\t\t\n\t\t\t/* Le valores dos pesos dos vertices */\n\t\t\tfor(int i=0; i<this.num_nodes; i++) { // Percorre todas a linhas onde seta valorado os pesos dos vertices\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se existe a linha a ser lida\n\t\t\t\t\tbreak;\n\t\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\t\tthis.nodesWeigths[i] = Integer.parseInt( token.nextToken() ); // Adiciona o peso de vertice a posicao do arranjo correspondente ao vertice\n\t\t\t}\n\t\t\t\n\t\t\t/* Mapeia em um array de lista todas as arestas */\n\t\t\tthis.edges = new LinkedList[this.num_nodes];\n\t\t\tint cont = 0; // Contador com o total de arestas identificadas\n\t\t\t\n\t\t\t/* Percorre todas as linhas */\n\t\t\tfor(int row=0, col; row<this.num_nodes; row++) {\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se ha a nova linha no arquivo\n\t\t\t\t\tbreak;\n\t\t\t\tthis.edges[row] = new LinkedList<Integer>(); // Aloca nova lista no arranjo, representado a linha o novo vertice mapeado\n\t\t\t\tcol = 0;\n\t\t\t\ttoken = new StringTokenizer(line, \" \"); // Divide a linha pelos espacos em branco\n\t\t\t\t\n\t\t\t\t/* Percorre todas as colunas */\n\t\t\t\twhile( token.hasMoreTokens() ) { // Enquanto ouver mais colunas na linha\n\t\t\t\t\tif( token.nextToken().equals(\"1\") ) { // Na matriz binaria, onde possui 1, e onde ha arestas\n//\t\t\t\t\t\tif( row != col ) { // Ignora-se os lacos\n\t\t\t\t\t\t\t//System.out.println(cont + \" = \" + (row+1) + \" - \" + (col+1) );\n\t\t\t\t\t\t\tthis.edges[row].add(col); // Adiciona no arranjo de listas a aresta\n\t\t\t\t\t\t\tcont++; // Incrementa-se o total de arestas encontradas\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.num_edges = cont; // Atribui o total de arestas encontradas\n\n\t\t\tif(true) {\n//\t\t\t\tfor(int i=0; i<this.num_nodes; i++) {\n//\t\t\t\t\tSystem.out.print(this.nodesWeigths[i] + \"\\n\");\n//\t\t\t\t}\n\t\t\t\tSystem.out.print(\"num edges = \" + cont + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tbuffer.close(); // Fecha o buffer\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private boolean parseInput(String fileName)\n {\n try\n {\n Scanner in = new Scanner(new File(fileName));\n\n this.numIntxns = in.nextInt();\n this.roads = new Road[in.nextInt()];\n this.cities = new City[in.nextInt()];\n\n for (int i = 0; i < this.roads.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.roads[i] = new Road(start, end, length);\n }\n\n for (int i = 0; i < this.cities.length; i++)\n {\n int intersectionNum = in.nextInt();\n String name = in.next();\n\n this.cities[i] = new City(intersectionNum, name);\n }\n\n if (in.hasNextInt())\n {\n this.signs = new Sign[in.nextInt()];\n }\n\n for (int i = 0; i < this.signs.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.signs[i] = new Sign(start, end, length);\n }\n }\n // lazy catch statement because computer science is hard\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n return false;\n }\n\n return true;\n }", "public static DSAGraph readFile(String filename)\n {\n DSAGraph graph = new DSAGraph();\n System.out.println(\"Reading file: \" + filename);\n try {\n File inFile = new File(filename);\n Scanner sc = new Scanner(inFile);\n sc.skip(\"#\"); //skips comment at beggining\n //sc.useDelimiter(\" \");\n\n while(sc.hasNextLine())\n {\n //sc.nextLine(); //currently always skipping the first line\n String command = sc.next();\n\n if(command.equals(\"Node\"))//case finds NODE\n {\n String label = sc.next();\n graph.addVertex(label);\n }\n else if(command.equals(\"Edge\")) //case finds EDGE\n {\n String l1 = sc.next();\n String l2 = sc.next();\n graph.addEdge(l1, l2);\n }\n // else if(command.equals(\"#\"))\n // {\n // System.out.println(\"Comment line\"); //may crash if there's a comment after the '#'\n // }\n\n }\n sc.close();\n } catch (Exception e) //file not found\n {\n throw new IllegalArgumentException(\"Unable to load object from file\" + e.getMessage());\n }\n\n return graph;\n\n\n }", "public void readFromTxtFile(String filename){\n try{\n File graphFile = new File(filename); \n Scanner myReader = new Scanner(graphFile); \n parseFile(myReader);\n myReader.close();\n } \n catch(FileNotFoundException e){\n System.out.println(\"ERROR: DGraphEdges, readFromTxtFile: file not found.\");\n e.printStackTrace();\n } \n }", "public DataParser() throws IOException {\n cem = loadCEM();\n summits = readSummitsFrom(new File(\"alps.txt\"));\n }", "public Interface(String filename) throws FileNotFoundException \n {\n //read file for first time to find size of array\n File f = new File(filename);\n Scanner b = new Scanner(f);\n\n while(b.hasNextLine())\n {\n b.nextLine();\n arraySize++;\n }\n //create properly sized array\n array= new double[arraySize];\n //open and close the file, scanner class does not support rewinding\n b.close();\n b = new Scanner(f);\n //read input \n for(int i = 0; i < arraySize; i++)\n { \n array[i] = b.nextDouble();\n }\n //create a stats object of the proper size\n a = new Stats(arraySize);\n a.loadNums(array); //pass entire array to loadNums to allow Stats object a to have a pointer to the array\n }", "public CoordinateTransform readCoordinateTransform(String filename) \n\t{\n\t\tfinal CoordinateTransformList<CoordinateTransform> ctl = new CoordinateTransformList<CoordinateTransform>();\n\t\ttry \n\t\t{\n\t\t\tfinal FileReader fr = new FileReader(filename);\n\t\t\tfinal BufferedReader br = new BufferedReader(fr);\n\t\t\tString line = null;\n\t\t\twhile ((line = br.readLine()) != null) \n\t\t\t{\n\t\t\t\tint index = -1;\n\t\t\t\tif( (index = line.indexOf(\"class=\")) != -1)\n\t\t\t\t{\n\t\t\t\t\t// skip \"class\"\n\t\t\t\t\tindex+= 5;\n\t\t\t\t\t// read coordinate transform class name\n\t\t\t\t\tfinal int index2 = line.indexOf(\"\\\"\", index+2); \n\t\t\t\t\tfinal String ct_class = line.substring(index+2, index2);\n\t\t\t\t\tfinal CoordinateTransform ct = (CoordinateTransform) Class.forName(ct_class).newInstance();\n\t\t\t\t\t// read coordinate transform info\n\t\t\t\t\tfinal int index3 = line.indexOf(\"=\", index2+1);\n\t\t\t\t\tfinal int index4 = line.indexOf(\"\\\"\", index3+2); \n\t\t\t\t\tfinal String data = line.substring(index3+2, index4);\n\t\t\t\t\tct.init(data);\n\t\t\t\t\tctl.add(ct);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tIJ.error(\"File not found exception\" + e);\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tIJ.error(\"IOException exception\" + e);\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\tIJ.error(\"Number format exception\" + e);\n\t\t\t\n\t\t} catch (InstantiationException e) {\n\t\t\tIJ.error(\"Instantiation exception\" + e);\n\t\t\t\n\t\t} catch (IllegalAccessException e) {\n\t\t\tIJ.error(\"Illegal access exception\" + e);\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tIJ.error(\"Class not found exception\" + e);\n\t\t\t\n\t\t}\n\t\treturn ctl;\n\t}", "private void loadExpressionDataInBinaryFormat(String fileName, LoadLabels ll) throws IOException, ClassNotFoundException {\n this.fileName = fileName;\r\n File fileBinary = new File(fileName + \".dat\");\r\n BufferedInputStream in = null;\r\n int nrRowsThisBinaryFile = -1;\r\n int nrColsThisBinaryFile = -1;\r\n in = new BufferedInputStream(new FileInputStream(fileBinary));\r\n byte[] bytes = new byte[4];\r\n in.read(bytes, 0, 4);\r\n nrRowsThisBinaryFile = byteArrayToInt(bytes);\r\n in.read(bytes, 0, 4);\r\n nrColsThisBinaryFile = byteArrayToInt(bytes);\r\n \r\n if (rowsToInclude == null && colsToInclude == null) {\r\n //We want to load all the data:\r\n nrRows = nrRowsThisBinaryFile;\r\n nrCols = nrColsThisBinaryFile;\r\n rawData = new double[nrRows][nrCols];\r\n \r\n //Now load the row and column identifiers from files\r\n switch (ll) {\r\n case LOAD_BOTH:\r\n loadRowObjects(fileName);\r\n loadColumnObjects(fileName);\r\n break;\r\n case LOAD_ROWS:\r\n loadRowObjects(fileName);\r\n break;\r\n case LOAD_COLUMNS:\r\n loadColumnObjects(fileName);\r\n break;\r\n }\r\n \r\n byte[] buffer = new byte[nrCols * 8];\r\n long bits = 0;\r\n for (int row = 0; row < nrRows; row++) {\r\n in.read(buffer, 0, nrCols * 8);\r\n int bufferLoc = 0;\r\n for (int col = 0; col < nrCols; col++) {\r\n bits = (long) (0xff & buffer[bufferLoc + 7])\r\n | (long) (0xff & buffer[bufferLoc + 6]) << 8\r\n | (long) (0xff & buffer[bufferLoc + 5]) << 16\r\n | (long) (0xff & buffer[bufferLoc + 4]) << 24\r\n | (long) (0xff & buffer[bufferLoc + 3]) << 32\r\n | (long) (0xff & buffer[bufferLoc + 2]) << 40\r\n | (long) (0xff & buffer[bufferLoc + 1]) << 48\r\n | (long) (buffer[bufferLoc]) << 56;\r\n \r\n rawData[row][col] = Double.longBitsToDouble(bits);\r\n bufferLoc += 8;\r\n }\r\n }\r\n in.close();\r\n } else {\r\n \r\n //We want to confine the set of probes and samples to a subset. Deal with this in a different way.\r\n int[] rowSubsetIndex = loadRowObjects(fileName, nrRowsThisBinaryFile);\r\n int[] colSubsetIndex = loadColumnObjects(fileName, nrColsThisBinaryFile);\r\n \r\n //Now load the binary data:\r\n rawData = new double[nrRows][nrCols];\r\n byte[] buffer = new byte[nrColsThisBinaryFile * 8];\r\n long bits = 0;\r\n for (int row = 0; row < nrRowsThisBinaryFile; row++) {\r\n in.read(buffer, 0, nrColsThisBinaryFile * 8);\r\n int bufferLoc = 0;\r\n for (int col = 0; col < nrColsThisBinaryFile; col++) {\r\n bits = (long) (0xff & buffer[bufferLoc + 7])\r\n | (long) (0xff & buffer[bufferLoc + 6]) << 8\r\n | (long) (0xff & buffer[bufferLoc + 5]) << 16\r\n | (long) (0xff & buffer[bufferLoc + 4]) << 24\r\n | (long) (0xff & buffer[bufferLoc + 3]) << 32\r\n | (long) (0xff & buffer[bufferLoc + 2]) << 40\r\n | (long) (0xff & buffer[bufferLoc + 1]) << 48\r\n | (long) (buffer[bufferLoc]) << 56;\r\n \r\n int rowI = rowSubsetIndex[row];\r\n int colI = colSubsetIndex[col];\r\n if (rowI != -1 && colI != -1) {\r\n rawData[rowI][colI] = Double.longBitsToDouble(bits);\r\n }\r\n bufferLoc += 8;\r\n }\r\n }\r\n in.close();\r\n }\r\n recalculateHashMaps();\r\n LOGGER.log(Level.INFO, \"Binary file ''{0}'' has been loaded, nrRows: {1} nrCols: {2}\", new Object[]{fileName, nrRows, nrCols});\r\n }", "public static SnakeProblem buildProblemFromFile(File file) throws IOException {\n int NUM_ONE_AI_OBLIGATORY_PARAMS = 4;\n int NUM_TWO_AI_OBLIGATORY_PARAMS = 7;\n\n java.util.Scanner f;\n try {\n f = new java.util.Scanner(file);\n } catch (FileNotFoundException e) {\n return null;\n }\n\n List<String> lines = new LinkedList<>();\n\n while (f.hasNextLine()) {\n String s = f.nextLine();\n if (!s.equals(\"\") && !s.startsWith(\"//\")) {\n lines.add(s);\n }\n }\n\n List<String> parametersValues = new LinkedList<>();\n for (String line : lines) {\n String[] tokens = line.split(\":|,\");\n for (int i = 1; i < tokens.length; i++) {\n parametersValues.add(tokens[i].trim());\n }\n }\n\n int environmentSize, maxIterations, numEnvironmentRuns;\n\n\n try {\n environmentSize = Integer.parseInt(parametersValues.get(0));\n maxIterations = Integer.parseInt(parametersValues.get(1));\n numEnvironmentRuns = Integer.parseInt(parametersValues.get(2));\n } catch (NumberFormatException e) {\n return null;\n }\n\n if (parametersValues.size() > NUM_ONE_AI_OBLIGATORY_PARAMS) {\n List<Integer> numInputs = new ArrayList<>();\n List<Integer> numHiddenUnits = new ArrayList<>();\n List<Integer> numOutputs = new ArrayList<>();\n List<ActivationFunction> activationFunctions = new ArrayList<>();\n\n try {\n numInputs.add(Integer.parseInt(parametersValues.get(3)));\n\n if (parametersValues.size() > NUM_TWO_AI_OBLIGATORY_PARAMS) {\n numInputs.add(Integer.parseInt(parametersValues.get(4)));\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(5)));\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(6)));\n numOutputs.add(Integer.parseInt(parametersValues.get(7)));\n numOutputs.add(Integer.parseInt(parametersValues.get(8)));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(9).toUpperCase()));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(10).toUpperCase()));\n } else {\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(4)));\n numOutputs.add(Integer.parseInt(parametersValues.get(5)));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(6).toUpperCase()));\n }\n } catch (IllegalArgumentException e) {\n return null;\n }\n\n return new SnakeProblem(\n environmentSize,\n maxIterations,\n numEnvironmentRuns,\n numInputs,\n numHiddenUnits,\n numOutputs,\n activationFunctions);\n }\n\n return new SnakeProblem(\n environmentSize,\n maxIterations,\n numEnvironmentRuns);\n }", "public void readInput(String fileName){\n\n BufferedReader reader;\n try {\n reader = new BufferedReader(new FileReader(fileName));\n String line = reader.readLine(); //read first line\n int numLine =1; //keep track the number of line\n while (line != null) {\n String[] tokens = line.trim().split(\"\\\\s+\"); //split line into token\n if(numLine==1){ //for the first line\n intersection = Integer.parseInt(tokens[0]); //set the number of intersection\n roadways = Integer.parseInt(tokens[1]); // set the number of roadways\n coor = new Coordinates[intersection];\n g = new Graph(intersection);//create a graph\n line = reader.readLine();\n numLine++;\n }\n else if(numLine>1&&numLine<intersection+2){ //for all intersection\n while(numLine>1&&numLine<intersection+2){\n tokens = line.trim().split(\"\\\\s+\");\n coor[Integer.parseInt(tokens[0])] = new Coordinates(Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])); //add into coor array to keep track the coor of intersection\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine ==intersection+2){ //skip the space line\n line = reader.readLine();\n numLine++;\n while(numLine<roadways+intersection+3){ // for all the roadways, only include the number of roadways mention in the first line\n tokens = line.trim().split(\"\\\\s+\");\n int fst = Integer.parseInt(tokens[0]);\n int snd = Integer.parseInt(tokens[1]);\n g.addEgde(fst,snd,coor[fst].distTo(coor[snd]));\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine >= roadways+intersection+3)\n break;\n }\n reader.close();\n } catch (FileNotFoundException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Equation() {\n alpha_arr = new ArrayList<LinkedList<VariableUnit>>();\n for (int i = 0; i < 26; i++) {\n LinkedList<VariableUnit> list = new LinkedList<VariableUnit>();\n alpha_arr.add(list);\n }\n \n op_order = new LinkedList<VariableUnit>();\n }", "private void parseFile(String fileName) {\n Set<String> inputs = new HashSet<String>();\n Set<String> outputs = new HashSet<String>();\n double[] qos = new double[4];\n\n Properties p = new Properties(inputs, outputs, qos);\n\n try {\n Scanner scan = new Scanner(new File(fileName));\n while(scan.hasNext()) {\n\t\t\t\tString name = scan.next();\n\t\t\t\tString inputBlock = scan.next();\n\t\t\t\tString outputBlock = scan.next();\n\n\t\t\t\tqos[TIME] = scan.nextDouble();\n\t\t\t\tqos[COST] = scan.nextDouble();\n\t\t\t\tqos[AVAILABILITY] = scan.nextDouble()/100;\n\t\t\t\tqos[RELIABILITY] = scan.nextDouble()/100;\n\t\t\t\t// Throw the other two away;\n\t\t\t\tscan.nextDouble();\n\t\t\t\tscan.nextDouble();\n\n\t\t\t\tfor (String s :inputBlock.split(\",\"))\n\t\t\t\t\tinputs.add(s);\n\t\t\t\tfor (String s :outputBlock.split(\",\"))\n\t\t\t\toutputs.add(s);\n\n p = new Properties(inputs, outputs, qos);\n\n ServiceNode ws = new ServiceNode(name, p);\n serviceMap.put(name, ws);\n inputs = new HashSet<String>();\n outputs = new HashSet<String>();\n qos = new double[4];\n }\n scan.close();\n }\n catch(IOException ioe) {\n System.out.println(\"File parsing failed...\");\n }\n\t\tnumServices = serviceMap.size();\n }", "private void fillNCFile() {\n\n List<GradsVariable> vars = gradsDDF.getVariables();\n List<GradsAttribute> attrs = gradsDDF.getAttributes();\n // TODO: ensembles\n List<GradsDimension> dims = gradsDDF.getDimensions();\n Variable v;\n int numZ = 0;\n HashMap<String, Dimension> zDims = new HashMap<>();\n for (GradsDimension dim : dims) {\n String name = getVarName(dim);\n int size = dim.getSize();\n Dimension ncDim = new Dimension(name, size);\n ncFile.addDimension(null, ncDim);\n if (name.equals(ENS_VAR)) {\n v = new Variable(ncFile, null, null, name, DataType.STRING, name);\n v.addAttribute(new Attribute(\"standard_name\", \"ensemble\"));\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Ensemble.toString()));\n List<String> names = gradsDDF.getEnsembleDimension().getEnsembleNames();\n String[] nameArray = new String[names.size()];\n for (int i = 0; i < nameArray.length; i++) {\n nameArray[i] = names.get(i);\n }\n Array dataArray = Array.factory(DataType.STRING, new int[] {nameArray.length}, nameArray);\n v.setCachedData(dataArray, false);\n } else {\n double[] vals = dim.getValues();\n v = new Variable(ncFile, null, null, name, DataType.DOUBLE, name);\n v.addAttribute(new Attribute(CDM.UNITS, dim.getUnit()));\n switch (name) {\n case Y_VAR:\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"latitude\"));\n v.addAttribute(new Attribute(\"standard_name\", \"latitude\"));\n v.addAttribute(new Attribute(\"axis\", \"Y\"));\n sizeY = dim.getSize();\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Lat.toString()));\n break;\n case X_VAR:\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"longitude\"));\n v.addAttribute(new Attribute(\"standard_name\", \"longitude\"));\n v.addAttribute(new Attribute(\"axis\", \"X\"));\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Lon.toString()));\n sizeX = dim.getSize();\n break;\n case Z_VAR:\n numZ = size;\n zDims.put(name, ncDim);\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"level\"));\n addZAttributes(dim, v);\n break;\n case TIME_VAR:\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"time\"));\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Time.toString()));\n break;\n }\n ArrayDouble.D1 varArray = new ArrayDouble.D1(size);\n for (int i = 0; i < vals.length; i++) {\n varArray.set(i, vals[i]);\n }\n v.setCachedData(varArray, false);\n }\n ncFile.addVariable(null, v);\n }\n if (numZ > 0) {\n GradsDimension zDim = gradsDDF.getZDimension();\n double[] vals = zDim.getValues();\n for (GradsVariable var : vars) {\n int nl = var.getNumLevels();\n if ((nl > 0) && (nl != numZ)) {\n String name = Z_VAR + nl;\n if (zDims.get(name) == null) {\n Dimension ncDim = new Dimension(name, nl);\n ncFile.addDimension(null, ncDim);\n Variable vz = new Variable(ncFile, null, null, name, DataType.DOUBLE, name);\n vz.addAttribute(new Attribute(CDM.LONG_NAME, name));\n vz.addAttribute(new Attribute(CDM.UNITS, zDim.getUnit()));\n addZAttributes(zDim, vz);\n ArrayDouble.D1 varArray = new ArrayDouble.D1(nl);\n for (int i = 0; i < nl; i++) {\n varArray.set(i, vals[i]);\n }\n vz.setCachedData(varArray, false);\n ncFile.addVariable(null, vz);\n zDims.put(name, ncDim);\n }\n }\n }\n }\n for (GradsVariable var : vars) {\n String coords = \"latitude longitude\";\n int nl = var.getNumLevels();\n if (nl > 0) {\n if (nl == numZ) {\n coords = \"level \" + coords;\n } else {\n coords = Z_VAR + nl + \" \" + coords;\n }\n }\n coords = \"time \" + coords;\n if (gradsDDF.getEnsembleDimension() != null) {\n coords = \"ensemble \" + coords;\n }\n v = new Variable(ncFile, null, null, var.getName(), DataType.FLOAT, coords);\n v.addAttribute(new Attribute(CDM.LONG_NAME, var.getDescription()));\n if (var.getUnitName() != null) {\n v.addAttribute(new Attribute(CDM.UNITS, var.getUnitName()));\n }\n v.addAttribute(new Attribute(CDM.FILL_VALUE, (float) gradsDDF.getMissingValue()));\n v.addAttribute(new Attribute(CDM.MISSING_VALUE, (float) gradsDDF.getMissingValue()));\n for (GradsAttribute attr : attrs) {\n if (attr.getVariable().equalsIgnoreCase(var.getName())) {\n // TODO: what to do about a UINT16/32\n if (attr.getType().equalsIgnoreCase(GradsAttribute.STRING)) {\n v.addAttribute(new Attribute(attr.getName(), attr.getValue()));\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.BYTE)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Byte(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.INT16)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Short(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.INT32)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Integer(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.FLOAT32)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Float(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.FLOAT64)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Double(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n }\n }\n }\n ncFile.addVariable(null, v);\n }\n // Global Attributes\n ncFile.addAttribute(null, new Attribute(CDM.CONVENTIONS, \"CF-1.0\"));\n ncFile.addAttribute(null, new Attribute(CDM.HISTORY, \"Direct read of GrADS binary grid into NetCDF-Java 4 API\"));\n String title = gradsDDF.getTitle();\n if ((title != null) && !title.isEmpty()) {\n ncFile.addAttribute(null, new Attribute(\"title\", title));\n }\n for (GradsAttribute attr : attrs) {\n if (attr.getVariable().equalsIgnoreCase(GradsAttribute.GLOBAL)) {\n ncFile.addAttribute(null, new Attribute(attr.getName(), attr.getValue()));\n }\n }\n\n }", "static CoordinateTransform readCoordTransform(String filename) \n\t{\n\t\tfinal CoordinateTransformList<CoordinateTransform> ctl = new CoordinateTransformList<CoordinateTransform>();\n\t\ttry \n\t\t{\n\t\t\tfinal FileReader fr = new FileReader(filename);\n\t\t\tfinal BufferedReader br = new BufferedReader(fr);\n\t\t\tString line = null;\n\t\t\twhile ((line = br.readLine()) != null) \n\t\t\t{\n\t\t\t\tint index = -1;\n\t\t\t\tif( (index = line.indexOf(\"class=\")) != -1)\n\t\t\t\t{\n\t\t\t\t\t// skip \"class\"\n\t\t\t\t\tindex+= 5;\n\t\t\t\t\t// read coordinate transform class name\n\t\t\t\t\tfinal int index2 = line.indexOf(\"\\\"\", index+2); \n\t\t\t\t\tfinal String ct_class = line.substring(index+2, index2);\n\t\t\t\t\tfinal CoordinateTransform ct = (CoordinateTransform) Class.forName(ct_class).newInstance();\n\t\t\t\t\t// read coordinate transform info\n\t\t\t\t\tfinal int index3 = line.indexOf(\"=\", index2+1);\n\t\t\t\t\tfinal int index4 = line.indexOf(\"\\\"\", index3+2); \n\t\t\t\t\tfinal String data = line.substring(index3+2, index4);\n\t\t\t\t\tct.init(data);\n\t\t\t\t\tctl.add(ct);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tIJ.error(\"File not found exception\" + e);\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tIJ.error(\"IOException exception\" + e);\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\tIJ.error(\"Number format exception\" + e);\n\t\t\t\n\t\t} catch (InstantiationException e) {\n\t\t\tIJ.error(\"Instantiation exception\" + e);\n\t\t\t\n\t\t} catch (IllegalAccessException e) {\n\t\t\tIJ.error(\"Illegal access exception\" + e);\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tIJ.error(\"Class not found exception\" + e);\n\t\t\t\n\t\t}\n\t\treturn ctl;\n\t}", "public XYMatrix(File file) throws IOException {\n MatrixFile = file;\n read(file);\n //System.out.println(outputString);\n lines = new StringTokenizer(outputString,\"\\n\");\n if(lines.countTokens() > 0) {\n readTitles();\n readMatrix();\n } else {\n throw new IOException(\"Error in reading Matrix\\n\");\n }\n }", "@Override\n public String generareSourcecodetoReadInputFromFile() throws Exception {\n String typeVar = VariableTypes.deleteStorageClasses(this.getType())\n .replace(IAbstractDataNode.REFERENCE_OPERATOR, \"\");\n // Ex: A::B, ::B. We need to get B\n if (typeVar.contains(\"::\"))\n typeVar = typeVar.substring(typeVar.lastIndexOf(\"::\") + 2);\n\n String loadValueStm = \"data.findStructure\" + typeVar + \"ByName\" + \"(\\\"\" + getVituralName() + \"\\\")\";\n\n String fullStm = typeVar + \" \" + this.getVituralName() + \"=\" + loadValueStm + SpecialCharacter.END_OF_STATEMENT;\n return fullStm;\n }", "public void load( String fileName ) {\n System.out.println( \"Loading: \" + fileName );\n this.name = fileName;\n Object obj = null;\n try {\n FileInputStream fis = new FileInputStream(fileName);\n ObjectInputStream oos = new ObjectInputStream( fis );\n obj = oos.readObject();\n dofs = (double[][]) obj;\n oos.close();\n fis.close();\n } catch ( Exception e ) {\n e.printStackTrace();\n } \n }", "private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}", "public SudokuSolver(String filename) {\n this.board = new SudokuBoard(filename);\n }", "public static DSAGraph load(String filename) throws IllegalArgumentException\n {\n FileInputStream fileStrm;\n ObjectInputStream objStrm;\n DSAGraph inObj = null;\n try\n {\n fileStrm = new FileInputStream(filename);//Underlying stream\n objStrm = new ObjectInputStream(fileStrm);//Object serialization stream\n inObj = (DSAGraph)objStrm.readObject();//Deserialize.\n objStrm.close();//Clean up\n }\n catch (ClassNotFoundException e)\n {\n System.out.println(\"Class not found: \" + e);\n }\n catch (Exception e)\n {\n throw new IllegalArgumentException(\"Unable to load object from file: \" + e.getMessage());\n }\n return inObj;\n\n }", "private void readFile(File fp)throws IOException{\n Scanner in=new Scanner(fp);\n String line,s[];\n while(in.hasNext()){\n line=in.nextLine();\n s=line.split(\"[ ]+\");\n if(s.length<3){\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0])));\n }\n else{\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0],s[2].charAt(0),s[4].charAt(0),\n Integer.parseInt(s[3]),Double.parseDouble(s[5]))));\n }\n }\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "public void load(File tFile) throws FileNotFoundException, IOException {\n BufferedReader reader = new BufferedReader(new FileReader(tFile));\n String line;\n\n\n while ((line = reader.readLine()) != null) {\n line = line.replaceAll(\"\\\\s+\", \" \");\n String[] elements = line.split(\" \");\n\n CSID desc = new CSID();\n // normalised lines are easier to compare as it is well defined, which point will be the 1st\n desc.axis1 = (ExtLine2D) ExtLine2D.normaliseLine(new ExtLine2D(Double.parseDouble(elements[0]),\n Double.parseDouble(elements[1]),\n Double.parseDouble(elements[2]),\n Double.parseDouble(elements[3])));\n desc.axis2 = (ExtLine2D) ExtLine2D.normaliseLine(new ExtLine2D(Double.parseDouble(elements[4]),\n Double.parseDouble(elements[5]),\n Double.parseDouble(elements[6]),\n Double.parseDouble(elements[7])));\n desc.isCS = elements[8].equals(\"Y\");\n\n this.csDescriptors.add(desc);\n }\n }", "private void readFile( String fileName ) throws FileNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile train_file = new File( fileName );\n\t\t\tScanner in;\n\t\t\tin = new Scanner( train_file );\n\n\t\t\tString[] tokens = in.nextLine().trim().split( \"\\\\s+\" ); // Parse the file\n\t\t\tthis.attribute_list.add( new Attribute( 0, \"x0\" ) );\n\n\t\t\tint i = 1;\n\t\t\twhile ( i <= tokens.length )\n\t\t\t{\n\t\t\t\tthis.attribute_list.add( new Attribute( i, tokens[ i - 1 ] ) );\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\twhile ( in.hasNextLine() )\n\t\t\t{\n\t\t\t\ttokens = in.nextLine().trim().split( \"\\\\s+\" );\n\t\t\t\tif ( tokens.length > 1 )\n\t\t\t\t{\n\t\t\t\t\tthis.addTrainData( 0, 1 );\n\n\t\t\t\t\tfor ( i = 1; i < tokens.length; i++ )\n\t\t\t\t\t\tthis.addTrainData( i, Integer.parseInt( tokens[ i - 1 ] ) );\n\n\t\t\t\t\t// Last column would be the class attribute\n\t\t\t\t\tthis.class_data.add_data( Integer.parseInt( tokens[ i - 1 ] ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( FileNotFoundException e )\n\t\t{\n\t\t\tSystem.out.println( \"Cannot find train file - \" + fileName );\n\t\t\tthrow e;\n\t\t}\n\t}", "public static Graph<Integer,String> fromFile (String fileName) {\n\t\t\r\n\t\tGraph<Integer,String> g = new SparseGraph<Integer,String>();\r\n\t\tFileReader file = null;\r\n\t\ttry {\r\n\t\t\tfile = new FileReader(fileName);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.print(\"File not found: \" + fileName +\"\\n\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tScanner scan = new Scanner(file);\r\n\r\n\t\twhile (scan.hasNext()){\r\n\t\t\tInteger a = scan.nextInt();\r\n\t\t\tInteger b = scan.nextInt();\r\n\t\t\tg.addEdge(\"e:\"+a+\"-\"+b, a, b);\r\n\t\t}\r\n\t\t\r\n\t\treturn g;\r\n\t}", "public Equation()\r\n\t{\r\n\t\texpression = \"\";\r\n\t}", "public SparseDataset parse(String name, File file) throws FileNotFoundException, IOException, ParseException {\n return parse(name, new FileInputStream(file));\n }", "public void readNetworkFile(String networkFilename)\n\t\tthrows IOException, NumberFormatException {\n\t\tif(DEBUG) System.out.println(\"reading network file from:\"+networkFilename);\n\t\tBufferedReader br = new BufferedReader(new FileReader(networkFilename));\n\t\tString line;\n\t\t// on the first line is the number of following lines that describe vertices\n\t\tint numVariables = -1;\n\t\tif((line = br.readLine()) != null){\n\t\t\tnumVariables = Integer.valueOf(line);\n\t\t}else{\n\t\t\tbr.close();\n\t\t\tthrow new IOException();\n\t\t}\n\t\tif(numVariables<0) {\n\t\t\tbr.close();\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\tfor(int i = 0;i<numVariables;i++){\n\t\t\tif((line = br.readLine()) != null){\n\t\t\t\tString[] tokenized = line.split(\" \");\n\t\t\t\tString variableName = tokenized[0];\n\t\t\t\ttokenized = tokenized[1].split(\",\");//values\n//\t\t\t\tSystem.out.printf(\"var:%s values:\",variableName);\n//\t\t\t\tfor(int q = 0; q < tokenized.length; q++) {\n//\t\t\t\t\tSystem.out.printf(\"%s \", tokenized[q]);\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println();\n\t\t\t\tFactor.addVariable(variableName, new ArrayList<String>(Arrays.asList(tokenized)));\n\t\t\t}else{\n\t\t\t\tbr.close();\n\t\t\t\tthrow new IOException(\"inconsistent network file.\");\n\t\t\t}\n\t\t}\n\t\tbr.close();\n\t}", "public CompositiveMatrix LoadMatrixFromFile(String filename)\n\t{\n\t\tFile filep = new File(\"D:\\\\[CSIE]\\\\_WorkSpaces\\\\Java\\\\XMLforJava\\\\src\\\\\"+filename);\n\t\t//File filep = new File(filename);\n\t\t//System.out.println(filename);\n\t\tif (!filep.exists())\n\t\t{\n\t\t\tSystem.out.printf(\"Error opening file on LoadMatrixFromFile()!\\n\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tString str ;\n\t\tString[] strArr ;\n\t\tScanner sc;\n\t\tCompositiveMatrix result = new CompositiveMatrix();\n\t\t//result.matrix = new ArrayList<ArrayList<Integer>>();\n\t\tresult.setNewMatrix();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tsc = new Scanner(filep);\n\t\t\tif(sc.hasNextLine())\n\t\t\t{\n\t\t\t\tstr = sc.nextLine();\n\t\t\t\t//System.out.println(str);\n\t\t\t\tstrArr = str.split(\",\");\n\t\t\t\t//System.out.println(strArr[0]);\n\t\t\t\tint numberOfRows = Integer.parseInt(strArr[0]);\n\t\t\t\t//result.numberOfRows = numberOfRows;\n\t\t\t\tresult.setRows(numberOfRows);\n\t\t\t\t//System.out.println(strArr[1]);\n\t\t\t\tint numberOfColumns = Integer.parseInt(strArr[1]);\n\t\t\t\t//result.numberOfColumns = numberOfColumns;\n\t\t\t\tresult.setColumns(numberOfColumns);\n\t\t\t\tint index = 2;\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < numberOfRows; ++i) \n\t\t\t\t{\n\t\t\t\t\tArrayList<Integer> matrixR = new ArrayList<Integer>();\n\t\t\t\t\tfor(int j = 0; j < numberOfColumns; ++j) \n\t\t\t\t\t{\n\t\t\t\t\t\tmatrixR.add(Integer.parseInt(strArr[index++]));\n\t\t\t\t\t}\n\t\t\t\t\t//result.matrix.add(matrixR);\n\t\t\t\t\tresult.addRow(matrixR);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsc.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) \n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(e.getLocalizedMessage());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public SparseDataset parse(File file) throws FileNotFoundException, IOException, ParseException {\n String name = file.getPath();\n return parse(name, new FileInputStream(file));\n }", "@Override\n\tpublic void load(final String filePath) {\n\t\tsuper.load(filePath);\n\t\ttry {\n\t\t\tfinal JCL_facade jcl = JCL_FacadeImpl.getInstance();\n\t\t\tfinal Object2DoubleMap<String> distances = new Object2DoubleOpenHashMap<>();\n\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(filePath));\n\t\t\tString str = null;\n\n\t\t\tList<String> inputLimpos = new LinkedList<>();\n\n\t\t\tdouble lower = 0;\n\n\t\t\t// ler o arquivo\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\tif (!str.trim().equals(\"EOF\")) {\n\t\t\t\t\tString[] inputDetalhes = str.split(\" \");\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tfor (final String frag : inputDetalhes) {\n\t\t\t\t\t\tif (!frag.equals(\"\")) {\n\t\t\t\t\t\t\tsb.append(frag + \":\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tinputLimpos.add(sb.toString());\n\t\t\t\t\tsb = null;\n\t\t\t\t\tinputDetalhes = null;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tin.close();\n\t\t\tin = null;\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tfinal ObjectSet<String> vertices = (ObjectSet<String>) jcl.getValue(\"vertices\").getCorrectResult();\n\n\t\t\tdouble lowest = Double.MAX_VALUE;\n\t\t\t/*\n\t\t\t * transitar todo projeto para DOUBLE tirar todos floats para que aceite o\n\t\t\t * permutation\n\t\t\t */\n\t\t\t// montando distancias\n\t\t\tfor (final String umaEntrada : inputLimpos) {\n\t\t\t\tString[] umaEntradaDetalhe = umaEntrada.split(\":\");\n\t\t\t\tdouble menorD = Double.MAX_VALUE;\n\t\t\t\tdouble maiorD = Double.MIN_VALUE;\n\t\t\t\tvertices.add(\"$\" + umaEntradaDetalhe[0] + \"$\");\n\t\t\t\tfor (final String outraEntrada : inputLimpos) {\n\t\t\t\t\tString[] outraEntradaDetalhe = outraEntrada.split(\":\");\n\t\t\t\t\tif (!umaEntradaDetalhe[0].equals(outraEntradaDetalhe[0])) {\n\t\t\t\t\t\tfinal double dx = (Double.parseDouble(outraEntradaDetalhe[1])\n\t\t\t\t\t\t\t\t- Double.parseDouble(umaEntradaDetalhe[1]));\n\t\t\t\t\t\tfinal double dy = (Double.parseDouble(outraEntradaDetalhe[2])\n\t\t\t\t\t\t\t\t- Double.parseDouble(umaEntradaDetalhe[2]));\n\n\t\t\t\t\t\tfinal double d = Math.hypot(dx, dy);\n\n\t\t\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$\" + outraEntradaDetalhe[0] + \"$\", d);\n\n\t\t\t\t\t\tif (d < menorD) {\n\t\t\t\t\t\t\tmenorD = d;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (d > maiorD) {\n\t\t\t\t\t\t\tmaiorD = d;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\toutraEntradaDetalhe = null;\n\t\t\t\t}\n\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$shorterD$\", menorD);\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$longerD$\", maiorD);\n\n\t\t\t\tlower += menorD;\n\t\t\t\tif (lowest > menorD) {\n\t\t\t\t\tlowest = menorD;\n\t\t\t\t}\n\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$X$\", Float.parseFloat(umaEntradaDetalhe[1]));\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$Y$\", Float.parseFloat(umaEntradaDetalhe[2]));\n\t\t\t\tumaEntradaDetalhe = null;\n\t\t\t}\n\n\t\t\tlower += lowest;\n\n\t\t\tinputLimpos.clear();\n\t\t\tinputLimpos = null;\n\n\t\t\tjcl.instantiateGlobalVar(\"numOfVertices\", vertices.size());\n\n\t\t\tjcl.setValueUnlocking(\"vertices\", vertices);\n\n\t\t\tjcl.setValueUnlocking(\"lower\", lower);\n\n\t\t\tJcldataAccess.instantiateVarInJCL(\"distances\", distances);\n\n\t\t\tSystem.out.println(vertices.toString());\n\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void readFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\t// read the headlines\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumVertices = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumPaths = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\ttmax = Double.parseDouble(lineElements[1]);\n\t\t\n//\t\tSystem.out.println(numVertices + \", \" + numPaths + \", \" + tmax);\n\n\t\t/* read benefits1 */\n\t\tint index = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\t\tSystem.out.println(sCurrentLine);\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\tdouble x = Double.parseDouble(lineElements[0]);\n\t\t\tdouble y = Double.parseDouble(lineElements[1]);\n\t\t\tList<Double> scores = new ArrayList<Double>();\n\t\t\tfor (int i = 2; i < lineElements.length; i++) {\n\t\t\t\tdouble score = Double.parseDouble(lineElements[i]);\n\t\t\t\tscores.add(new Double(score));\n\t\t\t}\n\t\t\tPOI POI = new POI(index, x, y, scores);\n\t\t\t//POI.printMe();\n\t\t\t\n\t\t\tvertices.add(POI);\n\t\t\tindex ++;\n\t\t}\n\t\t\n\t\t// create the arcs and the graph\n\t\tfor (int i = 0; i < vertices.size(); i++) {\n\t\t\tfor (int j = 0; j < vertices.size(); j++) {\n\t\t\t\tArc arc = new Arc(vertices.get(i), vertices.get(j));\n\t\t\t\tarcs.add(arc);\n\t\t\t\tgraph.put(new Tuple2<POI, POI>(vertices.get(i), vertices.get(j)), arc);\n\t\t\t}\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}", "private void loadInvertedIndexFromFile(String indexPath) {\n try {\n invIndex = new HashMap<String, HashMap<String, IndexEntry>>();\n Scanner sc = new Scanner(new File(indexPath));\n int lineNum = 0;\n while (sc.hasNextLine()) {\n String entry = sc.nextLine().trim();\n if (!entry.isEmpty()) {\n String[] termValue = entry.trim().split(\" -> \");\n String[] docEntries = termValue[1].split(\"\\\\) \\\\(\");\n // clean up the opening and closing paranthesis post split\n if (docEntries[0].charAt(0) == '(')\n docEntries[0] = docEntries[0].substring(1);\n String lastDocEntry = docEntries[docEntries.length - 1];\n if (lastDocEntry.charAt(lastDocEntry.length() - 1) == ')')\n docEntries[docEntries.length - 1] =\n lastDocEntry.substring(0, lastDocEntry.length() - 1);\n HashMap<String, IndexEntry> invEntryVal = new HashMap<String, IndexEntry>();\n for (String docEntry : docEntries) {\n String[] components = docEntry.split(\", \");\n String docID = components[0];\n int tf = Integer.parseInt(components[1]);\n\n // if term positions information present\n List<Integer> termPos = new LinkedList<Integer>();\n if (components.length > 2) {\n String[] pos = components[2].replace(\"[\", \"\").replace(\" ]\", \"\").split(\" \");\n for (String eachPos : pos)\n termPos.add(Integer.parseInt(eachPos));\n }\n IndexEntry ie = new IndexEntry(docID, termPos, tf);\n invEntryVal.put(docID, ie);\n }\n invIndex.put(termValue[0], invEntryVal);\n System.out.println((++lineNum) + \" | \" + termValue[0]);\n }\n }\n sc.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public CSGraph(String fileName) {\n hashTable = new CSHashing();\n words = readWords(fileName);\n\n// createGraph(); // Minimal lösning\n\n createHashTable(); // Frivillig bra lösning\n createGraphWithHashTable(); // Frivillig bra lösning\n\n// shortestPaths(); // Metod som endast används till textfilen utan par.\n\n readPairs(\"files/5757Pairs\");\n }", "public static Schematic schematicFromAtoms(File file) {\n try {\n FileInputStream fileInputStream = new FileInputStream(file);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n\n return schematicFromJson(objectInputStream.readUTF());\n\n } catch (IOException err) {\n err.printStackTrace();\n return null;\n }\n }", "public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }", "public Cmdline(String file) {\n \n try {\n File selectedFile = new File(file);\n Model m = loadModel( selectedFile );\n if( m != null )\n models.add( m );\n } catch (FileNotFoundException fnfe) {\n System.out.println(\"File not found\");\n } catch( ParseException pe ) {\n System.out.println(\"Parse Error: \" + pe.getMessage());\n } catch( LemException le ) {\n System.out.println(\"Parse Error: \" + le.getMessage());\n } catch( IOException ioe ) {\n System.out.println(\"I/OO Error: \" + ioe.getMessage());\n }\n \n/* metamodel.Procedure p = m.getDomain( \"Publications\" ).getClass( \"Manuscript\" ).getStateMachine().getState(\"Adding\").getProcedure();\n runtime.ModelInstance i = new runtime.ModelInstance();\n \n p.execute(i); */\n }", "public static ParsedData arffFileReader(File file) throws Exception {\n\n ParsedData data;\n String line = null;\n BufferedReader br = new BufferedReader(new FileReader(file));\n\n ArrayList<Attribute> attributes = new ArrayList<>();\n boolean attributeTest = true;\n int attributeNumber = 0;\n ArrayList<String> datasetList = new ArrayList<>();\n String relName = \"\";\n\n int rows = 0;\n int columns = 0;\n\n while ((line = br.readLine()) != null) {\n\n line = line.trim();\n\n if (attributeTest) {\n if(line.startsWith(\"@relation\")){\n relName = line.split(\" \")[1];\n }\n\n if (line.startsWith(\"@attribute\")) {\n attributes.add(parseAttribute(line, attributeNumber));\n attributeNumber++;\n }\n } else {\n String[] instance = parseInstance(line);\n if(instance.length != attributes.size()) {\n System.out.println(\"Skip illegal line: \" + Utils.concatStringArray(instance));\n continue;\n }\n for (int i = 0; i < instance.length; i++) {\n datasetList.add(instance[i]);\n }\n rows++;\n }\n if (line.startsWith(\"@data\")) {\n attributeTest = false;\n }\n\n }\n columns = attributes.size();\n\n String[] datasetArray = new String[datasetList.size()];\n for (int i = 0; i < datasetList.size(); i++) {\n datasetArray[i] = datasetList.get(i);\n }\n\n DataSet dataset = new DataSet(datasetArray, rows, columns);\n data = new ParsedData(dataset, attributes, relName);\n return data;\n\n }", "public Graph load(String filename, NumberEdgeValue nev) throws IOException\n {\n return load(filename, new SparseGraph(), nev);\n }", "String loadFromFile () throws Exception {\n\n Reader reader = new Reader(new FileReader(file));\n String line;\n\n// reads all lines of the file\n while ((line = reader.readLine()) != null) {\n\n// depending on the object tag [element], it reads relevant parameters and creates the Element\n if (line.contains(\"[timeline]\"))\n timelines.add(new Timeline(reader.getStringArgument()));\n\n else if (line.contains(\"[event]\")) {\n String timelineName = reader.getStringArgument();\n for (Timeline timeline : timelines) {\n if (timelineName.equals(timeline.name)) {\n timeline.addEvent(\n reader.getStringArgument(),\n reader.getDateArgument(),\n reader.getDateArgument(),\n reader.getIntArgument() != 0,\n reader.getNotesArgument());\n break;\n }\n }\n }\n }\n reader.close();\n return (\"Data loaded successfully\");\n }", "public static Match[] init () throws FileNotFoundException{\n\n\t\tint numLine = 0;\n\t\t//reads the input file ExchangeRate.txt\n\t\tScanner input1 = new Scanner (new File (\"src/ExchangeRate.txt\"));\n\n\t\t//This loop goes through each line\n\t\twhile (input1.hasNextLine()) {\n\t\t\tinput1.nextLine();\n\t\t\tnumLine++;\n\t\t}\n\n\t\t//Close it in order to start from 0 again for the next loop\n\t\tinput1.close();\n\n\n\t\tMatch [] data = new Match [numLine];\n\t\tint i = 0;\n\t\tScanner input = new Scanner (new File(\"src/ExchangeRate.txt\"));\n\n\t\t//This while loop insures that the program names each section correctly. \n\t\twhile (input.hasNext()) {\n\t\t\tString curr1 = input.next(); //Set curr1 to the first section on the certain line\n\t\t\tString curr2 = input.next(); //Set curr2 to the second section on that same line\n\t\t\tdouble ex = input.nextDouble(); //Set ex to the third section on the same line\n\t\t\t//Sets currency2, currency2, and the exchange rate into an array\n\t\t\tdata[i] = new Match(curr1, curr2, ex);\n\t\t\ti++;\n\t\t}\n\t\tinput.close();\n\t\treturn data;\n\n\t}", "public Exoplanet(int num) throws IOException {\n name = findNameFromLine(num, exoData);\n //the numbers added to the first parameter correspond to the column in the table on the website\n massVal = findProperty(planetLines.get(num)+1, exoData) == null ? 0 : Double.parseDouble(findProperty(planetLines.get(num)+1, exoData));\n mass = findProperty(planetLines.get(num)+1, exoData) == null ? \"Unknown\" : (findProperty(planetLines.get(num)+1, exoData) + \" Jupiter masses\");\n radVal = findProperty(planetLines.get(num)+2, exoData) == null ? 0 : Double.parseDouble(findProperty(planetLines.get(num)+2, exoData));\n radius = findProperty(planetLines.get(num)+2, exoData) == null ? \"Unknown\" : (findProperty(planetLines.get(num)+2, exoData) + \" Jupiter radii\");\n periodVal = findProperty(planetLines.get(num)+3, exoData) == null ? 0 : Double.parseDouble(findProperty(planetLines.get(num)+3, exoData));\n period = findProperty(planetLines.get(num)+3, exoData) == null ? \"Unknown\" : (findProperty(planetLines.get(num)+3, exoData) + \" days\");\n SMAVal = findProperty(planetLines.get(num)+4, exoData) == null ? 0 : Double.parseDouble(findProperty(planetLines.get(num)+4, exoData));\n semiMajorAxis = findProperty(planetLines.get(num)+4, exoData) == null ? \"Unknown\" : (findProperty(planetLines.get(num)+4, exoData) + \" AU\");\n temp = findProperty(planetLines.get(num)+5, exoData) == null ? \"Unknown\" : (findProperty(planetLines.get(num)+5, exoData) + \" K\");\n discMethod = findProperty(planetLines.get(num)+6, exoData);\n discYearVal = findProperty(planetLines.get(num)+7, exoData) == null ? 0 : Double.parseDouble(findProperty(planetLines.get(num)+7, exoData));\n discYear = findProperty(planetLines.get(num)+7, exoData) == null ? \"Unknown\" : findProperty(planetLines.get(num)+7, exoData);\n distanceVal = findProperty(planetLines.get(num)+8, exoData) == null ? 0 : Double.parseDouble(findProperty(planetLines.get(num)+8, exoData));\n distance = findProperty(planetLines.get(num)+8, exoData) == null ? \"Unknown\" : (findProperty(planetLines.get(num)+8, exoData) + \" lightyears\");\n }", "public static void main(String[] args) throws FileNotFoundException {\n final Scanner in = new Scanner(new FileInputStream(\"C:\\\\Projects\\\\Solutions\\\\src\\\\tests.txt\"));\r\n\r\n final int Q = in.nextInt();\r\n for (int q = 0; q < Q; q++) {\r\n final long a = in.nextLong();\r\n final long b = in.nextLong();\r\n final long k = in.nextLong();\r\n final int m = in.nextInt();\r\n\r\n final Complex result = exponentiate(new Complex(a, b), k, m);\r\n\r\n System.out.println(result.real + \" \" + result.imaginary);\r\n }\r\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "public void loadElevationData(String filename) throws IOException {\n\tScanner scanner = new Scanner(new File(filename));\n\tnRows = scanner.nextInt();\n\tnColumns = scanner.nextInt();\n\televation = new double[nRows][nColumns];\n\tnormal = new double[nRows][nColumns][3];\n\tString line = scanner.nextLine();\n\tfor (int r = 0; r < nRows; r++)\n\t for (int c = 0; c < nColumns; c++)\n\t\televation[r][c] = scanner.nextDouble();\n\t// Calculate normal vectors\n\tfor (int row = 0; row < nRows-1; row++)\n\t for (int col = 0; col < nColumns-1; col++) {\n\t\tdouble v1x = 1;\n\t\tdouble v1y = elevation[row+1][col+1] - elevation[row][col];\n\t\tdouble v1z = 1;\n\t\tdouble v2x = 1;\n\t\tdouble v2y = elevation[row][col+1] - elevation[row+1][col];\n\t\tdouble v2z = -1;\n\t\tnormal[row][col][0] = -(v1z * v2y - v1y * v2z);\n\t\tnormal[row][col][1] = -(v1x * v2z - v1z * v2x);\n\t\tnormal[row][col][2] = -(v1y * v2x - v1x * v2y);\n\t }\n }", "public static void main(String[] args) throws IOException{\n\tif (args.length!=1) {\n\t System.err.println(\"\\n\");\n\t System.err.println(\"Simple calculator\\n\");\n\t System.err.println(\"=================\\n\\n\");\n\t System.err.println(\"Please give as input argument a filename\\n\");\n\t System.exit(-1);\n\t}\n\tString filename=args[0];\n\n\t// open the input file\n\tCharStream input = CharStreams.fromFileName(filename);\n\t //new ANTLRFileStream (filename); // depricated\n\t\n\t// create a lexer/scanner\n\tsimpleCalcLexer lex = new simpleCalcLexer(input);\n\t\n\t// get the stream of tokens from the scanner\n\tCommonTokenStream tokens = new CommonTokenStream(lex);\n\t\n\t// create a parser\n\tsimpleCalcParser parser = new simpleCalcParser(tokens);\n\t\n\t// and parse anything from the grammar for \"start\"\n\tParseTree parseTree = parser.start();\n\n\t// Construct an interpreter and run it on the parse tree\n\tInterpreter interpreter = new Interpreter();\n\n\tDouble result=interpreter.visit(parseTree);\n\tSystem.out.println(\"The result is: \"+result);\n }", "public ModelSourceFile(File file) {\n\t\tsource_file = file;\n\t\tfilename = file.getName();\n\t\tnullChecks = new ArrayList<String>();\n\t\tnullVars = new HashMap<String, ArrayList<String>>();\n\t\tnullFields = new ArrayList<String>();\n\t\tassignments = new ArrayList<String>();\n\t\tnullAssignments = new HashMap<String, ArrayList<String>>();\n\t\tinvocs = new HashMap<String, ArrayList<String>>();\n\t\tremovedFields = new ArrayList<String>();\n\t\tremovedVars = new HashMap<String, ArrayList<String>>();\n\t\tremovedAssigns = new HashMap<String, ArrayList<String>>();\n\t\tNODPs = new ArrayList<String>();\n\t\tcollVars = new ArrayList<String>();\n\t\toptVars = new ArrayList<String>();\n\t\tcatchBlocks = new ArrayList<String>();\n\n\t\tallGenerics = new ArrayList<String>();\n\t\tgenerics = new HashMap<String, List<String>>();\n\t\t\n\t\tgenerics.put(\"type argument methods\", new ArrayList<String>());\n\t\tgenerics.put(\"wildcard\", new ArrayList<String>());\n\t\tgenerics.put(\"type declarations\", new ArrayList<String>());\n\t\tgenerics.put(\"type parameter methods\", new ArrayList<String>());\n\t\tgenerics.put(\"type parameter fields\", new ArrayList<String>());\n\t\tgenerics.put(\"diamond\", new ArrayList<String>());\n\t\tgenerics.put(\"method invocations\", new ArrayList<String>());\n\t\tgenerics.put(\"class instantiation\", new ArrayList<String>());\n\t\tgenerics.put(\"nested\", new ArrayList<String>());\n\t\t\n\t\tcommits = new ArrayList<ModelCommit>();\n\t\tmethods = new ArrayList<String>();\n\t\tmethodInvocs = new HashMap<String, Integer>();\n\t}", "public static TurbineSpecification loadFromResource(final String filename) throws IOException {\n final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n final File file = new File(classLoader.getResource(filename).getFile());\n CSVFormat csvFileFormat = CSVFormat.DEFAULT.withFirstRecordAsHeader();\n InputStreamReader fileReader = new InputStreamReader(\n new FileInputStream(file), Charset.defaultCharset());\n Iterable<CSVRecord> records = new CSVParser(fileReader, csvFileFormat).getRecords();\n\n double bladeLength = 0;\n double powerRate = 0;\n double hubHeight = 0;\n double cutIn = 0;\n double cutOut = 0;\n IntList wind = new IntArrayList();\n DoubleList powerValues = new DoubleArrayList();\n DoubleList powerCoeffValues = new DoubleArrayList();\n boolean firstLine = true;\n for (CSVRecord record : records) {\n if (firstLine) {\n bladeLength = Double.valueOf(record.get(BLADE_LENGTH_HEADER));\n powerRate = Double.valueOf(record.get(POWER_RATE_HEADER));\n hubHeight = Double.valueOf(record.get(HUB_HEIGHT_HEADER));\n cutIn = Double.valueOf(record.get(CUT_IN_HEADER));\n cutOut = Double.valueOf(record.get(CUT_OUT_HEADER));\n firstLine = false;\n }\n wind.add(Integer.valueOf(record.get(WIND_VALUES_HEADER)));\n powerValues.add(Double.valueOf(record.get(POWER_VALUES_HEADER)));\n powerCoeffValues.add(Double.valueOf(record.get(POWER_COEFF_HEADER)));\n }\n\n int last = wind.get(wind.size() - 1);\n List<Double> corrPowerValues = new ArrayList(last + 1);\n List<Double> corrPowerCoeffValues = new ArrayList(last + 1);\n for (int i = 0; i < wind.get(wind.size() - 1) + 1; i++) {\n corrPowerValues.add(0d);\n corrPowerCoeffValues.add(0d);\n }\n\n for (int i = 0; i < wind.size(); i++) {\n corrPowerValues.set(wind.getInt(i), powerValues.get(i));\n corrPowerCoeffValues.set(wind.getInt(i), powerCoeffValues.get(i));\n }\n\n fileReader.close();\n return new AutoValue_TurbineSpecification(bladeLength, powerRate, hubHeight, cutIn,\n cutOut, corrPowerValues, corrPowerCoeffValues);\n }", "public static void implement_DSL_Script(String FileName, Node[] nodes) throws IOException {\n Path fileName = Path.of(FileName);\n String data = Files.readString(fileName);\n data = data.replace(\"\\n\", \"\").replace(\"\\r\", \"\");\n String[] Data = data.split(\";\");\n //make new HashMap for directions in Node\n Map<String, Node> directions = new HashMap<String, Node>();\n //Format DSL string to Node\n for (String Line:Data){\n // rewrite dsl code to readable String\n Line = Line.replace(\"s=\",\"\").replace(\"(s’=\",\"\").replace(\")\",\"\");\n String[] full = Line.split(\" -> \");\n String[] dirs = full[1].split(\" \\\\+ \");\n //read directions for current node en write it to the node\n for (String line:dirs){\n String[] Split = line.split(\" : \");\n //System.out.println(Arrays.toString(Split));\n directions.put(Split[0],nodes[Integer.parseInt(Split[1])]);\n nodes[Integer.parseInt(full[0])].putDirections(Split[0],nodes[Integer.parseInt(Split[1])]);\n }\n\n }\n }", "public SYEParser(InputStream input, String name) throws FileNotFoundException {\n super(input);\n this.filename = name;\n }", "public Plain(String inputFileName) throws FileNotFoundException {\n File fileReader = new File(inputFileName);\n Scanner fileScanner = new Scanner(fileReader);\n while (fileScanner.hasNextLine()) {\n width++;\n fileScanner.nextLine();\n }\n fileScanner.close();\n Scanner scanner = new Scanner(fileReader);\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n System.out.println(\"... reading ...\");\n while (scanner.hasNext()) {\n for (int j = 1; j < grid.length - 1; j++) {\n for (int k = 1; k < grid[j].length - 1; k++) {\n String nextFileObj = scanner.next();\n char firstLetter = nextFileObj.charAt(0);\n int animalAge = 0;\n if (nextFileObj.length() == 2) {\n animalAge = Character.getNumericValue(nextFileObj.charAt(1));\n }\n switch (firstLetter) {\n case 'B':\n grid[j][k] = new Badger(plain, j, k, animalAge);\n break;\n case 'E':\n grid[j][k] = new Empty(plain, j, k);\n break;\n case 'F':\n grid[j][k] = new Fox(plain, j, k, animalAge);\n break;\n case 'G':\n grid[j][k] = new Grass(plain, j, k);\n break;\n case 'R':\n grid[j][k] = new Rabbit(plain, j, k, animalAge);\n break;\n default:\n grid[j][k] = null;\n break;\n }\n }\n }\n }\n scanner.close();\n System.out.println(\" reading complete \");\n }", "Points(String filepath){\n readPointsFile(filepath); //dengan file points.txt\n }", "public Property(String configFileName) {\r\n\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\r\n\t\tif (configFileName == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tScanner in = null;\r\n\t\tScanner scan = null;\r\n\t\ttry {\r\n\t\t\tFile conf = new File(configFileName);\r\n\t\t\tin = new Scanner(conf);\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString line = in.nextLine().replace('=', ',');\r\n\t\t\t\tscan = new Scanner(line);\r\n\t\t\t\tscan.useDelimiter(\",\");\r\n\t\t\t\tString firstWord = scan.next();\r\n\t\t\t\tif (firstWord.equals(\"positive\")) {\r\n\t\t\t\t\tpositive = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"negative\")) {\r\n\t\t\t\t\tnegative = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"stop\")) {\r\n\t\t\t\t\tstop = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"scoringmethod\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tscoringmethod = Integer.parseInt(next);\r\n\t\t\t\t} else if (firstWord.equals(\"mindistance\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tmindistance = Double.parseDouble(next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} finally{\r\n\t\t\tif(scan != null)\r\n\t\t\t\tscan.close();\r\n\t\t}\r\n\t}", "public void readSpeedFile(File file) {\n\t/** predefine the periods **/\n\tperiods = Period.universalDefine();\n\t\n\tspeedTables = new ArrayList<SpeedTable>();\n\t\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\tSystem.out.println(sCurrentLine);\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\tSpeedTable speedTable = new SpeedTable();\n\t\t\tfor (int i = 0; i < lineElements.length; i++) {\n\t\t\t\tdouble fromTime = periods.get(i).fromTime();\n\t\t\t\tdouble toTime = periods.get(i).toTime();\n\t\t\t\tdouble speed = Double.parseDouble(lineElements[i]);\n\t\t\t\tPeriodSpeed periodSpeed = new PeriodSpeed(fromTime, toTime, speed);\n\t\t\t\tspeedTable.add(periodSpeed);\n\t\t\t}\n\t\t\t\n\t\t\tspeedTables.add(speedTable);\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n\t\n\t// create the all one speed table\n\tallOneSpeedTable = new SpeedTable();\n\tfor (int i = 0; i < periods.size(); i++) {\n\t\tdouble fromTime = periods.get(i).fromTime();\n\t\tdouble toTime = periods.get(i).toTime();\n\t\tallOneSpeedTable.add(new PeriodSpeed(fromTime, toTime, 1));\n\t}\n\t/*\n\tfor (int i = 0; i < speedTables.size(); i++) {\n\t\tSystem.out.println(\"For category \" + i);\n\t\tspeedTables.get(i).printMe();\n\t}*/\n}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void readNetworkFromFile() {\r\n\t\tFileReader fr = null;\r\n\t\t// open file with name given by filename\r\n\t\ttry {\r\n\t\t\ttry {\r\n\t\t\t\tfr = new FileReader (filename);\r\n\t\t\t\tScanner in = new Scanner (fr);\r\n\r\n\t\t\t\t// get number of vertices\r\n\t\t\t\tString line = in.nextLine();\r\n\t\t\t\tint numVertices = Integer.parseInt(line);\r\n\r\n\t\t\t\t// create new network with desired number of vertices\r\n\t\t\t\tnet = new Network (numVertices);\r\n\r\n\t\t\t\t// now add the edges\r\n\t\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\t\tline = in.nextLine();\r\n\t\t\t\t\tString [] tokens = line.split(\"[( )]+\");\r\n\t\t\t\t\t// this line corresponds to add vertices adjacent to vertex u\r\n\t\t\t\t\tint u = Integer.parseInt(tokens[0]);\r\n\t\t\t\t\t// get corresponding Vertex object\r\n\t\t\t\t\tVertex uu = net.getVertexByIndex(u);\r\n\t\t\t\t\tint i=1;\r\n\t\t\t\t\twhile (i<tokens.length) {\r\n\t\t\t\t\t\t// get label of vertex v adjacent to u\r\n\t\t\t\t\t\tint v = Integer.parseInt(tokens[i++]);\r\n\t\t\t\t\t\t// get corresponding Vertex object\r\n\t\t\t\t\t\tVertex vv = net.getVertexByIndex(v);\r\n\t\t\t\t\t\t// get capacity c of (uu,vv)\r\n\t\t\t\t\t\tint c = Integer.parseInt(tokens[i++]);\r\n\t\t\t\t\t\t// add edge (uu,vv) with capacity c to network \r\n\t\t\t\t\t\tnet.addEdge(uu, vv, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinally { \r\n\t\t\t\tif (fr!=null) fr.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.err.println(\"IO error:\");\r\n\t\t\tSystem.err.println(e);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public Interpreter(String fileName) throws FileNotFoundException {\n super(fileName);\n instructionsStack.push(new ArrayList<>());\n }", "public SurveyEngine(String filePath) throws SurveyEngineException {\r\n this.filePath = filePath;\r\n try {\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n this.doc = dBuilder.parse(new File(filePath));\r\n } catch (ParserConfigurationException | SAXException | IOException e) {\r\n throw new SurveyEngineException(\"Can't open file \" + filePath, e);\r\n }\r\n \r\n try {\r\n SchemaValidator validator = new SchemaValidator(\"src/xml/survey.xsd\");\r\n validator.validate(this.filePath);\r\n } catch (SAXException | ParserConfigurationException | IOException e) {\r\n throw new SurveyEngineException(\"Validation failed!\", e);\r\n }\r\n }", "public Equation(String strEquation) {\n\t\tthis.strEquation = strEquation;\n\t}", "public ProductionLine buildFromFile(String path) throws ParserConfigurationException, IOException, SAXException {\n Document doc = DocumentBuilderFactory\n .newInstance()\n .newDocumentBuilder()\n .parse(new File(path));\n doc.getDocumentElement().normalize();\n\n HashMap<String, ProductionUnit> productionUnits = new HashMap<>();\n\n // Get list of stages\n NodeList stageNodes = doc.getElementsByTagName(\"ProductionStage\");\n\n // Loop through stages\n for (int i = 0; i < stageNodes.getLength(); i++) {\n\n Node node = stageNodes.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element stage = (Element) node;\n\n // Create station\n String name = stage.getElementsByTagName(\"Name\").item(0).getTextContent();\n\n ProductionStage productionStage = getStage(productionUnits, name);\n\n if (productionStage == null) continue;\n\n NodeList predecessors = stage.getElementsByTagName(\"Predecessors\");\n if (predecessors.getLength() > 0) {\n Node sNode = predecessors.item(0);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element ePredecessors = (Element) sNode;\n NodeList stages = ePredecessors.getElementsByTagName(\"Stage\");\n for (int j = 0; j < stages.getLength(); j++) {\n productionStage.addPredecessor(getStage(productionUnits, stages.item(j).getTextContent()));\n }\n }\n }\n\n NodeList successors = stage.getElementsByTagName(\"Successors\");\n if (successors.getLength() > 0) {\n Node sNode = successors.item(0);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element eSuccessors = (Element) sNode;\n NodeList stages = eSuccessors.getElementsByTagName(\"Stage\");\n for (int j = 0; j < stages.getLength(); j++) {\n productionStage.addSuccessor(getStage(productionUnits, stages.item(j).getTextContent()));\n }\n }\n }\n\n NodeList input = stage.getElementsByTagName(\"Input\");\n if (input.getLength() > 0) {\n InterStageStorage storage = getStorage(productionUnits, input.item(0).getTextContent());\n if (storage == null) continue;\n storages.add(storage);\n productionStage.setInput(storage);\n } else {\n // All stages except beginning\n productionStage.updateState(ProductionStage.State.IDLE);\n }\n\n NodeList output = stage.getElementsByTagName(\"Output\");\n if (output.getLength() > 0) {\n InterStageStorage storage = getStorage(productionUnits, output.item(0).getTextContent());\n if (storage == null) continue;\n storages.add(storage);\n productionStage.setOutput(storage);\n }\n\n stages.add(productionStage);\n }\n }\n return this;\n }", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void createFile() throws Exception {\n\t\t // retrieve an instance of H4File\n\t\t FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF4);\n\n\t\t if (fileFormat == null) {\n\t\t System.err.println(\"Cannot find HDF4 FileFormat.\");\n\t\t return;\n\t\t }\n\n\t\t // create a new file with a given file name.\n\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\tH4File testFile = (H4File) fileFormat.create(fname);\n\n\t\t if (testFile == null) {\n\t\t System.err.println(\"Failed to create file:\" + fname);\n\t\t return;\n\t\t }\n\n\t\t // open the file and retrieve the root group\n\t\t testFile.open();\n\t\t Group root = (Group) ((javax.swing.tree.DefaultMutableTreeNode) testFile.getRootNode()).getUserObject();\n\n\t\t // set the data values\n\t\t int[] dataIn = new int[20 * 10];\n\t\t for (int i = 0; i < 20; i++) {\n\t\t for (int j = 0; j < 10; j++) {\n\t\t dataIn[i * 10 + j] = 1000 + i * 100 + j;\n\t\t }\n\t\t }\n\n\t\t // create 2D 32-bit (4 bytes) integer dataset of 20 by 10\n\t\t Datatype dtype = testFile.createDatatype(Datatype.CLASS_INTEGER, 4, Datatype.NATIVE, Datatype.NATIVE);\n\t\t @SuppressWarnings(\"unused\")\n\t\t\t\tDataset dataset = testFile\n\t\t .createScalarDS(\"2D 32-bit integer 20x10\", root, dtype, dims2D, null, null, 0, dataIn);\n\n\t\t // close file resource\n\t\t //testFile.close();\n\t\t }", "void readGraphFromFile();", "Matrix(File myFile)\n\t{\n\t\tScanner sc = null;\n\t\ttry \n\t\t{\n\t\t\tsc = new Scanner(myFile);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\trows = Integer.parseInt(sc.nextLine());\n\t\tcols = Integer.parseInt(sc.nextLine());\n\t\tA = new double[rows][cols+1];\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tint j = 0;\n\t\t\tfor(j = 0; j < cols; j++)\n\t\t\t{\n\t\t\t\tA[i][j] = sc.nextDouble();\n\t\t\t}\n\t\t\t//A[i][j] = sc.nextDouble();\n\t\t}\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tA[i][cols] = sc.nextDouble();\n\t\t}\n\t\tisFree = new boolean[cols];\n\t}", "private Object parseExpr() throws IOException, FSException{\n\n ETreeNode curNode=null;\n boolean end=false;\n Object val;\n boolean negate=false; //flag for unary minus\n boolean not=false;//flag for unary not.\n boolean prevOp=true;//flag - true if previous value was an operator\n\n while (!end){\n\n switch (tok.ttype) {\n\n\n //the various possible 'values'\n case LexAnn.TT_INTEGER:\n case LexAnn.TT_DOUBLE:\n case LexAnn.TT_STRING:\n case LexAnn.TT_WORD:\n case LexAnn.TT_FUNC:\n case LexAnn.TT_NULL:\n case LexAnn.TT_ARRAY:{\n\n if (!prevOp){\n parseError(\"Expected Operator\");\n } else {\n\n val=null;\n ETreeNode node=new ETreeNode();\n node.type=ETreeNode.E_VAL;\n\n switch (tok.ttype){\n //numbers - just get them\n case LexAnn.TT_INTEGER:{\n val=tok.value;\n break;\n }\n case LexAnn.TT_DOUBLE:{\n val=tok.value;\n break;\n }\n //functions - evaluate them\n case LexAnn.TT_FUNC:{\n String name=(String)tok.value;\n getNextToken();\n val=parseCallFunc(name);\n break;\n }\n //arrays - evaluate them\n case LexAnn.TT_ARRAY:{\n String name=(String)tok.value;\n getNextToken(); //should be a '['\n getNextToken(); //should be the index\n Object index=parseExpr();\n try {\n val=host.getVarEntry(name,index);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n break;\n }\n //variables - resolve them\n case LexAnn.TT_WORD:{\n if (hasVar((String)tok.value)) {\n val=getVar((String)tok.value);\n } else {\n try {\n val=host.getVarEntry((String)tok.value,null);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n }\n break;\n }\n //strings - just get again\n case LexAnn.TT_STRING:{\n val=tok.value;\n break;\n }\n //null\n case LexAnn.TT_NULL:{\n val=new FSObject(null);\n break;\n }\n }\n\n //unary not\n if (not){\n if (val instanceof Integer){\n if (((Integer)val).intValue()==0){\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n not=false;\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Boolean) {\n if (((FSObject)val).getObject().equals(Boolean.FALSE)) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Integer) {\n if (((Integer)((FSObject)val).getObject()).intValue()==0) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else {\n String msg=val.getClass().getName();\n if (val instanceof FSObject) msg=\"FSObject with \"+((FSObject)val).getNullClass().getName();\n parseError(\"Type mismatch for ! \"+msg);\n }\n }\n\n //unary minus\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n node.value=val;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n\n prevOp=false;\n }\n break;\n }\n /*operators - have to be more carefull with these.\n We build an expression tree - inserting the nodes at the right\n points to get a reasonable approximation to correct operator\n precidence*/\n case LexAnn.TT_LEQ:\n case LexAnn.TT_LNEQ:\n case LexAnn.TT_MULT:\n case LexAnn.TT_DIV:\n case LexAnn.TT_MOD:\n case LexAnn.TT_PLUS:\n case LexAnn.TT_MINUS:\n case LexAnn.TT_LGR:\n case LexAnn.TT_LGRE:\n case LexAnn.TT_LLSE:\n case LexAnn.TT_LLS:\n case LexAnn.TT_NOT:\n case LexAnn.TT_LAND:\n case LexAnn.TT_LOR: {\n if (prevOp){\n if (tok.ttype==LexAnn.TT_MINUS){\n negate=true;\n } else if (tok.ttype==LexAnn.TT_NOT){\n not=true;\n } else {\n parseError(\"Expected Expression\");\n }\n } else {\n\n ETreeNode node=new ETreeNode();\n\n node.type=ETreeNode.E_OP;\n node.value=new Integer(tok.ttype);\n\n if (curNode.parent!=null){\n\n int curPrio=getPrio(tok.ttype);\n int parPrio=\n getPrio(((Integer)curNode.parent.value).intValue());\n\n if (curPrio<=parPrio){\n //this nodes parent is the current nodes grandparent\n node.parent=curNode.parent.parent;\n //our nodes left leg is now linked into the current nodes\n //parent\n node.left=curNode.parent;\n //hook into grandparent\n if (curNode.parent.parent!=null){\n curNode.parent.parent.right=node;\n }\n\n //the current nodes parent is now us (because of above)\n curNode.parent=node;\n //set the current node.\n curNode=node;\n } else {\n //current node's parent's right is now us.\n curNode.parent.right=node;\n //our nodes left is the current node.\n node.left=curNode;\n //our nodes parent is the current node's parent.\n node.parent=curNode.parent;\n //curent nodes parent is now us.\n curNode.parent=node;\n //set the current node.\n curNode=node;\n }\n } else {\n //our node's left is the current node\n node.left=curNode;\n //current node's parent is us now\n //we don't have to set our parent, as it is null.\n curNode.parent=node;\n //set current node\n curNode=node;\n }\n prevOp=true;\n }\n break;\n }\n case '(':\n //start of an bracketed expression, recursively call ourself\n //to get a value\n {\n getNextToken();\n val=parseExpr();\n\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n ETreeNode node=new ETreeNode();\n node.value=val;\n node.type=ETreeNode.E_VAL;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n prevOp=false;\n break;\n }\n\n default: {\n end=true;\n }\n\n }\n if (!end){\n tok.nextToken();\n }\n }\n\n //find the top of the tree we just built.\n if (curNode==null) parseError(\"Missing Expression\");\n while(curNode.parent!=null){\n curNode=curNode.parent;\n }\n\n\n return evalETree(curNode);\n\n }", "public MathEquation() {\n }", "public static DefinedStructure loadSingleStructure(File source) throws IOException {\n DefinedStructure structure = new DefinedStructure();\n structure.b(NBTCompressedStreamTools.a(new FileInputStream(source)));\n return structure;\n }", "public String parse(File file);", "private void initFromFile(Configuration config) throws FileNotFoundException {\n String file = config.getString(OrderFile_Type_Property_Name);\n List<List<String>> contents = FileUtils.readCsv(file);\n int index;\n for (List<String> rowContent : contents) {\n index = 0;\n String accountId = rowContent.get(index++);\n String orderId = rowContent.get(index++);\n String exchange = rowContent.get(index++);\n String stockId = rowContent.get(index++);\n String tradingDay = rowContent.get(index++);\n\n\n if (this.date == 0) {\n // 2019-11-13 00:00:00\n this.date = TimeUtils.formatTradeDate(tradingDay);\n } else if (TimeUtils.formatTradeDate(tradingDay) != date) {\n throw new InitializationException(MessageFormat.format(\"Two different trading days are sent to system, {0} and {1}.\", String.valueOf(this.date), String.valueOf(TimeUtils.formatTradeDate(tradingDay))));\n }\n\n String side = rowContent.get(index++);\n String type = rowContent.get(index++);\n double price = Double.valueOf(rowContent.get(index++));\n String algo = rowContent.get(index++);\n String startTime = rowContent.get(index++);\n String endTime = rowContent.get(index++);\n int qty = Integer.valueOf(rowContent.get(index++));\n double pov = Double.valueOf(rowContent.get(index));\n\n Order order = new Order(orderId, accountId, stockId, startTime, endTime, algo, type, price, pov, side, qty, exchange);\n this.cache.put(orderId, order);\n }\n }", "public void makeModel(File file) throws IOException, TasteException{\n\t\tmodel = new FileDataModel(file);\t\n\t\t\n\t\tsim1 = new PearsonCorrelationSimilarity(model);\n\t}", "public void readFile() {\r\n try {\r\n final String file = \"ConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\";\r\n double average = 0;\r\n BufferedReader br = new BufferedReader(new FileReader(file));\r\n String line = br.readLine();\r\n line = br.readLine();\r\n String[] splited = line.split(\",\");\r\n this.maxLA = Double.parseDouble(splited[0]);\r\n this.minLA = Double.parseDouble(splited[0]);\r\n this.maxLO = Double.parseDouble(splited[1]);\r\n this.minLO = Double.parseDouble(splited[1]);\r\n this.maxH = Math.abs(Double.parseDouble(splited[2]));\r\n this.minH = Math.abs(Double.parseDouble(splited[2]));\r\n int index = 0;\r\n double x;\r\n double y;\r\n double z;\r\n while (line != null) {\r\n String[] splitedString = line.split(\",\");\r\n x = Double.parseDouble(splitedString[0]);\r\n y = Double.parseDouble(splitedString[1]);\r\n z = Math.abs(Double.parseDouble(splitedString[2]));\r\n average += y;\r\n if (x > maxLA) {\r\n maxLA = x;\r\n } else if (x < minLA) {\r\n minLA = x;\r\n }\r\n if (y > maxLO) {\r\n maxLO = y;\r\n } else if (y < minLO) {\r\n minLO = y;\r\n }\r\n if (z > maxH) {\r\n maxH = z;\r\n } else if (z < minH) {\r\n minH = z;\r\n }\r\n Bee3D newBee = new Bee3D(x, y, z);\r\n this.beesArray[index++] = newBee;\r\n line = br.readLine();\r\n }\r\n average = average / this.numberOfBees;\r\n System.out.println(\"Maximum latitude: \" + maxLA + \" Minimum latitude: \" + minLA);\r\n System.out.println(\"Maximum longitude: \" + maxLO + \" Minimum longitude: \" + minLO);\r\n System.out.println(\"Maximum height: \" + maxH + \" Minimum height: \" + minH);\r\n this.distanceLongi = getDistanceBetween(average);\r\n System.out.println(\"Distance between the most distant latitudes \" + (int) (Math.abs(Math.abs(maxLA) - Math.abs(minLA)) * distanceLat) + \" m\");\r\n System.out.println(\"Distance between the most distant longitudes: \" + (int) (Math.abs(Math.abs(maxLO) - Math.abs(minLO)) * distanceLongi) + \" m\");\r\n System.out.println(\"Distance between the most distant heights: \" + (int) (Math.abs(Math.abs(maxH) - Math.abs(minH))) + \" m\");\r\n System.out.println(\"Average distance between longitudes: \" + distanceLongi + \" m\");\r\n this.offset *= 2;\r\n this.offset += 10;\r\n this.BeesCollision = new LinkedList[(int) ((Math.abs(Math.abs(maxLO) - Math.abs(minLO)) * distanceLongi / precission) + offset)][(int) ((Math.abs(Math.abs(maxLA) - Math.abs(minLA)) * distanceLat / precission) + offset)][(int) (Math.abs((Math.abs(maxH) - Math.abs(minH)) / precission) + offset)];\r\n this.offset -= 10;\r\n this.offset /= 2;\r\n } catch (IOException ioe) {\r\n File file = new File(\"ConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\");\r\n System.out.println(\"Something went wrong reading the file\");\r\n System.out.println(\"File exist: \" + file.exists());\r\n }\r\n }", "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "public GongDomObject(File file) throws ParserConfigurationException, InvalidTagException, SAXException, IOException {\r\n super(file);\r\n }", "public static ModelSet loadFromFile(File file)\n\t{\n\t\tif (!file.exists())\n\t\t{\n\t\t\tthrow new ModelException(\"Model file \" + file + \" does not exist.\");\n\t\t}\n\t\ttry\n\t\t{\n\t\t\treturn loadFromStream(new FileInputStream(file));\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\tthrow new ModelException(\"Model file \" + file + \" does not exist.\", e);\n\t\t}\n\t}", "public void readCurve(File file)\n throws IOException\n {\n InputStream ifile = new FileInputStream(file);\n //read first bytes to detect format\n byte[] buffer = new byte[256];\n int zBytes = ifile.read(buffer);\n ifile.close();\n String firstLine = new String(buffer,0, zBytes);\n readCurveCsvHeadline(file);\n //timeLastSave = System.currentTimeMillis();\n \n }" ]
[ "0.693594", "0.6620032", "0.65263015", "0.60617447", "0.59781647", "0.5770928", "0.56961197", "0.56218046", "0.56094855", "0.56022215", "0.5579554", "0.5559139", "0.5508822", "0.5499761", "0.5463736", "0.54575753", "0.5396391", "0.5365627", "0.536295", "0.53256804", "0.532262", "0.53220236", "0.53218114", "0.53108364", "0.5304061", "0.52493864", "0.52479935", "0.5239979", "0.5229505", "0.52232164", "0.52214235", "0.5217899", "0.5217763", "0.5202469", "0.52002263", "0.51617646", "0.5152739", "0.51464665", "0.51444465", "0.51413", "0.5120001", "0.5115841", "0.5108071", "0.51069486", "0.51057655", "0.50999796", "0.50772834", "0.5075715", "0.5057943", "0.50536746", "0.50512296", "0.50492567", "0.5040939", "0.5040823", "0.50374", "0.5034268", "0.5011969", "0.500754", "0.50019723", "0.49937862", "0.4993356", "0.4992792", "0.4990476", "0.4983711", "0.49798343", "0.49783605", "0.4976947", "0.4970379", "0.49651438", "0.49636826", "0.49635947", "0.49554744", "0.4950057", "0.49465123", "0.49436286", "0.49415913", "0.49398488", "0.49183157", "0.4915491", "0.49133584", "0.4912747", "0.49101758", "0.49081534", "0.4907084", "0.49036625", "0.48970446", "0.48938712", "0.4893169", "0.48889259", "0.48871243", "0.48866615", "0.48840505", "0.48830122", "0.4881419", "0.4879918", "0.487891", "0.48785716", "0.48785168", "0.4870893", "0.4869555", "0.48684105" ]
0.0
-1
this method will delete the file.
private void deleteFile(Statement statement, ResultSet resultSet, Connection connection) { // delete the file try { SQLToolbox.closeResulset(resultSet); SQLToolbox.closeStatement(statement); String command = "DLTF FILE(QTEMP/GZFFD)"; String query = SQLToolbox.getQcmdexcString(command); statement = connection.createStatement(); statement.execute(query); } catch (Exception exception) { if (LOG.isErrorEnabled()) { LOG.error("EqDS_DSPFFD: setup(): SQL Error", exception); } } finally { SQLToolbox.closeStatement(statement); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected synchronized void delete()\n {\n if (this.file.exists())\n {\n this.file.delete();\n }\n }", "public void delete_File(){\n context.deleteFile(Constant.FILE_NAME);\n }", "@Override\n public void delete(File file) {\n }", "private void deleteFile() {\n\t\tFile dir = getFilesDir();\n\t\tFile file = new File(dir, FILENAME);\n\t\tfile.delete();\n\t}", "@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "public void delete() {\n if (tempFile != null) {\n tempFile.delete();\n }\n }", "private void deleteFile() {\r\n actionDelete(dataModelArrayList.get(position));\r\n }", "public void deleteFile(File f);", "void deleteFile(FsPath path);", "public void delete() {\r\n Log.d(LOG_TAG, \"delete()\");\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.delete()) {\r\n Log.d(LOG_TAG, \"Deleted file \" + chunk.getAbsolutePath());\r\n }\r\n }\r\n new File(mBaseFileName + \".zip\").delete();\r\n }", "@AfterStep\n\tprivate void deleteFile(){\n\t\tif(LOGGER.isDebugEnabled()){\n\t\tLOGGER.debug(\" Entering into SalesReportByProductEmailProcessor.deleteFile() method --- >\");\n\t\t}\n\t\ttry {\n\t\t\tif(null != salesReportByProductBean){\n\t\t\tReportsUtilBO reportsUtilBO = reportBOFactory.getReportsUtilBO();\n\t\t\tList<String> fileNames = salesReportByProductBean.getFileNameList();\n\t\t\tString fileLocation = salesReportByProductBean.getFileLocation();\n\t\t\treportsUtilBO.deleteFile(fileNames, fileLocation);\n\t\t\t}\n\t\t} catch (PhotoOmniException e) {\n\t\t\tLOGGER.error(\" Error occoured at SalesReportByProductEmailProcessor.deleteFile() method ----> \" + e);\n\t\t}finally {\n\t\t\tif(LOGGER.isDebugEnabled()){\n\t\t\tLOGGER.debug(\" Exiting from SalesReportByProductEmailProcessor.deleteFile() method ---> \");\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void delete(File file) {\n\t\tthis.getSession().delete(file);\n\t}", "private void del_file() {\n\t\tFormatter f;\n\t\ttry{\n\t\t\tf = new Formatter(url2); //deleting file content\n\t\t\tf.format(\"%s\", \"\");\n\t\t\tf.close();\t\t\t\n\t\t}catch(Exception e){}\n\t}", "void deleteFile(FileReference fileReferece);", "public void delete() throws IOException {\n\t\tclose();\n\t\tdeleteContents(directory);\n\t}", "public void delete() {\n\t\tclose();\n\t\t// delete the files of the container\n\t\tfor (int i=0; i<BlockFileContainer.getNumberOfFiles(); i++)\n\t\t\tfso.deleteFile(prefix+EXTENSIONS[i]);\n\t}", "private void deleteFile(@Nonnull File file) throws IOException {\n Files.delete(file.toPath());\n }", "@Override\r\n public void onClick(View view) {\n deleteFile();\r\n deleteDialog.dismiss();\r\n }", "void fileDeleted(String path);", "@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}", "public void deleteFile(IAttachment file)\n throws OculusException;", "public boolean delete(String filename);", "public void manageFile() {\n long seconds = System.currentTimeMillis();\n filename = \"sdcard/LocationWise/LocationWiseImages/\" + seconds + \".png\";\n path_to_file = new File(filename);\n if (path_to_file.exists()) {\n boolean delete = path_to_file.delete();\n if (delete == true) {\n writeFile();\n // Toast.makeText(this, \"Deleted Successfully\", Toast.LENGTH_SHORT).show();\n\n } else {\n\n // Toast.makeText(this, \"Deletion Failed\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n writeFile();\n\n }\n }", "protected void deleteAttachmentFile()\n {\n try\n {\n if (deleteAttachmentAfterSend && fullAttachmentFilename != null)\n {\n File attFile = new File(fullAttachmentFilename);\n if (log.isDebugEnabled())\n {\n log.debug(\"Delete attachment file: \" + attFile.getCanonicalPath());\n }\n attFile.delete();\n }\n } catch (Exception e)\n {\n log.warn(\"Unable to delete \" + fullAttachmentFilename + \" : \" + e.getMessage());\n }\n }", "private void delete(File file) {\n if (file.isDirectory()) {\n cleanDirectory(file);\n }\n file.delete();\n }", "void delete(InformationResourceFile file);", "@Override\r\n\tpublic void remFile(String path) {\n\t\t\r\n\t}", "public void deleteFile(String filePath){\n File myFile = new File(filePath);\n if (myFile.exists()) {\n myFile.delete();\n System.out.println(\"File successfully deleted.\");\n } else {\n System.out.println(\"File does not exists\");\n }\n }", "public void delete() throws Exception {\n\n getConnection().do_Delete(new URL(getConnection().getFilemanagerfolderendpoint() + \"/\" + getId()),\n getConnection().getApikey());\n }", "public void cancelDemo() {\r\n \t\t\r\n \t\tif (this.fos != null) {\r\n \t\t\t\r\n \t\t\ttry {\r\n \t\t\t\tthis.fos.close();\r\n \t\t\t\tthis.fos = null;\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tif (this.fileName != null) {\r\n \t\t\t\r\n \t\t\ttry {\r\n \t\t\t\tthis.fileIO.deleteFile(this.fileName);\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public static void delete(File f) {\n delete_(f, false);\n }", "@Override\n\tpublic void fileDelete(int file_num) {\n\t\tworkMapper.fileDelete(file_num);\n\t}", "@Override\r\n\tpublic void deleteFileData(Long id) {\n\t\t\r\n\t}", "public File delete(File f) throws FileDAOException;", "public void deleteFile(FileItem file) {\n\t\tPerformDeleteFileAsyncTask task = new PerformDeleteFileAsyncTask(this, credential);\n\t\ttask.execute(file);\n\t}", "public void deleteFile() {\n\t\tif (JOptionPane.showConfirmDialog(desktopPane,\n\t\t\t\t\"Are you sure? this action is permanent!\") != JOptionPane.YES_OPTION)\n\t\t\treturn;\n\n\t\tEllowFile file = null;\n\t\tTreePath paths[] = getSelectionModel().getSelectionPaths();\n\t\tif (paths == null)\n\t\t\treturn;\n\t\tfor (TreePath path : paths) {\n\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) path\n\t\t\t\t\t.getLastPathComponent();\n\t\t\tfile = (EllowFile) node.getUserObject();\n\t\t\tEllowynProject project = file.parentProject;\n\t\t\tfile.deleteAll();\n\t\t\tif (!file.isProjectFile && project != null)\n\t\t\t\tproject.rebuild(); // don't rebuild the project if the project\n\t\t\t\t\t\t\t\t\t// itself is deleted\n\t\t\tdesktopPane.closeFrames(file);\n\t\t\tmodel.removeNodeFromParent(node);\n\t\t}\n\t}", "public void mo83565a(File file) {\n if (!file.delete()) {\n file.deleteOnExit();\n }\n }", "private void deleteFile(String oldPic) {\n\n\n File fileDir = new File(oldPic);\n if (fileDir.exists()) {\n \n fileDir.delete();\n }\n\n }", "@Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Assert.assertFalse(start.equals(file));\n // Delete the file.\n Files.delete(file);\n logger.output(\"Deleted file \" + file);\n return FileVisitResult.CONTINUE;\n }", "@PreAuthorize(\"hasPermission(#file, 'delete')\")\n public void delete(File file) {\n fileRepository.delete(file);\n }", "public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}", "private void log_out() {\n File xx = new File(\"resource/data/staff_id_logedin.txt\");\n if(xx.isFile()){\n xx.delete();\n }\n this.dispose();\n }", "@Override\r\n\tpublic void qnaFileDelete(int qnaFileIdx) {\n\t\t\r\n\t}", "@Override\n\t \tpublic void run() {\n\t \t\tsuper.run();\n\t \t\t FileUtil.DeleteFile(new File(Environment.getExternalStorageDirectory() + \"/\"+\"jikedownload\"));\n\t \t}", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete File : {}\", id);\n fileRepository.delete(id);\n }", "boolean deleteFile(File f);", "public void deleteFile() {\n String newName = playerList.getSelectionModel().getSelectedItem();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n if (user.delete()) {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().remove(newName);\n\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n } else {\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n input.setStyle(\"-fx-border-color: red\");\n }\n }", "public void deleteData(String filename, SaveType type);", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n Log.d(\"Paul\", \"delete file\");\n\n File file = new File(Environment.getExternalStorageDirectory().getPath(), getString(R.string.temp_file_name));\n try {\n // if file exists in memory\n if (file.exists()) {\n file.delete();\n Log.d(\"Paul\", \"file deleted\");\n }\n } catch (Exception e) {\n Log.d(\"Paul\",\"Some error happened?\");\n }\n\n }", "public void delete_database() {\n //deletes file and by doing so all the tables\n File file = new File(url);\n String path = \"..\" + File.separator + file.getPath();\n File file_path = new File(path);\n file_path.delete();\n }", "public static void unlockFile() {\n try {\n \t\n if(lock != null) {\n \t\n lock.release();\n channel.close();\n f.delete();\n \n }\n \n } catch(IOException e) {\n \t\n e.printStackTrace();\n \n }\n \n }", "public boolean deleteFile(String inKey) throws NuxeoException;", "public static void delete(File file) throws IOException {\n String method = \"delete() - \";\n if ((file != null) && (file.exists())) {\n if (file.isDirectory()) {\n if (file.list().length == 0) {\n file.delete();\n }\n else {\n String files[] = file.list();\n for (String current : files) {\n File fileToDelete = new File(file, current);\n delete(fileToDelete);\n if (file.list().length == 0) {\n file.delete();\n }\n }\n }\n }\n else {\n file.delete();\n }\n }\n else {\n throw new IOException(method \n + \"The input file is null or does not exist.\");\n }\n }", "private void deleteImage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tFiles file= new FilesDAO().view(id);\n\t\t//Logic to delete the file from the database\n\t\t\n\t\tnew FilesDAO().delete(id);\n\t\t\n\t\t\n\t\t//Logic to delete file from the file system\n\t\t\n\t\tFile fileOnDisk= new File(path+file.getFileName());\n\t\tif(fileOnDisk.delete()) {\n\t\t\tSystem.out.println(\"File deleted from the folder\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Sorr! file couldn't get deleted from the folder\");\n\t\t}\n\t\tlistingPage(request, response);\n\t}", "public int deleteFile(String datastore, String filename) throws HyperVException;", "private void delete(String name) {\n File f = new File(name);\n if (f.exists()) {\n f.delete();\n }\n }", "public boolean deleteFile(File file) {\n\t\treturn file.delete();\n\t}", "private void deleteFile(java.io.File file) {\n if (file.isDirectory()) {\n for (java.io.File f : file.listFiles()) \n deleteFile(f);\n }\n \n if (!file.delete())\n try {\n throw new FileNotFoundException(\"Failed to delete file: \" + file.getName());\n } catch (FileNotFoundException e) {\n System.err.println(\"Delete of file \" + file.getAbsolutePath() + \" failed\");\n e.printStackTrace();\n }\n }", "public void deleteFile(long id)\r\n \t{\r\n \t\tif (this.logger!= null) \r\n \t\t\tlogger.debug(\"calling deleteFile(\"+id+\") was called...\");\r\n \t\t\r\n \t\tExtFileObjectDAO extFileDao= externalFileMgrDao.getExtFileObj(id);\r\n \t\tString fileSrc= this.externalDataFolder + \"/\"+ extFileDao.getBranch() + \"/\"+ extFileDao.getFileName();\r\n \t\tFile dFile= new File(fileSrc);\r\n \t\tif (!dFile.delete())\r\n \t\t\tthrow new ExternalFileMgrException(ERR_DELETE + fileSrc);\r\n \t\texternalFileMgrDao.deleteExtFileObj(id);\r\n \t}", "public static void deleteFile()\n\t{\n\t\t//Variable Declaration\n\t\tString fileName;\n\t\tScanner obj = new Scanner(System.in);\n\t\t\n\t\t//Read file name from user\n\t\tSystem.out.println(\"Enter file name to delete:\");\n\t\tfileName= obj.nextLine();\n\t\t\n\t\t//Deleting the file\n\t\tboolean isDeleted = FileManager.deleteFile(folderpath, fileName);\n\t\t\n\t\tif(isDeleted)\n\t\t\tSystem.out.println(\"File deleted successfully\");\n\t\telse\n\t\t\tSystem.out.println(\"File not found! Enter valid file name.\");\n\t}", "@Override\n public void destroy() {\n if (fileWriter != null) {\n try {\n fileWriter.close();\n } catch (IOException e) {\n }\n }\n }", "@Override\r\n\tpublic int fileDelete(int no) {\n\t\treturn sqlSession.delete(namespace + \"fileDelete\", no);\r\n\t}", "public void onDestroy() {\n\n try {\n FileOutputStream fileout=openFileOutput(file, MODE_APPEND);\n OutputStreamWriter outputWriter=new OutputStreamWriter(fileout);\n outputWriter.write(listItem.clickcount + \" \");\n outputWriter.close();\n\n //disp0lay file saved message\n Log.i(\"test_toast\", \"file created\");\n Toast.makeText(getBaseContext(), \"File saved successfully!\",\n Toast.LENGTH_SHORT).show();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n super.onDestroy();\n }", "private void deleteResource() {\n }", "public void destroy() {\r\n if (isDestroyed) {\r\n return;\r\n }\r\n isDestroyed = true;\r\n IOUtil.safeDelete(fileA);\r\n IOUtil.safeDelete(fileB);\r\n }", "public int deleteReq() {\n String fileName = \"\";\n\n Log.v(\"File input stream\", fileName);\n String[] fileList = getContext().fileList();\n Log.v(\"File input stream\", Integer.toString(fileList.length));\n\n for (int i = 0; i < fileList.length; i++) {\n Log.v(\"File input stream\", fileList[i]);\n try {\n fileName = fileList[i];\n context.deleteFile(fileName);\n } catch (Exception e) {\n Log.e(\"Exception Thrown\", \"Exception Thrown\");\n }\n }\n return 0;\n }", "public void delete_file(String file_name) throws Exception{\n\t\tFile file = new File(file_name);\n\t\tif (file.exists() && file.isFile()) file.delete();\n\t\telse if(file.isDirectory()){\n\t\t\tfor(File f : file.listFiles()){\n\t\t\t\tdelete_file(f.getAbsolutePath());\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "private void delete() {\n\n\t}", "public void deleteFile(int id) {\n\t\tString sql = \"delete from file where file_id=\"+id;\n\t\tthis.getJdbcTemplate().update(sql);\n\t}", "public static void deleteFile(String inputFile){\n File file = new File(inputFile);\n //validate the file\n if(file.isFile()){\n try{\n if(file.delete())\n System.out.println(\"File \"+inputFile+\" has been deleted.\");\n else\n System.out.println(\"Error in deleting the file.\");\n }catch(Exception e){\n e.printStackTrace();\n }\n }else{\n System.out.println(\"Invalid file path.\");\n }\n }", "public final void deleteTemporaryFile()\n\t\tthrows IOException {\n\t\t\t\n // DEBUG\n \n if ( isQueued()) {\n Debug.println(\"@@ Delete queued file segment, \" + this);\n Thread.dumpStack();\n }\n \n\t\t//\tDelete the temporary file used by the file segment\n\n\t\tFile tempFile = new File(getTemporaryFile());\n\t\t\t\t\n\t\tif ( tempFile.exists() && tempFile.delete() == false) {\n\n\t\t //\tDEBUG\n\t\t \n\t\t Debug.println(\"** Failed to delete \" + toString() + \" **\");\n\t\t \n\t\t //\tThrow an exception, delete failed\n\t\t \n\t\t\tthrow new IOException(\"Failed to delete file \" + getTemporaryFile());\n\t\t}\n\t}", "private void deleteTempHTMLFile()\n {\n File file = new File(\"resources/tempHTML\" +Thread.currentThread().getName() +\".html\");\n file.delete();\n }", "public static void delete(String filename) \n throws IOException {\n if ((filename != null) && (!filename.isEmpty())) {\n delete(new File(filename));\n }\n }", "@Override\n\tprotected void finalize() throws Throwable\n\t{\n\t\tsuper.finalize(); // currently empty but there for safer refactoring\n\n\t\tFile outputFile = dfos.getFile();\n\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "private static void deleteFile(String fileName) {\n\t\tFile f = new File(fileName);\n\n\t\t// Make sure the file or directory exists and isn't write protected\n\t\tif (!f.exists())\n\t\t\treturn;\n\t\t// throw new IllegalArgumentException(\"Delete: no such file or directory: \" + fileName);\n\n\t\tif (!f.canWrite())\n\t\t\tthrow new IllegalArgumentException(\"Delete: write protected: \"\n\t\t\t\t\t+ fileName);\n\n\t\t// If it is a directory, make sure it is empty\n\t\tif (f.isDirectory()) {\n\t\t\tString[] files = f.list();\n\t\t\tif (files.length > 0)\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"Delete: directory not empty: \" + fileName);\n\t\t}\n\n\t\t// Attempt to delete it\n\t\tboolean success = f.delete();\n\n\t\tif (!success)\n\t\t\tthrow new IllegalArgumentException(\"Delete: deletion failed\");\n\t}", "@Override\n public void delete()\n {\n }", "public static void deleteFile(String filePath) {\n File file = getFile(filePath);\n if (file.exists()) {\n file.delete();\n }\n }", "private void deleteFile(String runtimePropertiesFilename) {\n File f = new File(runtimePropertiesFilename);\r\n\r\n // Make sure the file or directory exists and isn't write protected\r\n if (!f.exists())\r\n return; // already gone!\r\n\r\n if (!f.canWrite())\r\n throw new IllegalArgumentException(\"Delete: write protected: \"\r\n + runtimePropertiesFilename);\r\n\r\n // If it is a directory, make sure it is empty\r\n if (f.isDirectory()) {\r\n String[] files = f.list();\r\n if (files.length > 0)\r\n throw new IllegalArgumentException(\r\n \"Delete: directory not empty: \" + runtimePropertiesFilename);\r\n }\r\n\r\n // Attempt to delete it\r\n if (!f.delete())\r\n throw new IllegalArgumentException(\"Delete: deletion failed\");\r\n }", "private void deleteKeyFile() {\n final String methodName = \":deleteKeyFile\";\n final File keyFile = new File(mContext.getDir(mContext.getPackageName(),\n Context.MODE_PRIVATE), ADALKS);\n if (keyFile.exists()) {\n Logger.v(TAG + methodName, \"Delete KeyFile\");\n if (!keyFile.delete()) {\n Logger.v(TAG + methodName, \"Delete KeyFile failed\");\n }\n }\n }", "public boolean delete() throws SecurityException {\n return _file.delete();\n }", "public static void clearFile() {\n if (data.delete())\n data = new File(\"statistics.data\");\n }", "public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }", "public void delete() {\r\n if (this.selectedTag != null) {\r\n for (int i = uploads.size() -1; i >= 0 ; i--) {\r\n if (this.selectedTag.equals(uploads.get(i).getTag())) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n uploads.remove(i);\r\n break;\r\n }\r\n }\r\n }\r\n }", "public void deleteFileFromStorage(Upload details){\n\n\n StorageReference storageRef = FirebaseStorage.getInstance().getReferenceFromUrl(details.getUrl());\n\n // Delete the file\n storageRef.delete().addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n\n // Delete content from database\n pd.setMessage(\"File Deleted ... \");\n Toast.makeText(AddNewNoticeActivity.this, \"Deleted File !!\", Toast.LENGTH_LONG).show();\n\n pd.dismiss();\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n pd.dismiss();\n Toast.makeText(AddNewNoticeActivity.this, \"Failed to Delete !!\" + exception, Toast.LENGTH_LONG).show();\n }\n });\n\n\n\n }", "@Override\n public void dispose() {\n file = null;\n }", "public void deleteUrl() throws IOException\n\t{\n\t\tFile tempFile = new File(\"Resource/test.txt\");\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));\n\t\twriter.write(newFile);\n\t\twriter.close();\n\t\t\n\t\t//boolean successful = tempFile.renameTo(inputFile);\n\t}", "public static void m85582a(File file) {\n try {\n if (!file.delete()) {\n file.deleteOnExit();\n }\n } catch (Exception unused) {\n }\n }", "public boolean delete() {\n return new File(DataCrow.moduleDir, filename).delete();\n }", "@RequestMapping(value=\"/my_files\", method = RequestMethod.DELETE)\n @ResponseBody\n public AppResponse delete(@RequestParam String path) throws IOException, InvalidValueException,FilePathAccessDeniedException {\n\n String username = CSQLUserContext.getCurrentUser().getUsername();\n if(validator.isValidAndUserHasAccess(username, path)){\n return fileSystemService.delete(path, true);\n }\n\n return AppResponse.error();\n }", "public DBMaker deleteFilesAfterClose(){\n this.deleteFilesAfterCloseFlag = true;\n return this;\n }", "public boolean delete();", "public void deleteFile(String url)\n\t{\n\t\t\n\t\tIterator<UserInfo> itr= iterator();\n\t\tUserInfo info=null;\n\t\twhile(itr.hasNext()) {\n\t\t\t\n\t\t\tinfo= itr.next();\n\t\t\tif( info.getUrl().equalsIgnoreCase(url)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( info!=null)\n\t\t{\n\t\t\tSystem.out.println(\"file has been deleted!\");\n\t\t\tuserinfos.remove(info);\n\t\t}\n\t\t\n\t}", "void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }", "public static void deleteFile(String strFilePath) {\n File file = new File(strFilePath);\n file.delete();\n }", "public void doDelete(HttpServletRequest req, HttpServletResponse resp, String filepath) throws IOException {\n\t\tStorage storage = StorageOptions.getDefaultInstance().getService();\n\t storage.delete(BUCKET, filepath);\n\t}", "public void delete() {\n\n\t}", "@Override\n\tpublic void delete() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public static void destroy(String filename) throws IOException {\n\t\t// only system calls are used\n\t\tFileChannel fc = (new RandomAccessFile(filename, \"rw\")).getChannel();\n\t\tlong size = fc.size();\n\t\tfc.truncate(0);\n\t\tfc.truncate(size);\n\t\tfc.close();\n\t}", "public void removeFileInstance()\n {\n this.source = null;\n this.data = null;\n }", "public void closeFile(){\n }" ]
[ "0.862604", "0.8412159", "0.8101772", "0.80686116", "0.8056679", "0.79099786", "0.76640195", "0.74746764", "0.7449602", "0.7368034", "0.73378223", "0.72865164", "0.7274002", "0.72419816", "0.7109713", "0.7079455", "0.70786273", "0.7044755", "0.697666", "0.69347894", "0.69262224", "0.6926029", "0.6906662", "0.6869865", "0.6868912", "0.6843956", "0.68387085", "0.6832807", "0.6832505", "0.6829066", "0.6813569", "0.67581075", "0.674769", "0.6744822", "0.67422986", "0.6741426", "0.6713846", "0.67132145", "0.67041326", "0.6703299", "0.6690806", "0.66873324", "0.66871536", "0.6684136", "0.666781", "0.6667625", "0.6664589", "0.66637284", "0.6659968", "0.6650701", "0.6646316", "0.6626497", "0.66213775", "0.65969634", "0.6576567", "0.6566711", "0.6562164", "0.6536703", "0.6533311", "0.65315163", "0.653113", "0.6513547", "0.6458107", "0.6447208", "0.6443755", "0.64377195", "0.6436405", "0.6429716", "0.6416176", "0.64126956", "0.6407027", "0.6406865", "0.6406363", "0.6404204", "0.6402283", "0.6394002", "0.6386504", "0.6382221", "0.6369764", "0.6367547", "0.63617116", "0.6361305", "0.6360437", "0.6353344", "0.63524264", "0.63421315", "0.6340233", "0.6338915", "0.63229346", "0.6316909", "0.63097715", "0.629945", "0.62916267", "0.628444", "0.62701654", "0.626397", "0.62614757", "0.6246625", "0.6245232", "0.6242446", "0.62395513" ]
0.0
-1
Return the file name
public String getFile() { return file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFilename();", "java.lang.String getFilename();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFilename();", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "public String getFileName();", "public String getFileName();", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "public String getFileName ();", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public String getFilename() {\n\treturn file.getFilename();\n }", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "public String getName() {\n return _file.getAbsolutePath();\n }", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "public String getName()\n {\n return( file );\n }", "public String getFilename();", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "public String getName() {\n if (filename != null) {\n int index = filename.lastIndexOf(separatorChar);\n\n if (index >= 0) {\n return filename.substring(index + 1);\n } else {\n if (filename == null) {\n return \"\";\n } else {\n return filename;\n }\n }\n } else {\n return \"\";\n }\n }", "public String getName() {\r\n return mFile.getName();\r\n }", "public String getName() {\n return dtedDir + \"/\" + filename;\n }", "@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}", "@Override\n\tpublic String getName()\n\t{\n\t\treturn fileName;\n\t}", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}", "public String getFileName(int index) {\n\t\tFile f = openFiles.get(index);\n\t\tString nom = f.getName().substring(0,f.getName().length()-5);\n\t\treturn nom;\n\t}", "public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}", "public String fullFileName () {\n\t\tif (directory == null || directory.equals(\"\"))\n\t\t\treturn fileName;\n\t\telse\n\t\t\treturn directory + File.separator + fileName;\t//add a '\\' in the path\n\t}", "public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}", "public String getName() {\n\t\treturn filename;\n\t}", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "public abstract String getFileName();", "public final String getFileName()\r\n {\r\n return _fileName;\r\n }", "String getFileName(String filePath) {\n\t\tint lastSlash = savedFilePath.lastIndexOf(\"\\\\\");\n\t\tint dotPos = savedFilePath.lastIndexOf(\".\");\n\t\tString fileName = savedFilePath.substring(lastSlash+1,dotPos);\n\t\treturn fileName;\n\t}", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getName()\n\t{\n\t\treturn _fileName;\n\t}", "public static String fileName(File file)\n {\n if (file == Configuration.STD_OUT)\n {\n return \"standard output\";\n }\n else\n {\n try\n {\n return file.getCanonicalPath();\n }\n catch (IOException ex)\n {\n return file.getPath();\n }\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n }\n return s;\n }\n }", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "public static String getFileName()\r\n\t{\r\n\t\tString name = \"d3_\";\r\n\t\tjava.util.Date tNow = new java.util.Date();\r\n\r\n\t\tjava.text.SimpleDateFormat df = new java.text.SimpleDateFormat(\"mm_ss\");\r\n\r\n\t\tname = name + \"_\" + df.format(tNow) + \".wmf\";\r\n\r\n\t\treturn name;\r\n\t}", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public String getFILE_NAME() { return FILE_NAME; }", "public String getFinalFileName()\r\n\t{\r\n\t\treturn this.getFileName() + this.getFileFormat();\r\n\t}", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileRealName() {\n return fileRealName;\n }", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "public String getFileName(){\n\t\treturn fileName;\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public final String getFileName() {\n return this.fileName;\n }", "private String getFilename() {\r\n\t\treturn (String) txtFlnm.getValue();\r\n\t}", "static public String getFileName(ObjectNode schemeId)\n\t{\n\t\treturn schemeId.path(\"fileName\").asText(null);\n\t}", "private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }", "public String getFileName ()\n\t{\n\t\treturn FileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}" ]
[ "0.89117384", "0.89117384", "0.89117384", "0.89117384", "0.89117384", "0.89117384", "0.89117384", "0.89117384", "0.89117384", "0.86412144", "0.86412144", "0.850647", "0.850647", "0.850647", "0.850647", "0.850647", "0.83113015", "0.8270117", "0.82530546", "0.82530546", "0.81987363", "0.8187386", "0.8124353", "0.8119256", "0.8117806", "0.8085428", "0.8077082", "0.80602294", "0.8026287", "0.80182236", "0.80057657", "0.7994708", "0.7949486", "0.79407763", "0.793017", "0.79223275", "0.79222757", "0.791984", "0.79077363", "0.7905743", "0.7816958", "0.7784023", "0.77526665", "0.7744576", "0.773344", "0.7727989", "0.77193344", "0.77093124", "0.7707916", "0.76891994", "0.7683332", "0.7652219", "0.76350856", "0.761026", "0.7609582", "0.7598001", "0.7590393", "0.7588424", "0.7588424", "0.7588424", "0.7588424", "0.7588424", "0.7588424", "0.758651", "0.758651", "0.75863415", "0.7574313", "0.75722796", "0.75722796", "0.7570592", "0.75661844", "0.75661844", "0.7560433", "0.7527727", "0.7513596", "0.7513596", "0.7513596", "0.7513596", "0.7513596", "0.7513596", "0.75110143", "0.75071883", "0.7472044", "0.7472044", "0.7472044", "0.7470527", "0.74662876", "0.74631", "0.74618506", "0.74618506", "0.74618506", "0.74510086", "0.74484366", "0.74402505", "0.74324316", "0.74273556", "0.74184716", "0.7410573", "0.7410573", "0.7410573", "0.7410573" ]
0.0
-1
Creates new form SelecionarRancho
public SeleccionarRancho() { setExtendedState(JFrame.MAXIMIZED_BOTH); initComponents(); Image i = null; i = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/resources/logo tru-test.png")); setIconImage(i); // setLocationRelativeTo(null); ranchoSelector1.cargar(); jPanel2.setOpaque(false); cargarcomponentes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TelaCadastrarProduto() {\n initComponents();\n entidade = new Produto();\n setRepositorio(RepositorioBuilder.getProdutoRepositorio());\n grupo.add(jRadioButton1);\n grupo.add(jRadioButton2);\n }", "public void generarCuestionario() {\n \n try{\n ValidarOpcionSeleccionada.validar (radios);\n }catch (OpcionNoSeleccionadaException e) {\n etiquetaRespuesta.setText(\"Debes selecionar una opcion\");\n}\n \n\n //Con el modelo construido debemos representar nuestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n Opcion op1 = new Opcion();\n op1.setTitulo(\"Inglaterra\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"México\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Italia\");\n op3.setCorrecta(false);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Francia\");\n op4.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Que país tiene más Premios Nobel de Literatura?\");\n p1.setOpciones(opciones);\n\n \n //opciones de la pregunta 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Ares\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Prometeo\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Poseidón\");\n op23.setCorrecta(true);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Hefesto\");\n op24.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Quién es el padre del cíclope Polifemo según la mitología griega?\");\n p2.setOpciones(opciones2);\n \n //opciones de la pregunta 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"J.K Rowling\");\n op31.setCorrecta(false);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Emily Bronte\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Stephen King\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Jane Austen\");\n op34.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien escribio el libro Orgullo y Prejuicio?\");\n p3.setOpciones(opciones3);\n \n //Opciones pregunta 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"El Cáliz de Fuego\");\n op41.setCorrecta(true);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Festin de Cuervos\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"El prisionero de Azkaban\");\n op43.setCorrecta(false);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Principe Mecánico\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Como se llama el cuarto libro de Harry Potter?\");\n p4.setOpciones(opciones4);\n \n //Opciones pregunta 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Dunkirk\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Los Miserables\");\n op52.setCorrecta(true);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Interestelar\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Batman: El caballero de la noche\");\n op54.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5= {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿Que película NO dirigio Chistopher Nolan?\");\n p5.setOpciones(opciones5);\n \n //Opciones pregunta 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"Joe Greene\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"Tom Brady\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"Joe Montana\");\n op63.setCorrecta(false);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"Peyton Manning\");\n op64.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿Que jugador ha ganado más MVP en la NFL?\");\n p6.setOpciones(opciones6);\n \n //Opciones pregunta 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Bayern Munich\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"Real Madrid\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Barcelona\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"Manchester United\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que equipo ha ganado más Champions League en la hsitoria?\");\n p7.setOpciones(opciones7);\n \n \n //Opciones pregunta 8\n \n Opcion op81 = new Opcion();\n op81.setTitulo(\"Tratado de Versalles\");\n op81.setCorrecta(true);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Tratado de Granada\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"Tratado de Lyon\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Tratado de Londres\");\n op84.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Como se llamo el tratado con el que se le dio fin a la PGM?\");\n p8.setOpciones(opciones8);\n \n //opciones pregunta 9 \n \n Opcion op91 = new Opcion();\n op91.setTitulo(\"Hermanos Lumiere\");\n op91.setCorrecta(false);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"Steven Spielberg\");\n op92.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Thomas Harper\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"George Mellies\");\n op94.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿A quien se le considera como el mago del cine?\");\n p9.setOpciones(opciones9);\n \n //Opciones pregunta 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Miguel Ángel\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Rafael Sanzio\");\n op102.setCorrecta(false);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"Leonardo Da Vinci\");\n op103.setCorrecta(true);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"Bernini\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que artífice NO participo en la construcción de la Basílica de San Pedro?\");\n p10.setOpciones(opciones10);\n \n \n \n //Pregunta p11 =new Pregunta();\n System.out.println(\"Fin de Cuestionario \");\n \n \n \n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n \n \n \n //Se agrega a este list las preguntas que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n // preguntas.add(p11);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n \n c.setPreguntas(preguntas);\n //Ajustamos el titulo de la primera pregunta\n mostrarPregunta (preguntaActual); \n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la pregunta\ntry{\n int opcion= Integer.parseInt (etiquetaRespuesta.getText());\n ValidarNumeroPreguntas.validar (opcion);\n }catch (NumberFormatException e) {\n \n}\n \n }", "public DialogoBuscar(InterfazKaraoke pPrincipal) {\n\t\tsuper(pPrincipal, true);\n\t\t\n\t\tprincipal= pPrincipal;\n\t\tsetTitle( \"Buscar\" );\n setSize( 220, 250 );\n setLocationRelativeTo( principal );\n\t\topcSeleccionada = null;\n\t\t\n\t\tJPanel contenedor = new JPanel(new GridLayout(6, 1));\n\t\tcontenedor.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\t\n\t\t// TODO Cree el grupo de botones para los radios.\n\t\tButtonGroup btnGroup = new ButtonGroup();\n\t\t\n\t\t// TODO Inicialice los radios\n\t\tbtnRadios = new JRadioButton[5];\n\t\tbtnRadios [0] = new JRadioButton (CANCION_MAS_FACIL);\n\t\tbtnRadios [1] = new JRadioButton (CANCION_MAS_DIFICIL);\n\t\tbtnRadios [2] = new JRadioButton (CANCION_MAS_CORTA);\n\t\tbtnRadios [3] = new JRadioButton (CANCION_MAS_LARGA);\n\t\tbtnRadios [4] = new JRadioButton (ARTISTA_MAS_CANCIONES);\n\t\t\n\t\tfor (JRadioButton j: btnRadios)\n\t\t{\n\t\t\tj.setActionCommand(j.getText());\n\t\t\tj.addActionListener(this);\n\t\t}\n\t\t\n\t\t// TODO Agregue los radios al grupo de botones\n\t\tfor (JRadioButton j: btnRadios)\n\t\t\tbtnGroup.add(j);\n\t\t\n\t\t// TODO Agregue los radios al panel contenedor\n\t\tfor (JRadioButton j: btnRadios)\n\t\t\tcontenedor.add(j);\n\t\t\n\t\t// TODO Marque el primer radio como seleccionado \n\t\tbtnRadios [0].setSelected(true);\n\t\t\n\t\t// TODO Inicialice el atributo opcSeleccionada con el comando del radio seleccionado.\n\t\topcSeleccionada = btnRadios [0].getText();\n\t\t\n\t\tbtnBuscar = new JButton(BUSCAR);\n\t\tbtnBuscar.setActionCommand(BUSCAR);\n\t\tbtnBuscar.addActionListener(this);\n\t\tcontenedor.add(btnBuscar);\n\t\t\n\t\tadd(contenedor);\n\t}", "public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "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 }", "public RegistrarRubro() {\n initComponents();\n this.tienda=\"Market Venezuela CCS\";\n this.almacen=\"Refrigeracion\";\n ArrayList <String> rubros = Controlador.ControladorRubro.ConsultarRubros(almacen, tienda);\n jComboBox1Rubro.addItem(\" \");\n int i=0;\n while(i<rubros.size())\n {\n jComboBox1Rubro.addItem(rubros.get(i));\n i=i+2;\n }\n }", "public GUI_Tipo_Cadastro() {\n initComponents();\n \n buttonGroup1.add(jRadioButton_Cliente);\n buttonGroup1.add(jRadioButton_Profissional);\n buttonGroup1.add(jRadioButton_Admin);\n \n // Centraliza o JFrame na tela\n this.setLocationRelativeTo(null);\n }", "private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarActionPerformed\n \n camino=null;\n \n int status = fileChooser.showOpenDialog (null);\n if (status == JFileChooser.APPROVE_OPTION){\n File selectedFile = fileChooser.getSelectedFile();\n camino = selectedFile.getAbsolutePath();\n }\n else{ \n if (status == JFileChooser.CANCEL_OPTION){\n System.out.println(\"CANCELAR\");\n }\n \n }\n try {\n cancion.agregarCancion(camino);\n } catch (IOException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n } catch (UnsupportedTagException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDataException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n }\n String[] test = cancion.mostrarCancion(i);\n lista.addElement(\" \"+test[0]);\n libCancion.setModel(lista);\n i++;\n }", "public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }", "public Principal() {\n initComponents();\n Desabilitar();\n ChoicePro.add(\"\");\n ChoicePro.add(\"Guerrero\");\n ChoicePro.add(\"Mago\");\n ChoicePro.add(\"Arquero\");\n Llenar();\n\n }", "public void crearModelo() {\r\n\t\tmodelo = new DefaultComboBoxModel<>();\r\n\t\tmodelo.addElement(\"Rojo\");\r\n\t\tmodelo.addElement(\"Verde\");\r\n\t\tmodelo.addElement(\"Azul\");\r\n\t\tmodelo.addElement(\"Morado\");\r\n\t}", "public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }", "public Sistema() {\n initComponents();\n //Codigo de Configuracion\n _radio = new ArrayList();\n _radio.add(RadioButtonDollar);\n _radio.add(RadioButtonSol);\n _radio.add(RadioButtonPeso);\n \n }", "public CrearProductos() {\n initComponents();\n }", "public RegistroCompra() {\n initComponents();\n buscarProveedor();\n }", "@FXML\n\tpublic void buttonCreateProductType(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtProductTypeName.getText();\n\t\tif (!name.equals(empty)) {\n\t\t\tProductType obj = new ProductType(txtProductTypeName.getText());\n\t\t\ttry {\n\t\t\t\tboolean found = restaurant.addProductType(obj, empleadoUsername); // Se añade a la lista de tipos de\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// producto DEL RESTAURANTE\n\t\t\t\tif (found == false) {\n\t\t\t\t\ttypeOptions.add(name);// Se añade a la lista de tipos de producto para ser mostrada en los combobox\n\t\t\t\t}\n\t\t\t\ttxtProductTypeName.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"El tipo de producto a crear debe tener un nombre \");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\n\t\t}\n\t}", "public CarroVO getFormCarro() {\n try {\n String placa = cadastroView.getTxtPlaca().getText().trim();\n String cor = (String) cadastroView.getCbCor().getSelectedItem();\n ModeloVO modelo = (ModeloVO) cadastroView.getCbModelo().getSelectedItem();\n MarcaVO marca = (MarcaVO) cadastroView.getCbMarca().getSelectedItem();\n modelo.setMarca(marca);\n return new CarroVO(placa, cor, modelo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public VistaArticulosBajas() {\r\n\t\tsetTitle(\"Baja_Art\\u00EDculos\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 367, 208);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\t// Definir el Diálogo Confirmar Baja Artículo\r\n\t\tdlgConfBaja.setLayout(new FlowLayout());\r\n\t\tdlgConfBaja.add(lblConfBaja);\r\n\t\tdlgConfBaja.add(btnConfBajaSi);\r\n\t\tdlgConfBaja.add(btnConfBajaNo);\r\n\t\tdlgConfBaja.setSize(200, 150);\r\n\t\tdlgConfBaja.setLocationRelativeTo(null);\r\n\t\tdlgConfBaja.addWindowListener(this);\r\n\t\tbtnConfBajaSi.addActionListener(this);\r\n\t\tbtnConfBajaNo.addActionListener(this);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"Escoge un Art\\u00EDculo\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblNewLabel.setBounds(10, 23, 147, 23);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\r\n\t\tchcArticuloBajas = new Choice();\r\n\t\tchcArticuloBajas.setBounds(10, 46, 169, 20);\r\n\t\tcontentPane.add(chcArticuloBajas);\r\n\t\t// Mostrar los artículos en el choice chcArticuloBajas conectando con la BD\r\n\t\tResultSet articulos = null;\r\n\t\tConnection conArticulo = null;\r\n\t\tconArticulo = modelo.conectar();\r\n\t\tarticulos = modelo.consultaArticulos(conArticulo);\r\n\t\ttry {\r\n\t\t\tString id;\r\n\t\t\tString descripcion;\r\n\t\t\twhile(articulos.next()) {\r\n\t\t\t\tid = articulos.getInt(\"idArticulos\")+\"\";\r\n\t\t\t\tdescripcion = articulos.getString(\"descripcionArticulo\");\r\n\t\t\t\tchcArticuloBajas.add(id+\" - \"+descripcion);\r\n\t\t\t}\r\n\t\t\tmodelo.desconectar(conArticulo);\r\n\t\t}catch(SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Botón Volver. Acción --> vuelve al Menú Principal\r\n\t\tJButton btnVolverBajas = new JButton(\"VOLVER\");\r\n\t\tbtnVolverBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVolverBajas.setBounds(252, 46, 89, 23);\r\n\t\tcontentPane.add(btnVolverBajas);\r\n\r\n\t\t// Botón Eliminar. Acción --> abre el Diálogo Confirmar_Baja \r\n\t\tJButton btnEliminarBajas = new JButton(\"ELIMINAR\");\r\n\t\tbtnEliminarBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdlgConfBaja.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnEliminarBajas.setBounds(252, 126, 89, 23);\r\n\t\tcontentPane.add(btnEliminarBajas);\r\n\r\n\t}", "VentanaPrincipal(InterfazGestorFF principal, InterfazEsquema estructura) {\n initComponents();\n setTitle(BufferDeRegistro.titulo);\n this.principal=principal;\n this.estructura=estructura;\n cargar_campos(); \n cargar_menu_listados();\n \n botones=new javax.swing.JButton[]{\n jBAbrirSGFF,jBActualizarRegistro,jBAyuda,jBBorrarRegistro,\n jBComenzarConsulta,jBGuardarSGFF,jBGuardarSGFF,jBImportarSGFF,\n jBInsertarRegistro,jBIrAlHV,jBIrAlHijo,\n jBIrAlPV,jBIrAlPadre,jBNuevaFicha,jBRegistroAnterior,jBRegistroSiguiente,jBSSGFF,jBCaracteres, jBAccInv, jBListar\n };\n combos=new javax.swing.JComboBox[]{\n jCBArchivos, jCBHijos, jCBPadresV, jCBHijosV\n };\n abrir(false);//Pongo en orden la barra de herramientas\n \n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public Pesquisa() {\n initComponents();\n ComboReg.addItem(\"Selecione uma região\");\n ComboEst.addItem(\"Selecione primeiro a região\");\n pesquisas();\n ComboEst.disable();\n this.setIconImage(new ImageIcon(getClass().getResource(\"/icones/logosuperior.jpg\")).getImage());\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\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 jTextField1Nombre = new javax.swing.JTextField();\n jTextField1Descripcion = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jComboBox1Rubro = new javax.swing.JComboBox();\n jButton1Aceptar = new javax.swing.JButton();\n jButton2Volver = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"Rubro\");\n\n jLabel2.setBackground(new java.awt.Color(153, 153, 153));\n jLabel2.setForeground(new java.awt.Color(153, 153, 153));\n jLabel2.setText(\"Nuevo Rubro\");\n\n jLabel3.setText(\"Nombre :\");\n\n jLabel4.setText(\"Descripcion :\");\n\n jLabel5.setText(\"Rubro :\");\n\n jButton1Aceptar.setText(\"Aceptar\");\n jButton1Aceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1AceptarActionPerformed(evt);\n }\n });\n\n jButton2Volver.setText(\"Volver\");\n jButton2Volver.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2VolverActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel2))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1Nombre)\n .addComponent(jTextField1Descripcion)\n .addComponent(jComboBox1Rubro, 0, 300, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(383, Short.MAX_VALUE)\n .addComponent(jButton1Aceptar)\n .addGap(18, 18, 18)\n .addComponent(jButton2Volver)\n .addGap(64, 64, 64))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1Nombre, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1Descripcion, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox1Rubro, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1Aceptar)\n .addComponent(jButton2Volver))\n .addGap(50, 50, 50))\n );\n\n pack();\n }", "public Seleccion_Multiple_MultipleRespuesta() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n CBDispositivos = new javax.swing.JComboBox<>();\n BTConectar = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n RBUSB = new javax.swing.JRadioButton();\n RBParalela = new javax.swing.JRadioButton();\n BtCriar = new javax.swing.JButton();\n RBUSB1 = new javax.swing.JRadioButton();\n RBParalela1 = new javax.swing.JRadioButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n CBDispositivos.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n BTConectar.setText(\"Conectar\");\n BTConectar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BTConectarActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Criar Dispositivo:\");\n\n jLabel2.setText(\"Conectar Dispositivo:\");\n\n RBUSB.setText(\"Pendrive\");\n\n RBParalela.setText(\"CD\");\n\n BtCriar.setText(\"Criar\");\n BtCriar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtCriarActionPerformed(evt);\n }\n });\n\n RBUSB1.setText(\"HD Externo\");\n\n RBParalela1.setText(\"DVD\");\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 .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(BtCriar)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(RBUSB1)\n .addComponent(RBUSB))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(RBParalela)\n .addComponent(RBParalela1))\n .addGap(118, 118, 118))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addGap(101, 101, 101)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(CBDispositivos, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(BTConectar))))\n .addContainerGap(179, 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(jLabel1)\n .addComponent(RBUSB)\n .addComponent(RBParalela))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(RBUSB1)\n .addComponent(RBParalela1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(BtCriar)\n .addGap(46, 46, 46)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(CBDispositivos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE)\n .addComponent(BTConectar)\n .addGap(25, 25, 25))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n etiqueta1 = new abstractt.Etiqueta();\n btn_aceptar = new abstractt.Boton();\n btn_nueva = new abstractt.Boton();\n ranchoSelector1 = new domain.RanchoSelector();\n plecaAdministrarFinca1 = new abstractt.PlecaAdministrarFinca();\n fondo1 = new abstractt.fondo();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Seleccion de Rancho / Finca\");\n addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n formComponentResized(evt);\n }\n });\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(238, 217, 170));\n jPanel1.setLayout(null);\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setLayout(null);\n\n etiqueta1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n etiqueta1.setText(\"Seleccionar Finca:\");\n etiqueta1.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 18)); // NOI18N\n jPanel2.add(etiqueta1);\n etiqueta1.setBounds(0, 45, 280, 20);\n\n btn_aceptar.setText(\"Aceptar\");\n btn_aceptar.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n btn_aceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_aceptarActionPerformed(evt);\n }\n });\n jPanel2.add(btn_aceptar);\n btn_aceptar.setBounds(150, 105, 150, 30);\n\n btn_nueva.setText(\"Nueva Finca\");\n btn_nueva.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n btn_nueva.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_nuevaActionPerformed(evt);\n }\n });\n jPanel2.add(btn_nueva);\n btn_nueva.setBounds(350, 105, 150, 30);\n\n ranchoSelector1.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n ranchoSelector1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ranchoSelector1ActionPerformed(evt);\n }\n });\n jPanel2.add(ranchoSelector1);\n ranchoSelector1.setBounds(300, 40, 200, 30);\n\n jPanel1.add(jPanel2);\n jPanel2.setBounds(30, 270, 600, 180);\n jPanel1.add(plecaAdministrarFinca1);\n plecaAdministrarFinca1.setBounds(0, 0, 1234, 79);\n\n fondo1.setText(\"fondo1\");\n jPanel1.add(fondo1);\n fondo1.setBounds(0, 90, 210, 110);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grpGenero = new javax.swing.ButtonGroup();\n pnlPesquisa = new javax.swing.JPanel();\n lblNome = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n rdbUnissex = new javax.swing.JRadioButton();\n rdbMasculino = new javax.swing.JRadioButton();\n rdbFeminino = new javax.swing.JRadioButton();\n lblGenero = new javax.swing.JLabel();\n jcbTipo = new javax.swing.JComboBox<>();\n lblTipo = new javax.swing.JLabel();\n txtSobrenome1 = new javax.swing.JTextField();\n lblCor1 = new javax.swing.JLabel();\n jcbCor = new javax.swing.JComboBox<>();\n lblCor = new javax.swing.JLabel();\n jspMarca = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n lblMarca = new javax.swing.JLabel();\n rdbTodos = new javax.swing.JRadioButton();\n btcPesquisa = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n tblProduto = new javax.swing.JTable();\n lblCarrinho = new javax.swing.JLabel();\n lblQuantidade = new javax.swing.JLabel();\n jspQuantidade = new javax.swing.JSpinner();\n btnAdicionar = new javax.swing.JToggleButton();\n btnCancelar = new javax.swing.JToggleButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"CARRINHO\");\n\n pnlPesquisa.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), \"Pesquisa Produto\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Trebuchet MS\", 1, 12))); // NOI18N\n\n lblNome.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n lblNome.setText(\"* Nome\");\n\n txtNome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNomeActionPerformed(evt);\n }\n });\n\n grpGenero.add(rdbUnissex);\n rdbUnissex.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n rdbUnissex.setText(\"Unissex\");\n\n grpGenero.add(rdbMasculino);\n rdbMasculino.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n rdbMasculino.setText(\"Maculino\");\n\n grpGenero.add(rdbFeminino);\n rdbFeminino.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n rdbFeminino.setText(\"Feminino\");\n\n lblGenero.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n lblGenero.setText(\"* Genero\");\n\n jcbTipo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Todos\", \"Bota\", \"Chinelo\", \"Chuteira\", \"Sandália\", \"Sapato\", \"Tênis\", \" \" }));\n\n lblTipo.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n lblTipo.setText(\"* Tipo\");\n\n lblCor1.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n lblCor1.setText(\"* Tamanho\");\n\n jcbCor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Todos\", \"Amarelo\", \"Azul\", \"Celeste\", \"Laranja\", \"Oliva\", \"Rosa\", \"Roxo\", \"Turquesa\", \"Verde\", \"Vermelho\", \"Violeta\" }));\n\n lblCor.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n lblCor.setText(\"* Cor\");\n\n jList1.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"TODOS\", \"ADIDAS\", \"NIKE\", \"PUMA\", \"HAVAIANA\", \"VANS\", \"LACOSTE\", \"FILA\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n jList1.setSelectedIndex(0);\n jspMarca.setViewportView(jList1);\n\n lblMarca.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n lblMarca.setText(\"* Marca\");\n\n grpGenero.add(rdbTodos);\n rdbTodos.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n rdbTodos.setSelected(true);\n rdbTodos.setText(\"Todos\");\n\n btcPesquisa.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/pesquisa.png\"))); // NOI18N\n\n javax.swing.GroupLayout pnlPesquisaLayout = new javax.swing.GroupLayout(pnlPesquisa);\n pnlPesquisa.setLayout(pnlPesquisaLayout);\n pnlPesquisaLayout.setHorizontalGroup(\n pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addComponent(rdbTodos)\n .addGap(111, 111, 111)\n .addComponent(btcPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rdbFeminino)\n .addComponent(rdbMasculino)\n .addComponent(rdbUnissex)\n .addComponent(lblGenero))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlPesquisaLayout.createSequentialGroup()\n .addComponent(lblCor)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblMarca)\n .addGap(51, 51, 51))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlPesquisaLayout.createSequentialGroup()\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jcbCor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblCor1)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(txtSobrenome1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(68, 68, 68)\n .addComponent(jspMarca, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(55, 55, 55))\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jcbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblTipo))\n .addGap(18, 18, 18)\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblNome)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n pnlPesquisaLayout.setVerticalGroup(\n pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addComponent(lblTipo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jcbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addComponent(lblNome)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addComponent(lblMarca)\n .addGap(5, 5, 5)\n .addComponent(jspMarca, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblGenero)\n .addComponent(lblCor))\n .addGap(5, 5, 5)\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rdbFeminino)\n .addComponent(jcbCor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addComponent(rdbMasculino)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(rdbUnissex))\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addComponent(lblCor1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtSobrenome1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(pnlPesquisaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rdbTodos)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(pnlPesquisaLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(btcPesquisa, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)\n .addContainerGap())))\n );\n\n tblProduto.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Codigo\", \"Nome\", \"Tipo\", \"Quantidade Estoque\", \"Preço\"\n }\n ));\n jScrollPane2.setViewportView(tblProduto);\n\n lblCarrinho.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 24)); // NOI18N\n lblCarrinho.setText(\"Carrinho Produto\");\n\n lblQuantidade.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 12)); // NOI18N\n lblQuantidade.setText(\"Quantidade\");\n\n jspQuantidade.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n\n btnAdicionar.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 12)); // NOI18N\n btnAdicionar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/carrinho.png\"))); // NOI18N\n btnAdicionar.setText(\"Adicionar\");\n btnAdicionar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n btnAdicionar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAdicionarActionPerformed(evt);\n }\n });\n\n btnCancelar.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 14)); // NOI18N\n btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/cancelar.png\"))); // NOI18N\n btnCancelar.setText(\"Cancelar\");\n btnCancelar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n btnCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(pnlPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(54, 54, 54))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(lblCarrinho)\n .addGap(186, 186, 186))))\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 549, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(18, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(208, 208, 208)\n .addComponent(lblQuantidade)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jspQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(115, 115, 115)\n .addComponent(btnAdicionar, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(111, 111, 111))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblCarrinho)\n .addGap(18, 18, 18)\n .addComponent(pnlPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblQuantidade)\n .addComponent(jspQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAdicionar, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(30, Short.MAX_VALUE))\n );\n\n pack();\n }", "public FormInserir() {\n initComponents();\n }", "public void verSeleccionarCaracterisiticasEscalaId()\r\n\t{\r\n\t\tseleccionarcaract = new SeleccionarCaracterisiticasEscalaId(this);\r\n\t\tseleccionarcaract.setVisible(true);\r\n\t}", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public Alunos() {\n initComponents();\n ButtonGroup bg = new ButtonGroup(); \n \n//Agora basta vc adicionar os seus RadioButtons ao objeto desta classe. \n \nbg.add(rdNome); \nbg.add(rdID); \nbg.add(rdNomeEditar);\nbg.add(rdIdEditar);\n }", "public frm_tutor_subida_prueba() {\n }", "public ConsultasRecibos() {\n initComponents();\n cargar_todos_recibos();//LLAMADA A MOSTRAR TODOS LOS RECIBOS\n jDateChooser1.setEnabled(false);//OPCION DE FECHA BLOQUEADA \n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public void construirSegundoSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet2ReglaCompleja = new JComboBox(dominio);// creamos el Segundo combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet2ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el Segundo item\n\t\titemscomboDominiosSet2ReglaCompleja = new JComboBox();// creamo el segundo combo, vacio\n\t\titemscomboDominiosSet2ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el Segundo Dominio de regla compleja\");\n\t\tpanelDerecho.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelDerecho.add(comboDominiosSet2ReglaCompleja);\n\t\tcomboDominiosSet2ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelDerecho.add(itemscomboDominiosSet2ReglaCompleja);\n\t\titemscomboDominiosSet2ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelDerecho.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet2ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}", "public Rubros(java.awt.Frame parent, boolean modal,int idpresupuesto,int quincena, int mes, int ano) {\n super(parent, modal);\n initComponents();\n this.idpresupuesto=idpresupuesto;\n this.quincena=quincena;\n this.mes=mes;\n String nmes=\"\";\n this.ano=ano; \n \n \t\n setLocationRelativeTo(null);\n \n PresupuestoDAO con;\n try {\n con = PresupuestoDAO.getInstance();\n TiposPagoSingleton tipospago_singleton = TiposPagoSingleton.getInstance();\n this.tiposp = tipospago_singleton.getTiposp();\n \n cmb_tipo_pago.setModel(new javax.swing.DefaultComboBoxModel(this.tiposp));\n cmb_tipo_pago.setSelectedItem(\"EFECTIVO\");\n }catch(SQLException e){} \n\n }", "public void construirTercerSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet3ReglaCompleja = new JComboBox(dominio);// creamos el Tercer combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet3ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el Tercer item\n\t\titemscomboDominiosSet3ReglaCompleja = new JComboBox();// creamo el Tercer combo, vacio\n\t\titemscomboDominiosSet3ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el Tercer Dominio de regla compleja\");\n\t\tpanelCentral.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelCentral.add(comboDominiosSet3ReglaCompleja);\n\t\tcomboDominiosSet1ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelCentral.add(itemscomboDominiosSet3ReglaCompleja);\n\t\titemscomboDominiosSet3ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelCentral.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet4ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public void construirCuartoSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet4ReglaCompleja = new JComboBox(dominio);// creamos el Cuarto combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet4ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el Cuarto item\n\t\titemscomboDominiosSet4ReglaCompleja = new JComboBox();// creamo el Cuarto combo, vacio\n\t\titemscomboDominiosSet4ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el Cuarto Dominio de regla compleja\");\n\t\tpanelDerecho.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelDerecho.add(comboDominiosSet4ReglaCompleja);\n\t\tcomboDominiosSet4ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelDerecho.add(itemscomboDominiosSet4ReglaCompleja);\n\t\titemscomboDominiosSet4ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelDerecho.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet4ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}", "public void iniciarUI()\n\t{\n\t\tDefaultTableModel model = new DefaultTableModel(columnas, 1);\n\t\tpasabordos = new JTable(model);\n\n\t\tvuelos = new JComboBox();\n\t\tllenarVuelos();\n\t\t\n\t\tVuelo v = (Vuelo) vuelos.getSelectedItem();\n\t\tif(v!=null)\n\t\t{\n\t\t\tllenarPasabordos(v.getId());\n\t\t}\n\n\t}", "public void construirPrimerSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet1ReglaCompleja = new JComboBox(dominio);// creamos el primer combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet1ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el primer item\n\t\titemscomboDominiosSet1ReglaCompleja = new JComboBox();// creamo el segundo combo, vacio\n\t\titemscomboDominiosSet1ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el primer Dominio de regla compleja\");\n\t\tpanelCentral.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelCentral.add(comboDominiosSet1ReglaCompleja);\n\t\tcomboDominiosSet1ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelCentral.add(itemscomboDominiosSet1ReglaCompleja);\n\t\titemscomboDominiosSet1ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelCentral.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet1ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "public FrmImprimirEtiqueta(java.awt.Frame parent, boolean modal, Produto produto) {\n super(parent, modal);\n initComponents();\n \n BufferedImage image = null;\n try {\n image = ImageIO.read(this.getClass().getResource(\"/images/printer.png\"));\n } catch (IOException e) {\n \n }\n this.setIconImage(image); \n \n try {\n Horus.atualizarComboBox(cbProdutos, ManterProdutoController.getInstance().getProdutos());\n } catch (Exception e){\n JOptionPane.showMessageDialog(null, \"Erro ao carregar Produtos!\");\n } \n \n spQtd.setValue(1);\n \n if (produto!=null){\n int achou = 0;\n for (int i=1;i<cbProdutos.getItemCount();i++){\n if (((Produto)(cbProdutos.getItemAt(i))).getId().equals(produto.getId())){\n cbProdutos.setSelectedIndex(i);\n achou =1;\n break;\n }\n }\n \n if (achou==1){\n txtDescricao.setText(produto.getNome());\n txtPreco.setText(NumberFormat.getCurrencyInstance().format(produto.getValorSaida()));\n }\n }\n }", "public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }", "public TELA_DE_CARREGAMENTO() {\n initComponents();\n }", "public abstract void addSelectorForm();", "@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 jLabel1 = new javax.swing.JLabel();\n rp_tx_clave = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n rp_tx_nombre = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n rp_tx_cantidad = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n rp_tx_marca = new javax.swing.JComboBox<String>();\n jLabel5 = new javax.swing.JLabel();\n rp_tx_precio = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n rp_tx_descripcion = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n\n jLabel7.setBackground(new java.awt.Color(0, 0, 0));\n jLabel7.setFont(new java.awt.Font(\"Verdana\", 3, 24)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"REGISTRAR PRODUCTO\");\n\n jLabel1.setFont(new java.awt.Font(\"Verdana\", 1, 14)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Clave:\");\n\n jLabel2.setFont(new java.awt.Font(\"Verdana\", 1, 14)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Nombre:\");\n\n jLabel3.setFont(new java.awt.Font(\"Verdana\", 1, 14)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Cantidad:\");\n\n jLabel4.setFont(new java.awt.Font(\"Verdana\", 1, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Marca:\");\n\n jLabel5.setFont(new java.awt.Font(\"Verdana\", 1, 14)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Precio:\");\n\n jLabel6.setFont(new java.awt.Font(\"Verdana\", 1, 14)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Descripcion:\");\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/btn_guardar.jpg\"))); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rp_tx_descripcion, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rp_tx_precio, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(rp_tx_nombre, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(rp_tx_clave, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(rp_tx_cantidad)\n .addComponent(rp_tx_marca, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE))))))\n .addGroup(layout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(25, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(rp_tx_clave, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(rp_tx_nombre)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(rp_tx_cantidad)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(rp_tx_marca, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(rp_tx_precio)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rp_tx_descripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(24, Short.MAX_VALUE))\n );\n\n pack();\n }", "public VistaProductos() {\n setUndecorated(true);\n initComponents();\n ValidadSoloNumeros(TextCodProduct);\n ValidadCaracteres(TextDescripcion);\n ValidadSoloNumeros(TextPrecio);\n ValidadSoloNumeros(TextCostoproduc);\n ValidadSoloNumeros(txtIvap);\n cn = Conexion.getConn();\n cargar();\n\n LitsadeProovedores.setModel(new javax.swing.DefaultComboBoxModel(cc.listaProvee().toArray()));\n\n obj = ControllerSql.getInstancia();\n proveedores = cc.listaProvee();\n // LitsadeProovedores.setModel(new javax.swing.DefaultComboBoxModel(proveedores.toArray()));\n LitsadeProovedores.setSelectedIndex(-1);\n }", "public MenuCriarArranhaCeus() {\n initComponents();\n }", "public InformeCobranzasView() {\n super();\n setLocationRelativeTo(this);\n initComponents();\n estadoInicial();\n\n estilosFecha();\n Utilidad.soloNumeros(txHasta);\n Utilidad.soloNumeros(txDesde);\n \n cbOpcion.setSelectedIndex(0);\n\n }", "public ERecor() {\n initComponents();\n setSize(649, 540);\n setLocation(400,100);\n \n comprueba.setText(\"si\");\n \n check.setVisible(true);\n check.setContentAreaFilled(false);\n check.setBorderPainted (false);\n \n update.setVisible(true);\n update.setContentAreaFilled(false);\n update.setBorderPainted (false);\n \n jButton1.setVisible(true);\n jButton1.setContentAreaFilled(false);\n jButton1.setBorderPainted (false);\n \n back.setContentAreaFilled(false);\n back.setBorderPainted (false);\n \n comprueba.setVisible(false);\n fecha.setVisible(false);\n \n options.setVisible(true);\n options.setContentAreaFilled(false);\n options.setBorderPainted (false);\n \n aver.setVisible(false);\n \n options2.setVisible(false);\n options2.setContentAreaFilled(false);\n options2.setBorderPainted (false);\n \n \n String dato;\n dato=(aviso.getText());\n aver.setText(\"\"+dato);\n String descr=\"\", ver=\"\", fech=\"\";\n ResultSet rs;\n Statement st;\n String sql=(\"SELECT * from tareas WHERE CodTarea=\"+dato);\n try {\n st= cn.createStatement();\n rs =st.executeQuery(sql);\n while(rs.next()){\n descr=rs.getString(2);\n fech=rs.getString(3);\n ver=rs.getString(4);\n } \n } catch (SQLException ex) {\n Logger.getLogger(ANota.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n tarea1.setText(\"\"+descr);\n \n if (ver.equals(\"SI\")){\n check.setSelected(true);\n }\n \n atras.setVisible(true);\n atras.setContentAreaFilled(false);\n atras.setBorderPainted (false);\n \n menub.setVisible(true);\n menub.setContentAreaFilled(false);\n menub.setBorderPainted (false);\n \n salir.setVisible(true);\n salir.setContentAreaFilled(false);\n salir.setBorderPainted (false);\n \n transparenciaButton();\n\n }", "public CrearQuedadaVista() {\n }", "private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }", "private void agregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_agregarActionPerformed\n boolean salida = true;\n Palabra p; \n p = new Palabra(campo1.getText());\n boolean continua = p.estaBien();\n if (continua) {\n agregarDiccionario(p);\n salida = pregunta();\n setVisible(true);\n }else {\n JOptionPane.showMessageDialog(null,\"#- Palabra mal escrita intente de nuevo -#\");\n }\n \n if (!salida) {\n JOptionPane.showMessageDialog(null,\"Gracias por usar el Corrector Ortográfico\");\n dic.guardarDiccionario();\n dispose(); //setVisible(false);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton2 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Crear programa maestro de asignación\");\n setLocationByPlatform(true);\n\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jButton2.setText(\"ok\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextField1.setText(\"jTextField1\");\n\n jLabel1.setText(\"Seleccionar archivo de Topcon\");\n\n jButton1.setText(\"Browse\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel2.setLabelFor(jComboBox1);\n jLabel2.setText(\"Número de grabación\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(13, 13, 13)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(264, 264, 264)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addContainerGap())\n );\n\n pack();\n }", "public vcRecepcion() {\n initComponents();\n setTitle(\"RentCarSystem | Consulta Recepcion\");\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setExtendedState(MAXIMIZED_BOTH);\n mcr = new mcRecepcion();\n mcr.allRecepciones();\n setVisible(true);\n }", "public ConsultaEquipo() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n textNombre = new javax.swing.JTextField();\n textEdad = new javax.swing.JTextField();\n radioMasculino = new javax.swing.JRadioButton();\n radioFemenino = new javax.swing.JRadioButton();\n comboProductos = new javax.swing.JComboBox();\n jLabel4 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n textFecha = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel3.setText(\"Sexo\");\n\n jLabel2.setText(\"Edad\");\n\n jLabel1.setText(\"Nombre\");\n\n buttonGroup1.add(radioMasculino);\n radioMasculino.setText(\"Masculino\");\n\n buttonGroup1.add(radioFemenino);\n radioFemenino.setText(\"Femenino\");\n\n jLabel4.setText(\"Productos\");\n\n jButton1.setText(\"Comprar\");\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(\"Regresar\");\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(\"Fecha\");\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(120, 120, 120)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(radioFemenino)\n .addComponent(radioMasculino)))\n .addGroup(layout.createSequentialGroup()\n .addGap(147, 147, 147)\n .addComponent(jLabel3)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(57, 57, 57)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(textFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(78, 78, 78)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(textNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(textEdad, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(55, 55, 55)\n .addGroup(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(62, 62, 62)\n .addComponent(jLabel4))\n .addGroup(layout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addComponent(comboProductos, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(46, 90, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(29, 29, 29)\n .addComponent(jButton2)))\n .addGap(106, 106, 106))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(109, 109, 109)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(textNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(textEdad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radioMasculino))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(97, 97, 97)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2)))\n .addGroup(layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(comboProductos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(3, 3, 3)\n .addComponent(radioFemenino)\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(textFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(53, Short.MAX_VALUE))\n );\n\n pack();\n }", "public ControllerNewCRV(newCRV fenetre, DAOProduit DaoProd, DAOCategorie DaoCat,DAOMedecin daoMed,DAOVisiteur daoVisi, DAOCompteRendu daoCRV) {\n\t\t\n\t\tthis.fenetre = fenetre;\n\t\tthis.daoCat = DaoCat;\n\t\tthis.daoProd = DaoProd;\n\t\tthis.daoMed = daoMed;\n\t\tthis.daoVisi = daoVisi;\n\t\tthis.daoCRV = daoCRV;\n\t\tfenetre.getBtnRetour().addActionListener(this);\n\t\tfenetre.getBtnValider().addActionListener(this);\n\t\tfenetre.getBtnAjouter().addActionListener(this);\n\t\tfenetre.getComboBox_cat().addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent event) {\n\t //\n\t // Get the source of the component, which is our combo\n\t // box.\n\t //\n\t JComboBox comboBox = (JComboBox) event.getSource();\n\t String comboBoxname = comboBox.getName();\n\t \t\t\n\t \t\tswitch (comboBoxname) {\n\t \t\tcase \"selectionner\":\n\t \t\t\tviewProduit();\n\t \t\t\tbreak;\t\n\n\t \t\tdefault:\n\t \t\t\tbreak;\n\t \t\t}\t\t\n\t \n\n\t }\n\t });\n\t}", "public frmOrdenacao() {\n initComponents();\n setResizable(false);\n ordenacaoControle = new OrdenacaoControle();\n }", "private JPanel criarPainelNorte() {\n\n JPanel pNorte = new JPanel(new BorderLayout());\n\n pNorte.setBorder(PADDING_BORDER);\n\n JLabel lbl = new JLabel(\"Selecione o tipo de Utilizador:\", JLabel.CENTER);\n\n btnFae = criarRadioBtnFae();\n btnOrg = criarRadioBtnOrg();\n btnRep = criarRadioBtnRep();\n\n ButtonGroup rBtnGroup = new ButtonGroup();\n rBtnGroup.add(btnFae);\n rBtnGroup.add(btnOrg);\n rBtnGroup.add(btnRep);\n\n JPanel panelBotoes = new JPanel(new FlowLayout());\n panelBotoes.add(btnFae);\n panelBotoes.add(btnOrg);\n panelBotoes.add(btnRep);\n\n pNorte.add(lbl, BorderLayout.NORTH);\n pNorte.add(panelBotoes, BorderLayout.CENTER);\n\n return pNorte;\n }", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "public RegistrarCompra() {\n initComponents();\n tabelaFornecedor.setModel(modelFornecedor);\n\n }", "public FiltroGirosDialog() {\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grup1 = new javax.swing.ButtonGroup();\n labInstruccion = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n txtDescripcion = new javax.swing.JTextField();\n txtColor = new javax.swing.JTextField();\n txtPrecioCosto = new javax.swing.JTextField();\n txtCodigo = new javax.swing.JTextField();\n txtMarca = new javax.swing.JTextField();\n txtPrecioVenta = new javax.swing.JTextField();\n txtImpuesto = new javax.swing.JTextField();\n txtEmpresa = new javax.swing.JTextField();\n btnAtras = new javax.swing.JButton();\n btnAgregar = new javax.swing.JButton();\n txtFechaIngreso = new com.toedter.calendar.JDateChooser();\n rdbBolso = new javax.swing.JRadioButton();\n rdbZapato = new javax.swing.JRadioButton();\n jLabel1 = new javax.swing.JLabel();\n cmbGenero = new javax.swing.JComboBox();\n jLabel11 = new javax.swing.JLabel();\n cmbCategoria = new javax.swing.JComboBox();\n jLabel12 = new javax.swing.JLabel();\n txtTalla = new javax.swing.JTextField();\n txtCantidad = new javax.swing.JSpinner();\n jLabel13 = new javax.swing.JLabel();\n btnGenerarCodigo = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Agregar Producto\");\n setMinimumSize(new java.awt.Dimension(590, 430));\n setPreferredSize(new java.awt.Dimension(590, 430));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n labInstruccion.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 16)); // NOI18N\n labInstruccion.setForeground(new java.awt.Color(102, 102, 102));\n labInstruccion.setText(\"Ingrese los datos del nuevo producto:\");\n getContentPane().add(labInstruccion, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -1, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(102, 102, 102));\n jLabel3.setText(\"Descripción:\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 96, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(102, 102, 102));\n jLabel4.setText(\"Fecha de Ingreso:\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 60, -1, -1));\n\n jLabel5.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(102, 102, 102));\n jLabel5.setText(\"Color:\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 180, -1, -1));\n\n jLabel6.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(102, 102, 102));\n jLabel6.setText(\"Marca:\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 180, -1, -1));\n\n jLabel7.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(102, 102, 102));\n jLabel7.setText(\"Precio a costo:\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 260, -1, -1));\n\n jLabel8.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(102, 102, 102));\n jLabel8.setText(\"Precio de venta:\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 260, -1, -1));\n\n jLabel9.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(102, 102, 102));\n jLabel9.setText(\"Empresa:\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 220, -1, -1));\n\n jLabel10.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(102, 102, 102));\n jLabel10.setText(\"Impuesto:\");\n getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 220, -1, -1));\n\n txtDescripcion.setBackground(new java.awt.Color(237, 237, 237));\n txtDescripcion.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n getContentPane().add(txtDescripcion, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 93, 480, -1));\n\n txtColor.setBackground(new java.awt.Color(237, 237, 237));\n txtColor.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n txtColor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtColorActionPerformed(evt);\n }\n });\n getContentPane().add(txtColor, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 180, 80, -1));\n\n txtPrecioCosto.setBackground(new java.awt.Color(237, 237, 237));\n txtPrecioCosto.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n txtPrecioCosto.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtPrecioCostoKeyTyped(evt);\n }\n });\n getContentPane().add(txtPrecioCosto, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 260, 109, -1));\n\n txtCodigo.setEditable(false);\n txtCodigo.setBackground(new java.awt.Color(237, 237, 237));\n txtCodigo.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n txtCodigo.setEnabled(false);\n getContentPane().add(txtCodigo, new org.netbeans.lib.awtextra.AbsoluteConstraints(55, 45, 220, 30));\n\n txtMarca.setBackground(new java.awt.Color(237, 237, 237));\n txtMarca.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n getContentPane().add(txtMarca, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 180, 130, -1));\n\n txtPrecioVenta.setBackground(new java.awt.Color(237, 237, 237));\n txtPrecioVenta.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n txtPrecioVenta.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtPrecioVentaKeyTyped(evt);\n }\n });\n getContentPane().add(txtPrecioVenta, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 260, 130, -1));\n\n txtImpuesto.setBackground(new java.awt.Color(237, 237, 237));\n txtImpuesto.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n txtImpuesto.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtImpuestoKeyTyped(evt);\n }\n });\n getContentPane().add(txtImpuesto, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 220, 80, -1));\n\n txtEmpresa.setBackground(new java.awt.Color(237, 237, 237));\n txtEmpresa.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n getContentPane().add(txtEmpresa, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 220, 346, -1));\n\n btnAtras.setBackground(new java.awt.Color(177, 177, 177));\n btnAtras.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n btnAtras.setForeground(new java.awt.Color(51, 51, 51));\n btnAtras.setText(\"Atrás\");\n btnAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAtrasActionPerformed(evt);\n }\n });\n getContentPane().add(btnAtras, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 329, -1, 40));\n\n btnAgregar.setBackground(new java.awt.Color(177, 177, 177));\n btnAgregar.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n btnAgregar.setForeground(new java.awt.Color(51, 51, 51));\n btnAgregar.setText(\"Agregar\");\n btnAgregar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAgregarActionPerformed(evt);\n }\n });\n getContentPane().add(btnAgregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(481, 328, -1, 40));\n\n txtFechaIngreso.setBackground(new java.awt.Color(237, 237, 237));\n getContentPane().add(txtFechaIngreso, new org.netbeans.lib.awtextra.AbsoluteConstraints(386, 45, 170, 30));\n\n rdbBolso.setBackground(new java.awt.Color(175, 201, 201));\n grup1.add(rdbBolso);\n rdbBolso.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n rdbBolso.setText(\"Bolso\");\n rdbBolso.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rdbBolsoActionPerformed(evt);\n }\n });\n getContentPane().add(rdbBolso, new org.netbeans.lib.awtextra.AbsoluteConstraints(505, 11, -1, -1));\n\n rdbZapato.setBackground(new java.awt.Color(175, 201, 201));\n grup1.add(rdbZapato);\n rdbZapato.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n rdbZapato.setText(\"Zapato\");\n rdbZapato.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rdbZapatoActionPerformed(evt);\n }\n });\n getContentPane().add(rdbZapato, new org.netbeans.lib.awtextra.AbsoluteConstraints(445, 11, -1, -1));\n\n jLabel1.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(102, 102, 102));\n jLabel1.setText(\"Género:\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 135, -1, -1));\n\n cmbGenero.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"M\", \"F\" }));\n getContentPane().add(cmbGenero, new org.netbeans.lib.awtextra.AbsoluteConstraints(55, 132, -1, -1));\n\n jLabel11.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(102, 102, 102));\n jLabel11.setText(\"Categoría:\");\n getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 130, -1, -1));\n\n cmbCategoria.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Ninos\", \"Jovenes\", \"Adulto\" }));\n getContentPane().add(cmbCategoria, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 130, 115, -1));\n\n jLabel12.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(102, 102, 102));\n jLabel12.setText(\"Talla:\");\n getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 130, -1, -1));\n\n txtTalla.setBackground(new java.awt.Color(237, 237, 237));\n txtTalla.setFont(new java.awt.Font(\"Yu Gothic UI\", 0, 11)); // NOI18N\n txtTalla.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtTallaKeyTyped(evt);\n }\n });\n getContentPane().add(txtTalla, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 130, 80, -1));\n\n txtCantidad.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(1), Integer.valueOf(1), null, Integer.valueOf(1)));\n getContentPane().add(txtCantidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 180, 70, -1));\n\n jLabel13.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel13.setForeground(new java.awt.Color(102, 102, 102));\n jLabel13.setText(\"Cantidad:\");\n getContentPane().add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 179, -1, -1));\n\n btnGenerarCodigo.setBackground(new java.awt.Color(177, 177, 177));\n btnGenerarCodigo.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n btnGenerarCodigo.setForeground(new java.awt.Color(51, 51, 51));\n btnGenerarCodigo.setText(\"Generear código\");\n btnGenerarCodigo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGenerarCodigoActionPerformed(evt);\n }\n });\n getContentPane().add(btnGenerarCodigo, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 290, -1, -1));\n\n jLabel2.setFont(new java.awt.Font(\"Yu Gothic UI\", 1, 12)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(102, 102, 102));\n jLabel2.setText(\"Código:\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 56, -1, -1));\n\n jPanel1.setBackground(new java.awt.Color(175, 201, 201));\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 600, 390));\n\n getAccessibleContext().setAccessibleDescription(\"\");\n\n pack();\n setLocationRelativeTo(null);\n }", "public FRM_Estudiantes() {\n initComponents();\n }", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public ConsultarVeiculo() {\n initComponents();\n }", "public registro() {\n initComponents();\n }", "public void generarCuestionario() {\n setLayout(null);\n \n setTitle(\"Cuestionario de Fin de Curso\"); \n \n //Con el modelo construido debemos representar uestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n \n Opcion op1 = new Opcion();\n op1.setTitulo(\"Londres\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"Roma\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Paris\");\n op3.setCorrecta(true);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Oslo\");\n op4.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Cual es la capital de Francia\");\n p1.setOpciones(opciones);\n \n //Opiciones de la pregumta Numero 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Atlantico\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Indico\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Artico\");\n op23.setCorrecta(false);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Pacifico\");\n op24.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Cual es el oceano más grande del mundo?\");\n p2.setOpciones(opciones2);\n \n //Opiciones de la pregumta Numero 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"Cristobal Colon\");\n op31.setCorrecta(true);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Cristobal Nodal\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Cuahutemoc blanco\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Cuahutemoc\");\n op34.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien descubrio América?\");\n p3.setOpciones(opciones3);\n \n //Opiciones de la pregumta Numero 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"Fernanflo\");\n op41.setCorrecta(false);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Polinesios\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"Eh vegeta\");\n op43.setCorrecta(true);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Willyrex\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Quien es el mejor youtuber?\");\n p4.setOpciones(opciones4);\n \n //Opiciones de la pregumta Numero 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Amarillo patito\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Verde Sherec\");\n op52.setCorrecta(false);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Rojo me faltas tú\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Azul\");\n op54.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5 = {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿De que color es el cielo?\");\n p5.setOpciones(opciones5);\n \n //Opiciones de la pregumta Numero 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"200\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"100\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"45\");\n op63.setCorrecta(true);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"13\");\n op64.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿De cuantas localidades se compone una memoria de 8x5?\");\n p6.setOpciones(opciones6);\n \n //Opiciones de la pregumta Numero 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Try - Catch\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"IF\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Switch - Case\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"For anidado\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que estructura condicional se recomienda usar menos en una interfaz de usuario?\");\n p7.setOpciones(opciones7);\n \n //Opiciones de la pregumta Numero 8\n Opcion op81 = new Opcion();\n op81.setTitulo(\"Access\");\n op81.setCorrecta(false);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Oracle\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"MySQL\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Mongo DB\");\n op84.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Es una base de datos no relacional de uso moderno?\");\n p8.setOpciones(opciones8);\n \n //Opiciones de la pregumta Numero 9\n Opcion op91 = new Opcion();\n op91.setTitulo(\"GitHub\");\n op91.setCorrecta(true);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"MIcrosoft teams\");\n op22.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Zoom\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"Collaborate\");\n op94.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿Es una plataforma para trabajo en línea?\");\n p9.setOpciones(opciones9);\n\n //Opiciones de la pregumta Numero 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Prog. a nivel maquina\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Prog. orientada a objetos\");\n op102.setCorrecta(true);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"MySQL\");\n op103.setCorrecta(false);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"C++\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que aprendi en este curso?\");\n p10.setOpciones(opciones10);\n\n\n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n\n //Se agrega a este list la unica prgunta que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n c.setPreguntas(preguntas);\n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la preunta\n mostrarPregunta(preguntaActual);\n \n Salir.setVisible(false);\n siguiente.setEnabled(false);\n \n }", "public TelaRegistroVendas() {\n initComponents();\n }", "public DetalleProducto() {\n initComponents();\n }", "private void srediFormu() {\n List<PoslovniPartner> lpp = new ArrayList<>();\n try {\n lpp = Kontroler.vratiInstancu().vratiPoslovnePartnere();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n }\n\n List<NačinPlaćanja> lnp = new ArrayList<>();\n try {\n lnp = Kontroler.vratiInstancu().vratiNačinePlaćanja();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n }\n\n List<Proizvod> lp = new ArrayList<>();\n try {\n lp = Kontroler.vratiInstancu().vratiProizvode();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n }\n\n jcbPartner.setModel(new DefaultComboBoxModel(lpp.toArray()));\n jcbNačinPlaćanja.setModel(new DefaultComboBoxModel(lnp.toArray()));\n\n Faktura izabranaFaktura = (Faktura) Util.vratiInstancu().vrati(\"izabrana_faktura\");\n if (izabranaFaktura != null) {\n jcbPartner.setSelectedItem(izabranaFaktura.getPoslovniPartner());\n jcbNačinPlaćanja.setSelectedItem(izabranaFaktura.getNačinPlaćanja());\n jtxtNapomena.setText(izabranaFaktura.getNapomena());\n if (izabranaFaktura.getDatumFakturisanja() != null) {\n jtxtDatumFakturisanja.setText(df.format(izabranaFaktura.getDatumFakturisanja()));\n }\n if (izabranaFaktura.getRok() != null) {\n jtxtRok.setText(df.format(izabranaFaktura.getRok()));\n }\n jlbKompletirana.setText(izabranaFaktura.getKompletirana() ? \"(KOMPLETIRANA)\" : \"(DRAFT)\");\n jlblBrojFakture1.setText(izabranaFaktura.getBrojFakture());\n jtblStavkeFakture.setModel(new StavkaFaktureTableModel((izabranaFaktura)));\n Double netoIznos = 0d;\n for (StavkaFakture stavkaFakture : izabranaFaktura.getStavke()) {\n netoIznos += stavkaFakture.getJediničnaCena() * stavkaFakture.getKoličina();\n }\n jtxtNetoVrednost.setText(String.valueOf(Math.round(netoIznos * 1000.0) / 1000.0));\n jbtnKreirajNovuFakturu.setVisible(false);\n jbtnSačuvajFakturu.setText(\"Izmeni fakturu\");\n if (izabranaFaktura.getKompletirana()) {\n enableAllComponents(false);\n jtxtUkupnaVrednost.setText(String.valueOf((double) Math.round(izabranaFaktura.getUkupanIznos() * 1000) / 1000));\n jtxtPDV.setText(String.valueOf((double) Math.round(izabranaFaktura.getUkupanPorez() * 1000) / 1000));\n jtxtFakturisao.setText(slavko.baze2.procesnabavke.gui.util.Util.vratiInstancu().vrati(\"prijavljeni_korisnik\").toString());\n }\n Util.vratiInstancu().obriši(\"izabrana_faktura\");\n\n } else {\n jlblBrojFakture1.setText(\"\");\n jlbKompletirana.setVisible(false);\n jcbPartner.setSelectedItem(null);\n jcbNačinPlaćanja.setSelectedItem(null);\n jtblStavkeFakture.setModel(new StavkaFaktureTableModel(new Faktura()));\n jtxtNetoVrednost.setText(\"0.0\");\n enableAllComponents(false);\n }\n\n }", "public ViewProveedores() {\n initComponents();\n }", "public frmVerzamelingBeheer() {\n try {\n initComponents();\n \n lblId.setVisible(false);\n\n pnlEdit.setVisible(false);\n\n for (VerzamelingsType type : TypeService.GetAllTypes()) {\n cmbType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n cmbEditType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n }\n\n \n for (Categorie categorie : CategorieService.GetAllCategories()) {\n cmbCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n cmbEditCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n }\n \n //vertaling voor JOptionpane\n UIManager.put(\"OptionPane.cancelButtonText\", \"Annuleren\");\n UIManager.put(\"OptionPane.noButtonText\", \"Nee\");\n UIManager.put(\"OptionPane.okButtonText\", \"Oke\");\n UIManager.put(\"OptionPane.yesButtonText\", \"Ja\");\n \n this.setTitle(\"Verzamelingen beheren - Verzamelingenbeheer\");\n \n ShowEditItems(false);\n RefreshList();\n }\n catch (ExceptionInInitializerError ex)\n {\n JOptionPane.showMessageDialog(null, \"Er kan geen verbinding worden gemaakt met de database (\" + ex.getMessage() + \").\", \"Fout\", ERROR_MESSAGE);\n System.exit(1);\n }\n\n }", "public Form_reporte_comuna_y_tipo(Controlador cont) {\n initComponents();\n this.controlador = cont;\n cargarSelect();\n\n }", "public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }", "public CadastrarProduto() {\n initComponents();\n }", "public CrearPedidos() {\n initComponents();\n }", "public AcervoCtrl(JPanel frmAcervo, JLabel imagem, JLabel lblStatus, JLabel lblValor, JComboBox<String> cbSetor,\r\n\t\t\tJComboBox<String> cbSetorT, JComboBox<String> cbStatus, JComboBox<String> cbStatusT,\r\n\t\t\tJComboBox<String> cbCategoria, JComboBox<String> cbObras, JComboBox<String> cbMaterial,\r\n\t\t\tJTextField nomeArtista, JTextField nomeObra, JTextField txtNovaObra, JFormattedTextField dataAquisicao,\r\n\t\t\tJEditorPane descricaoObra, JLabel msgGravar, JLabel msgVazio, JFormattedTextField txtValor,\r\n\t\t\tJButton btnPesqArtist, JButton btnNovoArtista, JButton btnEditarArtista, JButton btnNovaCategoria,\r\n\t\t\tJButton btnEditarCategoria, JButton btnNovoMaterial, JButton btnEditarMaterial, JButton btnNovoSetor,\r\n\t\t\tJButton btnEditarSetor, JButton btnNovoSetorT, JButton btnEditarSetorT, JTextField idObra,\r\n\t\t\tJButton btnGravar) {\r\n\r\n\t\tthis.frmAcervo = frmAcervo;\r\n\t\tthis.btnGravar = btnGravar;\r\n\t\tthis.idObra = idObra;\r\n\t\tthis.obras = new ArrayList<ObraMdl>();\r\n\t\tthis.imagem = imagem;\r\n\t\tthis.lblValor = lblValor;\r\n\t\tthis.nomeArtista = nomeArtista;\r\n\t\tthis.txtNovaObra = txtNovaObra;\r\n\t\tthis.lblStatus = lblStatus;\r\n\t\tthis.nomeObra = nomeObra;\r\n\t\tthis.dataAquisicao = dataAquisicao;\r\n\t\tthis.edtDescricao = descricaoObra;\r\n\t\tthis.cbMaterial = cbMaterial;\r\n\t\tthis.cbObras = cbObras;\r\n\t\tthis.cbCategoria = cbCategoria;\r\n\t\tthis.cbSetor = cbSetor;\r\n\t\tthis.cbSetorT = cbSetorT;\r\n\t\tthis.cbStatus = cbStatus;\r\n\t\tthis.cbStatusT = cbStatusT;\r\n\t\tthis.btnPesqArtist = btnPesqArtist;\r\n\t\tthis.btnNovoArtista = btnNovoArtista;\r\n\t\tthis.btnEditarArtista = btnEditarArtista;\r\n\t\tthis.btnNovaCategoria = btnNovaCategoria;\r\n\t\tthis.btnEditarCategoria = btnEditarCategoria;\r\n\t\tthis.btnNovoMaterial = btnNovoMaterial;\r\n\t\tthis.btnEditarMaterial = btnEditarMaterial;\r\n\t\tthis.btnNovoSetor = btnNovoSetor;\r\n\t\tthis.btnEditarSetor = btnEditarSetor;\r\n\t\tthis.btnNovoSetorT = btnNovoSetorT;\r\n\t\tthis.btnEditarSetorT = btnEditarSetorT;\r\n\t\tthis.txtValor = txtValor;\r\n\t\tthis.msgGravar = msgGravar;\r\n\t\tthis.msgVazio = msgVazio;\r\n\t\tthis.caminhoImagem = \"\";\r\n\r\n\t\tlerAcervo();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\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 jcombocateg = new javax.swing.JComboBox();\n txtcodigo = new javax.swing.JTextField();\n txtproduto = new javax.swing.JTextField();\n txtpreco = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jLabel5 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Adicionar Produtos\");\n setResizable(false);\n\n jLabel1.setText(\"Codigo\");\n\n jLabel2.setText(\"Produto\");\n\n jLabel3.setText(\"Categoria\");\n\n jLabel4.setText(\"Preço\");\n\n jcombocateg.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Medicamento\", \"Perfumaria\" }));\n\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jButton1.setText(\"Adicionar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Status\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 13))); // NOI18N\n\n buttonGroup1.add(jRadioButton1);\n jRadioButton1.setText(\"Disponivel\");\n\n buttonGroup1.add(jRadioButton2);\n jRadioButton2.setText(\"Em Falta\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jRadioButton1)\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jRadioButton2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 3, Short.MAX_VALUE)\n .addComponent(jRadioButton2))\n );\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel5.setText(\"Adicionar Produtos\");\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 .addGap(121, 121, 121)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(137, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(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(10, 10, 10)\n .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(43, 43, 43)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(26, 26, 26))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(17, 17, 17)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(22, 22, 22))\n );\n\n setSize(new java.awt.Dimension(416, 415));\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n gTrabajoEquipo = new javax.swing.ButtonGroup();\n gCambio = new javax.swing.ButtonGroup();\n gTemorFracaso = new javax.swing.ButtonGroup();\n gRendirse = new javax.swing.ButtonGroup();\n home = new javax.swing.JPanel();\n inicial = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n rbSite = new javax.swing.JRadioButton();\n rbNote = new javax.swing.JRadioButton();\n rbAveceste = new javax.swing.JRadioButton();\n rbSica = new javax.swing.JRadioButton();\n rbNoca = new javax.swing.JRadioButton();\n rbAvecesca = new javax.swing.JRadioButton();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n rbSitf = new javax.swing.JRadioButton();\n rbNotf = new javax.swing.JRadioButton();\n rbAvecestf = new javax.swing.JRadioButton();\n jLabel8 = new javax.swing.JLabel();\n rbAvecesrf = new javax.swing.JRadioButton();\n rbNorf = new javax.swing.JRadioButton();\n rbSirf = new javax.swing.JRadioButton();\n btnSiguiente = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n segundal = new javax.swing.JPanel();\n header = new javax.swing.JPanel();\n txtTitulo = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n home.setBackground(new java.awt.Color(238, 238, 238));\n home.setLayout(new java.awt.CardLayout());\n\n inicial.setBackground(new java.awt.Color(238, 238, 238));\n\n jLabel4.setFont(new java.awt.Font(\"Roboto Cn\", 0, 18)); // NOI18N\n jLabel4.setText(\"1. ¿Te sientes a gusto trabajando en equipo?\");\n\n rbSite.setText(\"Si\");\n\n rbNote.setText(\"No\");\n\n rbAveceste.setSelected(true);\n rbAveceste.setText(\"A veces\");\n\n rbSica.setText(\"Si\");\n\n rbNoca.setText(\"No\");\n\n rbAvecesca.setSelected(true);\n rbAvecesca.setText(\"A veces\");\n\n jLabel6.setFont(new java.awt.Font(\"Roboto Cn\", 0, 18)); // NOI18N\n jLabel6.setText(\"2. ¿Cuando hay cambios te adaptas facilmente?\");\n\n jLabel7.setFont(new java.awt.Font(\"Roboto Cn\", 0, 18)); // NOI18N\n jLabel7.setText(\"3. ¿Te atemoriza fracasar?\");\n\n rbSitf.setText(\"Si\");\n\n rbNotf.setText(\"No\");\n\n rbAvecestf.setSelected(true);\n rbAvecestf.setText(\"A veces\");\n\n jLabel8.setFont(new java.awt.Font(\"Roboto Cn\", 0, 18)); // NOI18N\n jLabel8.setText(\"4. ¿Te rindes con facilidad?\");\n\n rbAvecesrf.setSelected(true);\n rbAvecesrf.setText(\"A veces\");\n\n rbNorf.setText(\"No\");\n\n rbSirf.setText(\"Si\");\n\n btnSiguiente.setBackground(new java.awt.Color(0, 150, 136));\n btnSiguiente.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n btnSiguiente.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnSiguienteMouseClicked(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Roboto Cn\", 0, 20)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"SIGUIENTE\");\n\n javax.swing.GroupLayout btnSiguienteLayout = new javax.swing.GroupLayout(btnSiguiente);\n btnSiguiente.setLayout(btnSiguienteLayout);\n btnSiguienteLayout.setHorizontalGroup(\n btnSiguienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(btnSiguienteLayout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addComponent(jLabel3)\n .addContainerGap(47, Short.MAX_VALUE))\n );\n btnSiguienteLayout.setVerticalGroup(\n btnSiguienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, btnSiguienteLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3)\n .addContainerGap())\n );\n\n jLabel2.setBackground(new java.awt.Color(70, 136, 240));\n jLabel2.setFont(new java.awt.Font(\"Roboto Cn\", 0, 30)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(70, 136, 240));\n jLabel2.setText(\"Responde las siguientes preguntas:\");\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Recursos/servicios-7.png\"))); // NOI18N\n\n javax.swing.GroupLayout inicialLayout = new javax.swing.GroupLayout(inicial);\n inicial.setLayout(inicialLayout);\n inicialLayout.setHorizontalGroup(\n inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(inicialLayout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(inicialLayout.createSequentialGroup()\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(inicialLayout.createSequentialGroup()\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addGroup(inicialLayout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(rbSirf)\n .addGap(33, 33, 33)\n .addComponent(rbNorf)\n .addGap(27, 27, 27)\n .addComponent(rbAvecesrf)))\n .addGroup(inicialLayout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(rbSitf)\n .addGap(33, 33, 33)\n .addComponent(rbNotf)\n .addGap(27, 27, 27)\n .addComponent(rbAvecestf)))\n .addGroup(inicialLayout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(rbSica)\n .addGap(33, 33, 33)\n .addComponent(rbNoca)\n .addGap(27, 27, 27)\n .addComponent(rbAvecesca)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(inicialLayout.createSequentialGroup()\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(inicialLayout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(rbSite)\n .addGap(33, 33, 33)\n .addComponent(rbNote)\n .addGap(27, 27, 27)\n .addComponent(rbAveceste))\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(inicialLayout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addComponent(jLabel5)\n .addGap(68, 68, 68))\n .addGroup(inicialLayout.createSequentialGroup()\n .addComponent(btnSiguiente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n inicialLayout.setVerticalGroup(\n inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(inicialLayout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rbSite)\n .addComponent(rbNote)\n .addComponent(rbAveceste))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(inicialLayout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rbSica)\n .addComponent(rbNoca)\n .addComponent(rbAvecesca))\n .addGap(18, 18, 18)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rbSitf)\n .addComponent(rbNotf)\n .addComponent(rbAvecestf)))\n .addComponent(jLabel5))\n .addGap(18, 18, 18)\n .addComponent(jLabel8)\n .addGap(18, 18, 18)\n .addGroup(inicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rbSirf)\n .addComponent(rbNorf)\n .addComponent(rbAvecesrf))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)\n .addComponent(btnSiguiente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27))\n );\n\n home.add(inicial, \"card3\");\n\n javax.swing.GroupLayout segundalLayout = new javax.swing.GroupLayout(segundal);\n segundal.setLayout(segundalLayout);\n segundalLayout.setHorizontalGroup(\n segundalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 710, Short.MAX_VALUE)\n );\n segundalLayout.setVerticalGroup(\n segundalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 499, Short.MAX_VALUE)\n );\n\n home.add(segundal, \"card3\");\n\n header.setBackground(new java.awt.Color(70, 136, 240));\n\n txtTitulo.setFont(new java.awt.Font(\"Roboto Cn\", 0, 33)); // NOI18N\n txtTitulo.setForeground(new java.awt.Color(255, 255, 255));\n txtTitulo.setText(\"Test\");\n\n javax.swing.GroupLayout headerLayout = new javax.swing.GroupLayout(header);\n header.setLayout(headerLayout);\n headerLayout.setHorizontalGroup(\n headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(headerLayout.createSequentialGroup()\n .addGap(73, 73, 73)\n .addComponent(txtTitulo)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n headerLayout.setVerticalGroup(\n headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(headerLayout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(txtTitulo)\n .addContainerGap(43, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(header, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(home, 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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(header, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(home, javax.swing.GroupLayout.PREFERRED_SIZE, 499, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0))\n );\n\n pack();\n }", "public GestionarRegistro() {\n initComponents();\n this.setLocationRelativeTo(null);\n d = new Donante();\n v = new Validacion();\n a=new Archivos();\n \n // r=new RegistroDonanteApto();\n\n }", "public FrmCatalogo() {\n initComponents();\n rdCd.setSelected(true);\n this.setLocationRelativeTo(null);\n volumes = new ArrayList<>();\n }", "public void verSelecionarReglaConocimiento(String accion)\r\n\t{\r\n\t\tselecionarreglaconocimiento = new SelecionarReglaConocimiento(this, accion);\r\n\t\tselecionarreglaconocimiento.setVisible(true);\r\n\t}", "public ChoixEntreprise() {\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n lblTipoConta = new javax.swing.JLabel();\n radCorrente = new javax.swing.JRadioButton();\n radPoupanca = new javax.swing.JRadioButton();\n lblTitularConta = new javax.swing.JLabel();\n txtTitular = new javax.swing.JTextField();\n lblTitularAgencia = new javax.swing.JLabel();\n cmbAgencias = new javax.swing.JComboBox<>();\n lblSenha = new javax.swing.JLabel();\n lblNumeroConta = new javax.swing.JLabel();\n txtSenha = new javax.swing.JPasswordField();\n btnSalvar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Sans\", 1, 24)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Banco LTP S.A.\");\n\n lblTipoConta.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblTipoConta.setText(\"Tipo de Conta:\");\n\n buttonGroup1.add(radCorrente);\n radCorrente.setSelected(true);\n radCorrente.setText(\"C. Corrente\");\n radCorrente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radCorrenteActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(radPoupanca);\n radPoupanca.setText(\"C. Poupança\");\n\n lblTitularConta.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblTitularConta.setText(\"Títular da Conta:\");\n\n lblTitularAgencia.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblTitularAgencia.setText(\"Agência da Conta:\");\n\n lblSenha.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblSenha.setText(\"Senha da Conta:\");\n\n lblNumeroConta.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblNumeroConta.setText(\"Número da Conta:\");\n\n btnSalvar.setText(\"Salvar\");\n btnSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalvarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblTipoConta, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblTitularAgencia, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(98, 98, 98)\n .addComponent(radCorrente)\n .addGap(32, 32, 32)\n .addComponent(radPoupanca)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n .addComponent(lblTitularConta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblNumeroConta, javax.swing.GroupLayout.PREFERRED_SIZE, 413, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(lblSenha, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtSenha)\n .addComponent(btnSalvar, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(75, 75, 75)\n .addComponent(txtTitular, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(cmbAgencias, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(155, 155, 155))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(lblTipoConta)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(radCorrente)\n .addComponent(radPoupanca))\n .addGap(27, 27, 27)\n .addComponent(lblTitularAgencia)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbAgencias, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(lblNumeroConta)\n .addGap(18, 18, 18)\n .addComponent(lblTitularConta)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtTitular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(13, 13, 13)\n .addComponent(lblSenha)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btnSalvar)\n .addContainerGap(28, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n campoNroFactura = new javax.swing.JTextField();\n campoCliente = new javax.swing.JTextField();\n campoValor = new javax.swing.JTextField();\n botonBuscar = new javax.swing.JButton();\n botonRegistrar = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n campoFecha = new com.toedter.calendar.JDateChooser();\n opcionPagoR = new javax.swing.JRadioButton();\n\n setBorder(javax.swing.BorderFactory.createTitledBorder(\"Registro Ventas Antiguas\"));\n\n jLabel1.setText(\"Nro Factura\");\n\n jLabel2.setText(\"Cliente\");\n\n jLabel3.setText(\"Valor Factura\");\n\n campoCliente.setEditable(false);\n\n botonBuscar.setText(\"Buscar\");\n botonBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonBuscarActionPerformed(evt);\n }\n });\n\n botonRegistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/Add.png\"))); // NOI18N\n botonRegistrar.setText(\"Registrar\");\n botonRegistrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonRegistrarActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Fecha Venta\");\n\n opcionPagoR.setText(\"Pagó\");\n opcionPagoR.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n opcionPagoRActionPerformed(evt);\n }\n });\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 .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(campoFecha, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(campoNroFactura, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(botonRegistrar))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(45, 45, 45))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(14, 14, 14)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(campoValor, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)\n .addComponent(campoCliente))\n .addGap(18, 18, 18)\n .addComponent(botonBuscar))\n .addComponent(opcionPagoR))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\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.TRAILING)\n .addComponent(jLabel5)\n .addComponent(campoFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(campoNroFactura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(campoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(botonBuscar))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(campoValor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(opcionPagoR)\n .addGap(18, 18, 18)\n .addComponent(botonRegistrar)\n .addContainerGap(229, Short.MAX_VALUE))\n );\n }", "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\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 los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public ArticulosAdd() {\n initComponents();\n Sistema.lblNotificacion.setText(\"Ingreso Artítuclos\");\n this.setLocationRelativeTo(null);\n\n Date date = new Date();\n\n dtDesde.setDate(date);\n dtHasta.setDate(date);\n\n articulos.searchArticulo(cboArticulos, \"\", 0, 1000, 0);\n }", "private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }", "public CatProveedores() {\n initComponents();\n cargartabla();\n }", "Compuesta createCompuesta();", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n envio = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n nombreEmpleado = new javax.swing.JTextField();\n jLabel19 = new javax.swing.JLabel();\n cedulaEmpleado = new javax.swing.JTextField();\n nombre1 = new javax.swing.JTextField();\n jPanel4 = new javax.swing.JPanel();\n jLabel5 = new javax.swing.JLabel();\n tipoBusquedaCliente = new javax.swing.JComboBox();\n txtIngresoDatoCliente = new javax.swing.JTextField();\n buscar = new javax.swing.JButton();\n newCliente = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n nombreCliente = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n cedulaCliente = new javax.swing.JTextField();\n jLabel17 = new javax.swing.JLabel();\n telefonoCliente = new javax.swing.JTextField();\n jLabel18 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n apellidoCliente = new javax.swing.JTextField();\n celularCliente = new javax.swing.JTextField();\n jPanel5 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtIngresoDatosPro = new javax.swing.JTextField();\n buscar1 = new javax.swing.JButton();\n tipoBusquedaProducto = new javax.swing.JComboBox();\n jLabel10 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n cantidadCompraPro = new javax.swing.JTextField();\n jLabel22 = new javax.swing.JLabel();\n nombrePro = new javax.swing.JTextField();\n jLabel23 = new javax.swing.JLabel();\n precioUnitarioPro = new javax.swing.JTextField();\n jLabel24 = new javax.swing.JLabel();\n ivaPro = new javax.swing.JTextField();\n jLabel25 = new javax.swing.JLabel();\n stockPro = new javax.swing.JTextField();\n jLabel26 = new javax.swing.JLabel();\n codBarrasPro = new javax.swing.JTextField();\n jLabel27 = new javax.swing.JLabel();\n pct_descuentoPro = new javax.swing.JTextField();\n jLabel28 = new javax.swing.JLabel();\n uniCompraPro = new javax.swing.JTextField();\n jLabel29 = new javax.swing.JLabel();\n uniVentaPro = new javax.swing.JTextField();\n jPanel6 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n tablaDetalles = new javax.swing.JTable();\n jPanel7 = new javax.swing.JPanel();\n btnQuitar = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n subtotalTotal = new javax.swing.JTextField();\n descuentoTotal = new javax.swing.JTextField();\n totalFac = new javax.swing.JTextField();\n jPanel9 = new javax.swing.JPanel();\n rbtnSi = new javax.swing.JRadioButton();\n jLabel14 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n direccionEnvio = new javax.swing.JButton();\n rtbnNo = new javax.swing.JRadioButton();\n jPanel8 = new javax.swing.JPanel();\n jLabel15 = new javax.swing.JLabel();\n txttotalPagar = new javax.swing.JTextField();\n btnRecetaMedica = new javax.swing.JButton();\n jPanel10 = new javax.swing.JPanel();\n jButton6 = new javax.swing.JButton();\n\n setClosable(true);\n setMaximizable(true);\n setResizable(true);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Datos de la Factura\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 0, 13), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jPanel3.setBackground(new java.awt.Color(255, 255, 255));\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Datos de Factura\"));\n\n jLabel2.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Número de Factura\");\n\n jTextField2.setEditable(false);\n jTextField2.setBackground(new java.awt.Color(255, 255, 255));\n jTextField2.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jTextField2.setForeground(new java.awt.Color(51, 51, 51));\n jTextField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n jTextField2.setEnabled(false);\n\n jLabel3.setBackground(new java.awt.Color(255, 255, 255));\n jLabel3.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Fecha de Venta\");\n\n jLabel7.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel7.setText(\"Nombre del Empleado: \");\n\n nombreEmpleado.setEditable(false);\n nombreEmpleado.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombreEmpleado.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombreEmpleado.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n nombreEmpleado.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nombreEmpleadoActionPerformed(evt);\n }\n });\n\n jLabel19.setBackground(new java.awt.Color(0, 102, 204));\n jLabel19.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel19.setText(\"Cedula del Empleado:\");\n\n cedulaEmpleado.setEditable(false);\n cedulaEmpleado.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n cedulaEmpleado.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cedulaEmpleado.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n nombre1.setEditable(false);\n nombre1.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombre1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombre1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n nombre1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nombre1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(37, 37, 37)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2)\n .addComponent(nombreEmpleado)\n .addComponent(cedulaEmpleado)\n .addComponent(nombre1))\n .addGap(18, 18, 18))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(nombre1, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nombreEmpleado, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cedulaEmpleado, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel4.setBackground(new java.awt.Color(255, 255, 255));\n jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Cliente\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jLabel5.setBackground(new java.awt.Color(255, 255, 255));\n jLabel5.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"Buscar por: \");\n\n tipoBusquedaCliente.setForeground(new java.awt.Color(0, 102, 204));\n tipoBusquedaCliente.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Cedula\", \"Nombre\" }));\n tipoBusquedaCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n tipoBusquedaCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tipoBusquedaClienteActionPerformed(evt);\n }\n });\n\n txtIngresoDatoCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n txtIngresoDatoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtIngresoDatoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n buscar.setBackground(new java.awt.Color(255, 255, 255));\n buscar.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n buscar.setForeground(new java.awt.Color(0, 102, 204));\n buscar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/lupa.png\"))); // NOI18N\n buscar.setText(\"Buscar\");\n buscar.setBorder(null);\n buscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buscarActionPerformed(evt);\n }\n });\n\n newCliente.setBackground(new java.awt.Color(255, 255, 255));\n newCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n newCliente.setForeground(new java.awt.Color(0, 102, 204));\n newCliente.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n newCliente.setText(\"¿Desea almacenar un nuevo cliente? click aqui\");\n newCliente.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n newCliente.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n newClienteMouseClicked(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Nombre: \");\n\n nombreCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombreCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombreCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n nombreCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nombreClienteActionPerformed(evt);\n }\n });\n\n jLabel16.setBackground(new java.awt.Color(0, 102, 204));\n jLabel16.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel16.setText(\"Cedula:\");\n\n cedulaCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n cedulaCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cedulaCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel17.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel17.setText(\" Telefono \");\n\n telefonoCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n telefonoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n telefonoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel18.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel18.setText(\"Apellido:\");\n\n jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel20.setText(\"Celular:\");\n\n apellidoCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n apellidoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n apellidoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n celularCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n celularCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n celularCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n celularCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n celularClienteActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tipoBusquedaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17)\n .addComponent(txtIngresoDatoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)\n .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(telefonoCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)\n .addComponent(cedulaCliente, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nombreCliente, javax.swing.GroupLayout.Alignment.LEADING))\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(newCliente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(109, 109, 109))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(buscar, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)\n .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(apellidoCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)\n .addComponent(celularCliente))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtIngresoDatoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tipoBusquedaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buscar))\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nombreCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addGap(0, 1, Short.MAX_VALUE)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(apellidoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cedulaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(celularCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(telefonoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(newCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanel5.setBackground(new java.awt.Color(255, 255, 255));\n jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Buscar Producto\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 0, 13), new java.awt.Color(102, 102, 102))); // NOI18N\n\n jLabel1.setBackground(new java.awt.Color(255, 255, 255));\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 0, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 51));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Buscar\");\n\n txtIngresoDatosPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n txtIngresoDatosPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtIngresoDatosPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n buscar1.setBackground(new java.awt.Color(255, 255, 255));\n buscar1.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n buscar1.setForeground(new java.awt.Color(0, 102, 204));\n buscar1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/lupa.png\"))); // NOI18N\n buscar1.setText(\"Buscar\");\n buscar1.setBorder(null);\n buscar1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buscar1ActionPerformed(evt);\n }\n });\n\n tipoBusquedaProducto.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n tipoBusquedaProducto.setForeground(new java.awt.Color(0, 102, 204));\n tipoBusquedaProducto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Codigo de Barras\", \"Nombre\" }));\n tipoBusquedaProducto.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));\n tipoBusquedaProducto.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tipoBusquedaProductoActionPerformed(evt);\n }\n });\n\n jLabel10.setBackground(new java.awt.Color(255, 255, 255));\n jLabel10.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(0, 102, 204));\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel10.setText(\"Ingresar Cantidad a Comprar\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jButton1.setForeground(new java.awt.Color(0, 102, 204));\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/compra.png\"))); // NOI18N\n jButton1.setText(\"Añadir\");\n jButton1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n cantidadCompraPro.setEditable(false);\n cantidadCompraPro.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n cantidadCompraPro.setForeground(new java.awt.Color(0, 102, 204));\n cantidadCompraPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cantidadCompraPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));\n\n jLabel22.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel22.setText(\"Nombre: \");\n\n nombrePro.setEditable(false);\n nombrePro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombrePro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombrePro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel23.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel23.setText(\"Código de Barras:\");\n\n precioUnitarioPro.setEditable(false);\n precioUnitarioPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n precioUnitarioPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n precioUnitarioPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel24.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel24.setText(\"IVA: \");\n\n ivaPro.setEditable(false);\n ivaPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n ivaPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ivaPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel25.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel25.setText(\"Stock:\");\n\n stockPro.setEditable(false);\n stockPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n stockPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n stockPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel26.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel26.setText(\"Precio Unitario:\");\n\n codBarrasPro.setEditable(false);\n codBarrasPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n codBarrasPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n codBarrasPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel27.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel27.setText(\"Porcentaje de Descuento\");\n\n pct_descuentoPro.setEditable(false);\n pct_descuentoPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n pct_descuentoPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n pct_descuentoPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n pct_descuentoPro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pct_descuentoProActionPerformed(evt);\n }\n });\n\n jLabel28.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel28.setText(\"Unidad de Compra\");\n\n uniCompraPro.setEditable(false);\n uniCompraPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n uniCompraPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n uniCompraPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel29.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel29.setText(\"Unidad de Venta\");\n\n uniVentaPro.setEditable(false);\n uniVentaPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n uniVentaPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n uniVentaPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel22, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nombrePro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniVentaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(7, 7, 7)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(ivaPro, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n .addComponent(precioUnitarioPro)\n .addComponent(stockPro))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(tipoBusquedaProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(txtIngresoDatosPro, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buscar1, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)))\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)\n .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(codBarrasPro)\n .addComponent(pct_descuentoPro)\n .addComponent(cantidadCompraPro, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))))\n .addGap(22, 22, 22))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(tipoBusquedaProducto, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(precioUnitarioPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nombrePro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(17, 17, 17)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ivaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(8, 8, 8)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(stockPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel29, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniVentaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtIngresoDatosPro, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buscar1)\n .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(codBarrasPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pct_descuentoPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cantidadCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n\n jPanel6.setBackground(new java.awt.Color(255, 255, 255));\n jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Detalle de la Factura\"));\n\n jScrollPane3.setBackground(new java.awt.Color(255, 255, 255));\n jScrollPane3.setBorder(null);\n\n tablaDetalles.setBackground(new java.awt.Color(0, 102, 204));\n tablaDetalles.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n tablaDetalles.setForeground(new java.awt.Color(255, 255, 255));\n tablaDetalles.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Cantidad\", \"Producto\", \"Precio Unitario\", \"Subtotal\", \"Descuento por Producto\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.String.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, true, true\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tablaDetalles.setRowHeight(25);\n tablaDetalles.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tablaDetallesMouseClicked(evt);\n }\n });\n jScrollPane3.setViewportView(tablaDetalles);\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 845, Short.MAX_VALUE)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 845, Short.MAX_VALUE))\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 25, Short.MAX_VALUE)))\n );\n\n jPanel7.setBackground(new java.awt.Color(255, 255, 255));\n jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Opciones\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n btnQuitar.setBackground(new java.awt.Color(255, 255, 255));\n btnQuitar.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n btnQuitar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/eliminar.png\"))); // NOI18N\n btnQuitar.setText(\"Quitar\");\n btnQuitar.setEnabled(false);\n btnQuitar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnQuitarActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Subtotal:\");\n\n jLabel12.setText(\"Descuento Total:\");\n\n jLabel13.setText(\"Total:\");\n\n subtotalTotal.setEditable(false);\n subtotalTotal.setBackground(new java.awt.Color(255, 255, 255));\n subtotalTotal.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n descuentoTotal.setEditable(false);\n descuentoTotal.setBackground(new java.awt.Color(255, 255, 255));\n descuentoTotal.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n totalFac.setEditable(false);\n totalFac.setBackground(new java.awt.Color(255, 255, 255));\n totalFac.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnQuitar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(subtotalTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(descuentoTotal)\n .addComponent(totalFac))))\n .addContainerGap())\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnQuitar, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(subtotalTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(descuentoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(totalFac, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n jPanel9.setBackground(new java.awt.Color(255, 255, 255));\n jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Envio\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 12), new java.awt.Color(51, 51, 51))); // NOI18N\n\n envio.add(rbtnSi);\n rbtnSi.setText(\"Si\");\n rbtnSi.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n rbtnSiMouseClicked(evt);\n }\n });\n\n jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/dinero.png\"))); // NOI18N\n jLabel14.setText(\"Precio de envio\");\n\n jTextField7.setEditable(false);\n jTextField7.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextField7.setText(\"$ 2.00\");\n\n direccionEnvio.setBackground(new java.awt.Color(255, 255, 255));\n direccionEnvio.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n direccionEnvio.setForeground(new java.awt.Color(0, 102, 204));\n direccionEnvio.setText(\"Añadir direccion de Envio del cliente\");\n direccionEnvio.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n direccionEnvio.setEnabled(false);\n direccionEnvio.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n direccionEnvioActionPerformed(evt);\n }\n });\n\n envio.add(rtbnNo);\n rtbnNo.setSelected(true);\n rtbnNo.setText(\"No\");\n rtbnNo.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n rtbnNoMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);\n jPanel9.setLayout(jPanel9Layout);\n jPanel9Layout.setHorizontalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(rbtnSi)\n .addComponent(rtbnNo))\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addGap(58, 58, 58)\n .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(direccionEnvio, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(14, 14, 14)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel9Layout.setVerticalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rbtnSi)\n .addComponent(jLabel14)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rtbnNo)\n .addComponent(direccionEnvio, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21))\n );\n\n jPanel8.setBackground(new java.awt.Color(255, 255, 255));\n jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Servicios\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jLabel15.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/cobro.png\"))); // NOI18N\n jLabel15.setText(\"Total a Pagar:\");\n\n txttotalPagar.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n txttotalPagar.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txttotalPagar.setEnabled(false);\n txttotalPagar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txttotalPagarActionPerformed(evt);\n }\n });\n\n btnRecetaMedica.setBackground(new java.awt.Color(255, 255, 255));\n btnRecetaMedica.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n btnRecetaMedica.setForeground(new java.awt.Color(0, 102, 204));\n btnRecetaMedica.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/receta.png\"))); // NOI18N\n btnRecetaMedica.setText(\"Agregar Receta Medica\");\n btnRecetaMedica.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRecetaMedicaActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(txttotalPagar)\n .addGap(23, 23, 23))\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addComponent(btnRecetaMedica, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txttotalPagar, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnRecetaMedica, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(21, 21, 21))\n );\n\n jPanel10.setBackground(new java.awt.Color(255, 255, 255));\n jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Generar Factura\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jButton6.setBackground(new java.awt.Color(255, 255, 255));\n jButton6.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jButton6.setForeground(new java.awt.Color(0, 102, 204));\n jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/impresora.png\"))); // NOI18N\n jButton6.setText(\"Imprimir Factura\");\n jButton6.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton6MouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);\n jPanel10.setLayout(jPanel10Layout);\n jPanel10Layout.setHorizontalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel10Layout.setVerticalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(23, 23, 23))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, 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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grupo = new javax.swing.ButtonGroup();\n jPanel2 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n txtTipo = new javax.swing.JTextField();\n txtDescricao = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n btnSalvar = new javax.swing.JButton();\n btnVoltar = new javax.swing.JButton();\n btnCancelar = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtLucro = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n txtEstoque = new javax.swing.JTextField();\n txtCusto = new javax.swing.JSpinner();\n txtVenda = new javax.swing.JSpinner();\n jPanel4 = new javax.swing.JPanel();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"PRODUTOS\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 18))); // NOI18N\n\n jLabel9.setText(\"Tipo:\");\n\n jLabel8.setText(\"Descrição:\");\n\n jLabel1.setText(\"Nome : \");\n\n txtNome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNomeActionPerformed(evt);\n }\n });\n\n btnSalvar.setText(\"Salvar\");\n btnSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalvarActionPerformed(evt);\n }\n });\n\n btnVoltar.setText(\"Voltar\");\n btnVoltar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnVoltarActionPerformed(evt);\n }\n });\n\n btnCancelar.setText(\"Cancelar\");\n btnCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelarActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel2.setText(\"Valor de Custo:\");\n\n jLabel3.setText(\"Lucro(%):\");\n\n jLabel4.setText(\"Valor de Venda:\");\n\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(\"ESTOQUE\"));\n\n txtEstoque.setEditable(false);\n txtEstoque.setFont(new java.awt.Font(\"Dialog\", 0, 36)); // NOI18N\n txtEstoque.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(txtEstoque, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtEstoque, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n txtCusto.setModel(new javax.swing.SpinnerNumberModel(0.0f, 0.0f, null, 1.0f));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtVenda))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtLucro, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCusto, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE))))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtCusto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtLucro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtVenda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20))\n );\n\n jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(\"FORNECEDOR\"));\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 508, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 69, Short.MAX_VALUE)\n );\n\n jRadioButton1.setText(\"jRadioButton1\");\n jRadioButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton1ActionPerformed(evt);\n }\n });\n\n jRadioButton2.setText(\"jRadioButton2\");\n jRadioButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 468, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtDescricao))\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(21, 21, 21)\n .addComponent(txtNome)))\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnSalvar)\n .addGap(18, 18, 18)\n .addComponent(btnVoltar)\n .addGap(18, 18, 18)\n .addComponent(btnCancelar)))\n .addContainerGap())\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(130, 130, 130)\n .addComponent(jRadioButton1)\n .addGap(38, 38, 38)\n .addComponent(jRadioButton2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnVoltar)\n .addComponent(btnCancelar)\n .addComponent(btnSalvar)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(16, 16, 16)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(txtDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txtTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "public PConductor() {\n initComponents();\n PNew();\n PGetConductor(TxtBusqueda.getText(), \"T\");\n \n }", "public void confirmerButtonHandler(ActionEvent actionEvent) throws Exception {\n if(tableOffres.getSelectionModel().getSelectedItem()!=null){\n Offre selectedOffre=new Offre();\n selectedOffre=(Offre)tableOffres.getSelectionModel().getSelectedItem();\n System.out.println(selectedOffre);\n if(selectedOffre.getDisponible().equals(\"non\")){\n showAlert(\"L'offre doit etre disponible !\");\n }else {\n //Now we navigate to the form page\n\n //Getting a reference to the primary stage\n\n Stage primaryStage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\n System.out.println(primaryStage);\n //Navigating by switching the scene\n //Loading the scene\n FXMLLoader loader = new FXMLLoader(\n getClass().getResource(\n \"FormScene.fxml\"\n ));\n //Hiding the stage temporarily to configurate the scene\n primaryStage.hide();\n primaryStage.setScene(new Scene(loader.load(), 800, 600));\n FormController formController = loader.<FormController>getController();\n System.out.println(formController);\n formController.initData(selectedOffre);\n // Here where the scene changes and the form screen shows\n primaryStage.show();\n }\n }else{\n showAlert(\"Offre non sélectionnée\");\n }\n }", "public FrmFerramentas() throws IOException {\n initComponents();\n SelecionaLocal();\n //PreencheLook();\n }" ]
[ "0.6726156", "0.6463482", "0.6369001", "0.6337812", "0.6332046", "0.62075067", "0.61693877", "0.61333364", "0.60946023", "0.60670674", "0.6055318", "0.605456", "0.60273826", "0.60204387", "0.596972", "0.5963486", "0.59619087", "0.5959247", "0.59579384", "0.59444237", "0.59317046", "0.59259486", "0.591447", "0.586733", "0.58653164", "0.58635217", "0.5862501", "0.5860262", "0.5844262", "0.5837511", "0.5834853", "0.5834395", "0.5826311", "0.58087695", "0.58050513", "0.5797454", "0.5790536", "0.5788293", "0.57690185", "0.5755304", "0.575392", "0.5750166", "0.5748864", "0.57357645", "0.57337886", "0.5728338", "0.5715359", "0.57066983", "0.57047534", "0.5703889", "0.57019305", "0.56913954", "0.56846786", "0.5682112", "0.5680222", "0.56688255", "0.5666676", "0.5665341", "0.566456", "0.5657911", "0.56575084", "0.56520236", "0.56392115", "0.56341964", "0.56260884", "0.56254506", "0.5625374", "0.56206846", "0.56135136", "0.56116295", "0.56076604", "0.56074905", "0.5606031", "0.56041384", "0.5602485", "0.5601549", "0.55993354", "0.5598622", "0.55986166", "0.559751", "0.5596448", "0.5594095", "0.55888003", "0.5584933", "0.55789936", "0.5575981", "0.5565267", "0.55611527", "0.55600774", "0.5559467", "0.55581784", "0.5557075", "0.5555239", "0.5554714", "0.55518854", "0.5550643", "0.5547929", "0.55460054", "0.5544251", "0.5542215" ]
0.62884825
5
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() { jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); etiqueta1 = new abstractt.Etiqueta(); btn_aceptar = new abstractt.Boton(); btn_nueva = new abstractt.Boton(); ranchoSelector1 = new domain.RanchoSelector(); plecaAdministrarFinca1 = new abstractt.PlecaAdministrarFinca(); fondo1 = new abstractt.fondo(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Seleccion de Rancho / Finca"); addComponentListener(new java.awt.event.ComponentAdapter() { public void componentResized(java.awt.event.ComponentEvent evt) { formComponentResized(evt); } }); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); jPanel1.setBackground(new java.awt.Color(238, 217, 170)); jPanel1.setLayout(null); jPanel2.setBackground(new java.awt.Color(255, 255, 255)); jPanel2.setLayout(null); etiqueta1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); etiqueta1.setText("Seleccionar Finca:"); etiqueta1.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N jPanel2.add(etiqueta1); etiqueta1.setBounds(0, 45, 280, 20); btn_aceptar.setText("Aceptar"); btn_aceptar.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N btn_aceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_aceptarActionPerformed(evt); } }); jPanel2.add(btn_aceptar); btn_aceptar.setBounds(150, 105, 150, 30); btn_nueva.setText("Nueva Finca"); btn_nueva.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N btn_nueva.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_nuevaActionPerformed(evt); } }); jPanel2.add(btn_nueva); btn_nueva.setBounds(350, 105, 150, 30); ranchoSelector1.setFont(new java.awt.Font("Trebuchet MS", 0, 12)); // NOI18N ranchoSelector1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ranchoSelector1ActionPerformed(evt); } }); jPanel2.add(ranchoSelector1); ranchoSelector1.setBounds(300, 40, 200, 30); jPanel1.add(jPanel2); jPanel2.setBounds(30, 270, 600, 180); jPanel1.add(plecaAdministrarFinca1); plecaAdministrarFinca1.setBounds(0, 0, 1234, 79); fondo1.setText("fondo1"); jPanel1.add(fondo1); fondo1.setBounds(0, 90, 210, 110); getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); 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 Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "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 FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\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 Choose1() {\n initComponents();\n }", "public IssueBookForm() {\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 hitungan() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public CovidGUI(){\n initComponents();\n }" ]
[ "0.73174816", "0.72889656", "0.72889656", "0.72889656", "0.72851485", "0.72464716", "0.72125894", "0.7207057", "0.7193868", "0.71885675", "0.7182908", "0.7157434", "0.71464336", "0.70908433", "0.70803434", "0.7056725", "0.6985344", "0.69753206", "0.6953884", "0.6953616", "0.694404", "0.69428164", "0.6935139", "0.6929781", "0.6928281", "0.69244665", "0.69242036", "0.6910382", "0.6910154", "0.6892775", "0.68911135", "0.6890633", "0.6890419", "0.6887714", "0.6882435", "0.6882035", "0.6879555", "0.6878037", "0.6875304", "0.6873584", "0.6870017", "0.6857944", "0.6855121", "0.68550736", "0.68538415", "0.6852628", "0.685232", "0.68514365", "0.68514365", "0.6843435", "0.68357044", "0.683545", "0.68286043", "0.6827145", "0.68267477", "0.68234277", "0.68225", "0.6816672", "0.68162423", "0.68102705", "0.6808146", "0.6807802", "0.68071634", "0.6807011", "0.68007326", "0.67936707", "0.679231", "0.6791757", "0.67912704", "0.67891645", "0.6787224", "0.67871845", "0.6780521", "0.6765789", "0.67653185", "0.67637426", "0.67567444", "0.67557055", "0.67519027", "0.67508966", "0.674121", "0.67392266", "0.67360723", "0.67352736", "0.67330796", "0.67252725", "0.6724563", "0.6720016", "0.6715605", "0.6714573", "0.67141414", "0.6708195", "0.6707061", "0.670339", "0.6700952", "0.6699862", "0.6698556", "0.6698387", "0.66947114", "0.6689425", "0.66889143" ]
0.0
-1
Lance la simulation rapide
public void quickSimulation() { new SimulationControleur(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int simulate();", "@Override\r\n\tpublic void simulate() {\n\t\t\r\n\t}", "public abstract void simulate();", "public void nourrir() {\n if (!autoriseOperation()) {\n return;\n }\n\n incrFaim(-2);\n incrPoids(1);\n incrHumeur(1);\n incrXp(1);\n\n System.out.println(tamagoStats.getXp());\n setChanged();\n notifyObservers();\n\n }", "@Override\n public void simulationPeriodic() {\n }", "@Override\n public void simulationPeriodic() {\n }", "public void advanceSimulation () {\n\t\tstep_++;\n\t}", "@Override\r\n public void runSimulation(){\r\n initialize();\r\n initialRun();\r\n initialize(\"square\");\r\n initialRun();\r\n initialize(\"circle\");\r\n initialRun();\r\n initialize(\"crack\");\r\n initialRun(); \r\n initialize(\"cross\");\r\n initialRun();\r\n }", "SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }", "public void startSimulation();", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void run() {\n PopulationFGA<Integer> poblacionActual = new PopulationFGA<>(funcionBorn,\n funcionFitness,\n problema.getDimension(),\n 1);\n poblacionActual.incializa(200);\n while(!condTerminacion.conditionReached(poblacionActual)) {\n System.out.println(\"Generacion Actual: \" + poblacionActual.getGeneracion());\n poblacionActual = iteration(poblacionActual);\n }\n ArrayList<IndividualFGA<Integer>> individuos = poblacionActual.generaIndividuos();\n IndividualFGA<Integer> mejor = individuos.get(0);\n for (IndividualFGA<Integer> e : individuos) {\n if (mejor.getFitness() <= e.getFitness())\n mejor = e;\n }\n System.out.println(\"Mejor solucion \" + '\\n' + mejor.toString());\n //System.out.println(\"Fitness \" + mejor.getFitness());\n int dim = problema.getDimension();\n int costo = 0;\n int obj1;\n int obj2;\n Phenotype<Integer> fenotipo = mejor.getRepActual();\n for (int i = 0; i < (dim - 1); i++) {\n obj1 = fenotipo.getAllele(i).intValue() - 1;\n for (int j = i + 1; j < dim; j++) {\n obj2 =fenotipo.getAllele(j).intValue() - 1; \n costo = costo + problema.getDistanciaEntre(i,j) * problema.getFlujoEntre(obj1,obj2);\n }\n }\n System.out.println(\"Costo de la solucion: \" + costo);\n\n }", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "public static void main(String[] args) {\n System.out.println(\"Test de la partie 1:\");\n System.out.println(\"--------------------\");\n\n Position position1 = new Position(0, 1);\n Position position2 = new Position(1, 0);\n Position position3 = new Position(1, 1);\n\n Neurone neuron1 = new Neurone(position1, 0.5);\n Neurone neuron2 = new Neurone(position2, 1.0);\n Neurone neuron3 = new Neurone(position3, 2.0);\n\n neuron1.connexion(neuron2);\n neuron2.connexion(neuron3);\n neuron1.recoitStimulus(10);\n\n System.out.println(\"Signaux : \");\n System.out.println(neuron1.getSignal());\n System.out.println(neuron2.getSignal());\n System.out.println(neuron3.getSignal());\n\n System.out.println();\n System.out.println(\"Premiere connexion du neurone 1\");\n System.out.println(neuron1.getConnexion(0));\n\n\n // FIN TEST DE LA PARTIE 1\n\n // TEST DE LA PARTIE 2\n System.out.println(\"Test de la partie 2:\");\n System.out.println(\"--------------------\");\n\n Position position5 = new Position(0, 0);\n NeuroneCumulatif neuron5 = new NeuroneCumulatif(position5, 0.5);\n neuron5.recoitStimulus(10);\n neuron5.recoitStimulus(10);\n System.out.println(\"Signal du neurone cumulatif -> \" + neuron5.getSignal());\n\n // FIN TEST DE LA PARTIE 2\n\n // TEST DE LA PARTIE 3\n System.out.println();\n System.out.println(\"Test de la partie 3:\");\n System.out.println(\"--------------------\");\n Cerveau cerveau = new Cerveau();\n\n // parametres de construction du neurone:\n // la position et le facteur d'attenuation\n cerveau.ajouterNeurone(new Position(0,0), 0.5);\n cerveau.ajouterNeurone(new Position(0,1), 0.2);\n cerveau.ajouterNeurone(new Position(1,0), 1.0);\n\n // parametres de construction du neurone cumulatif:\n // la position et le facteur d'attenuation\n cerveau.ajouterNeuroneCumulatif(new Position(1,1), 0.8);\n cerveau.creerConnexions();\n cerveau.stimuler(0, 10);\n\n System.out.println(\"Signal du 3eme neurone -> \" + cerveau.sonder(3));\n System.out.println(cerveau);\n // FIN TEST DE LA PARTIE 3\n }", "SimulationRun() {\n firms = new ArrayList<>();\n }", "public void resolution() {\n\t\tLigneProposition essai = new LigneProposition(p.getNbTrou());\n\t\t\n\t\tfor(int i = 0; i < p.getNbTrou(); i++) {\n\t\t\tessai.setAt(i, 1 + (int)(Math.random() * ((p.getNbCouleur() -1))));\n\t\t}\n\t\t\n\t\tp.ajouterEssai(essai);\n\t}", "public void splMatriksBalikan() {\n Matriks MKoef = this.Koefisien();\n Matriks MKons = this.Konstanta();\n\n if(!MKoef.IsPersegi()) {\n System.out.println(\"Matriks koefisien bukan matriks persegi, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\");\n this.Solusi = \"Matriks koefisien bukan matriks persegi, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\";\n } else {\n float det = MKoef.DeterminanKofaktor();\n if (det == 0) {\n System.out.println(\"Determinan matriks koefisien bernilai 0, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\");\n this.Solusi = \"Determinan matriks koefisien bernilai 0, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\";\n } else {\n Matriks MBalikan = MKoef.BuatMatriksBalikan();\n Matriks MHsl = MBalikan.KaliMatriks(MKons);\n\n for (int i = 0; i < MHsl.NBrsEff; i++) {\n System.out.println(\"x\" + (i+1) + \" = \" + MHsl.M[i][0]);\n this.Solusi += \"x\" + (i+1) + \" = \" + MHsl.M[i][0] + \"\\n\";\n }\n }\n }\n }", "private Boolean simulationTerminee() {\n if (Evenements.size() != 0) \n return false;\n else\n return true;\n }", "public static void main(String[] args) {\n double time=100000;\n lambda=0.012;\n m0=40;\n m1=43;\n m2=85;\n t1=32;\n p1=0.35;\n t2=40;\n p2=0.4;\n t3=65;\n p3=0.25;\n K=10;\n p01=0.8;\n p02=0.2;\n pout=0.5;\n p31=0.3;\n p32=0.2;\n \n simulate(time);\n }", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "public void solveSA() {\r\n initState();\r\n for (int ab = 0; ab < Config.NumberOfMetropolisResets; ab++) {\r\n LogTool.print(\"==================== INACTIVE: START CALC FOR OUTER ROUND \" + ab + \"=========================\",\"notification\");\r\n\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\");\r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n setCur_cost(costCURsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"CUR COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n /* [Newstate] with random dwelltimes */\r\n New_state = newstater(); \r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW STATE \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n// newstater();\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New State before Metropolis: A)\" + New_state[0] + \" B) \" + New_state[1] + \" C) \" + New_state[2],\"notification\");\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New Cost : \" + New_cost,\"notification\");\r\n }\r\n\r\n /**\r\n * MetropolisLoop\r\n * @param Config.NumberOfMetropolisRounds\r\n */\r\n\r\n for(int x=0;x<Config.NumberOfMetropolisRounds;x++) { \r\n LogTool.print(\"SolveSA Iteration \" + x + \" Curcost \" + Cur_cost + \" Newcost \" + New_cost,\"notification\");\r\n if ((Cur_cost - New_cost)>0) { // ? die Kosten\r\n \r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 START\",\"notification\");\r\n }\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA Cost delta \" + (Cur_cost - New_cost) + \" \",\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C1 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 STOP \",\"notification\");\r\n }\r\n } else if (Math.exp(-(New_cost - Cur_cost)/temperature)> RandGenerator.randDouble(0.01, 0.99)) {\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 START: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 before set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 STOP: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n } else {\r\n New_state = newstater();\r\n }\r\n temperature = temperature-1;\r\n if (temperature==0) {\r\n break;\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal());\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n//</editor-fold>\r\n if ((x==58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n if ((Cur_cost - New_cost)>0) {\r\n Cur_state = New_state;\r\n Cur_cost = New_cost; \r\n }\r\n }\r\n if ((x>58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n }\r\n }\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Auskommentierter GLowestState Object Class\">\r\n// if (ab==9) {\r\n// double diff=0;\r\n// }\r\n \r\n // Hier wird kontrolliert, ob das minimalergebnis des aktuellen\r\n // Metropolisloops kleiner ist als das bsiher kleinste\r\n \r\n// if (Cur_cost<Global_lowest_cost) {\r\n// this.setGlobal_lowest_cost(Cur_cost);\r\n// GlobalState GLowestState = new GlobalState(this.Cur_state);\r\n// String rGLSOvalue = GLowestState.getGlobal_Lowest_state_string();\r\n// LogTool.print(\"GLS DEDICATED OBJECT STATE OUTPUT -- \" + GLowestState.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(GLowestState.getDwelltimes());\r\n // LogTool.print(\"READ FROM OBJECT OUTPUT -- \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// LogTool.print(\"DEBUG: CurCost direct : \" + this.getCur_cost(),\"notification\"); \r\n// LogTool.print(\"Debug: Cur<global CurState get : \" + this.getCur_state_string(),\"notification\");\r\n// LogTool.print(\"Debug: Cur<global GLS get : \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(this.getCur_state(Cur_state));\r\n// LogTool.print(\"Debug: Cur<global GLS get after set : \" + this.getGlobal_Lowest_state_string(),\"notification\"); \r\n// }\r\n //</editor-fold>\r\n LogTool.print(\"SolveSA: Outer Iteration : \" + ab,\"notification\");\r\n LogTool.print(\"SolveSA: Last Calculated New State/Possible state inner loop (i.e. 99) : \" + this.getNew_state_string(),\"notification\");\r\n// LogTool.print(\"SolveSA: Best Solution : \" + this.getCur_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: GLS after all loops: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: LastNewCost, unchecked : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: CurCost : \" + this.getCur_cost() + \"i.e. lowest State of this round\",\"notification\"); \r\n }\r\n // return GLowestState;\r\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }", "public void daiGioco() {\n System.out.println(\"Scrivere 1 per giocare al PC, al costo di 200 Tam\\nSeleziona 2 per a Calcio, al costo di 100 Tam\\nSeleziona 3 per Disegnare, al costo di 50 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiFelicita += 60;\n puntiVita -= 30;\n soldiTam -= 200;\n }\n case 2 -> {\n puntiFelicita += 40;\n puntiVita -= 20;\n soldiTam -= 100;\n }\n case 3 -> {\n puntiFelicita += 30;\n puntiVita -= 10;\n soldiTam -= 50;\n }\n }\n checkStato();\n }", "public void imprimirResultados(){\n System.out.println(\"t (tiempo actual) \"+t);\n \n \n System.out.println(\"\\nGanancia total: $\"+R);\n System.out.println(\"Costos por mercaderia comprada: $\"+C);\n System.out.println(\"Costos por mantenimiento inventario: $\"+H);\n System.out.println(\"Ganancia promeio de la tienda por unidad de tiempo: $\"+(R-C-H)/T);\n \n }", "public void finishSimulation() {\n finishSimulation(0.0);\n }", "public void endSimulation() {\n System.out.println(\"[SIMULATOR] simulazione completata\");\n\n /*\n * Salvo gli stati dei batteri ancora in vita\n */\n Vector<Status> result = new Vector<>();\n for (String nome : nomiBatteri) {\n if (stati.get(nome) == null) {\n Status stato = new Status(nome, false, numeroBatteri.get(nome));\n result.add(stato);\n }\n }\n\n /*\n * Salvo gli stati dei batteri estinti\n */\n Iterator it = stati.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n result.add((Status) pair.getValue());\n it.remove();\n }\n\n /*\n * Li ordino secondo il criterio stabilito in {@link StatusComparator}\n */\n Collections.sort(result, new StatusComparator());\n try {\n // Cerco di inviare il risultato al server\n ResultSender sender = new ResultSender(pushUrl + \"/utils/saveMatch.php\");\n String serverMessage = sender.send(result);\n\n System.out.println(String.format(\"Server replied with: %s\", serverMessage));\n } catch (IOException e) {\n System.err.println(\"Non e' stato possibile comunicare il risultato\");\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "@Override\n public void tirar() {\n if ( this.probabilidad == null ) {\n super.tirar();\n this.valorTrucado = super.getValor();\n return;\n }\n \n // Necesitamos conocer la probabilidad de cada número, trucados o no, para ello tengo que saber\n // primero cuantos números hay trucados y la suma de sus probabilidades. \n // Con esto puedo calcular la probabilidad de aparición de los números no trucados.\n \n int numeroTrucados = 0;\n double sumaProbalidadesTrucadas = 0;\n double probabilidadNoTrucados = 0;\n \n for ( double p: this.probabilidad ) { // cálculo de la suma números y probabilidades trucadas\n if ( p >= 0 ) {\n numeroTrucados++;\n sumaProbalidadesTrucadas += p;\n }\n }\n \n if ( numeroTrucados < 6 ) { // por si estuvieran todos trucados\n probabilidadNoTrucados = (1-sumaProbalidadesTrucadas) / (6-numeroTrucados);\n }\n\n double aleatorio = Math.random(); // me servirá para escoger el valor del dado\n \n // Me quedo con la cara del dado cuya probabilidad de aparición, sumada a las anteriores, \n // supere el valor aleatorio\n double sumaProbabilidades = 0;\n this.valorTrucado = 0;\n do {\n ++this.valorTrucado;\n if (this.probabilidad[this.valorTrucado-1] < 0) { // no es una cara del dado trucada\n sumaProbabilidades += probabilidadNoTrucados;\n } else {\n sumaProbabilidades += this.probabilidad[this.valorTrucado-1];\n }\n \n } while (sumaProbabilidades < aleatorio && valorTrucado < 6);\n \n \n }", "public static void main(String[] args) {\n\r\n\t\tScanner tastatura = new Scanner(System.in);\r\n\t\tint pismo = 0;\r\n\t\tint brojBacanja = 0;\r\n\t\tint ishodBacanja = 0;\r\n\t\tint brojPisma = 0;\r\n\t\tint brojGlava = 0;\r\n//\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja;\r\n//\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t//ne moze ovde\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.print(\"Koliko puta zelite da bacite novcic: \");\r\n\t\t\tbrojBacanja = tastatura.nextInt();\r\n\t\t\t\r\n\t\t\tif(brojBacanja == 0) break; \r\n\t\t\t\tbrojPisma = 0;\r\n\t\t\t\tbrojGlava = 0;\r\n\t\t\r\n\t\t\tfor (int i = 0; i<brojBacanja; i++) {\r\n\t\t\t\tishodBacanja = (int) (Math.random() + 0.5);\r\n\t\t\t\tif(ishodBacanja == pismo)\r\n\t\t\t\t\tbrojPisma++; \r\n\t\t\t\t\t//++ znaci ako je u zagradi tacno izvrsava se to nesti++\r\n\t\t\t\telse \r\n\t\t\t\t\tbrojGlava++;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja; //obavezno 2x double\r\n\t\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Kolicnik za pisma: \" + kolicnkZaPismo);\r\n\t\t\tSystem.out.println(\"Kolicnik za glavu: \" + kolicnikZaGlavu);\r\n\t\t\tSystem.out.println(\"Pismo je palo \" + brojPisma +\" puta\");\r\n\t\t\tSystem.out.println(\"Glava je pala \" + brojGlava + \" puta\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"***Za izlaz ukucajte 0 ***\");\r\n\t\t\t\r\n// u zadatku\t\t\t\r\n//\t\t\tSystem.out.print(\"Broj pisma Broj glava\");\r\n//\t\t\tSystem.out.print(\" Broj pisma / Broj bacanja\");\r\n//\t\t\tSystem.out.println(\" Broj glava / Broj bacanja\");\r\n//\t\t\t\r\n//\t\t\tSystem.out.printf(\"%8d %12d %17.2f %25.2f\\n \" , \r\n//\t\t\t\t\tbrojPisma, brojGlava,\r\n//\t\t\t\t\t(double) brojPisma / brojBacanja,\r\n//\t\t\t\t\t(double) brojGlava / brojBacanja);\r\n\t\t}\r\n\t}", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(500, 800);\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "public boolean Simbolo(){\n return (Mayuscula() || Minuscula());\n\n }", "public void niveauSuivant() {\n niveau = niveau.suivant();\n }", "public void step() {\n // method 1 of Temperature randomness\n enPrice = 1.1 * enPrice;\n\n TempChange = Temperature * (0.1 * (1 - 2 * r.nextDouble()));\n // method 2 of Temperature\n// TempChange = temperature_list.get(count);\n// count+=1;\n\n Temperature += TempChange;\n year_num+=1;\n }", "public void endOfSimulation()\n\t{\n\t\trynekHistory.createFirstPriceVSFinalPriceReport();\n\t}", "public void novice() {\n\t\tGenerator solve = new Generator();\n\t\tsolve.novice();\n\t\tAnswer = solve.getEquationResult();\n\t\tTextView Equation = (TextView) findViewById(R.id.textView3);\n\t\tEquation.setText(solve.getEquation());\n\t}", "public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE())\r\n\t\t\t);\r\n\t\telse if(randomizzatoreVariazione < 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione()\r\n\t\t\t\t\t- andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE() * randomizzatoreVariazione)\r\n\t\t\t);\r\n\t}", "public static void simulate (\r\n double maxtime,\r\n double arrival_rate,\r\n double service_rate0,\r\n double service_rate1,\r\n double service_rate2, \r\n double service_rate3_1,\r\n double service_rate3_2,\r\n double service_rate3_3,\r\n double p1,double p2,double p3,int k, double p01, double p02, double p3out, double p31, double p32)\r\n {\n StateB sysB = new StateB();\r\n \r\n double time= 0;\r\n double value2= ExpB.getExp(arrival_rate);\r\n\r\n EventB e1 = new EventB(time+value2,\"Birth\",\"Null\");\r\n EventB e2= new EventB(time+value2,\"Moniter\",\"Null\");\r\n Schedule.add(e1);\r\n Schedule.add(e2);\r\n \r\n while(time < maxtime){\r\n EventB next = Schedule.remove();\r\n time= next.time;\r\n next.function(maxtime,arrival_rate,service_rate0,service_rate1,service_rate2, service_rate3_1,\r\n service_rate3_2,service_rate3_3,p1,p2,p3,k,p01,p02,p3out,p31,p32,sysB);\r\n \r\n \r\n \r\n\r\n }\r\n // System.out.println(Double.toString(sysB.t_busy_time0) );\r\n // System.out.println(Double.toString(sysB.t_busy_time1) );\r\n // System.out.println(Double.toString(sysB.Qlength0) );\r\n // System.out.println(Double.toString(sysB.Qlength1) );\r\n // System.out.println(Double.toString(sysB.monitering_event) );\r\n // System.out.println(Double.toString(sysB.num_drop) );\r\n // System.out.println(Double.toString(sysB.completed_request) );\r\n // System.out.println(Double.toString(sysB.t_response_time) );\r\n\r\n System.out.println();\r\n double util0 = sysB.t_busy_time0 / maxtime;\r\n System.out.println(\"S0 UTIL:\"+ \" \" + Double.toString(util0) );\r\n double qlen0 = sysB.Qlength0/ sysB.monitering_event;\r\n System.out.println(\"S0 QLEN:\"+\" \"+ Double.toString(qlen0) );\r\n double Tresp0 = sysB.t_response_time0/sysB.completed_request0;\r\n System.out.println(\"S0 TRESP:\" + \" \"+ Double.toString(Tresp0) );\r\n \r\n System.out.println();\r\n \r\n double util11 = sysB.t_busy_time11/ maxtime;\r\n System.out.println(\"S1,1 UTIL:\"+ \" \" + Double.toString(util11) );\r\n double util12 = sysB.t_busy_time12/ maxtime;\r\n System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n double qlen11 = sysB.Qlength1/ sysB.monitering_event;\r\n System.out.println(\"S1 QLEN:\"+\" \"+ Double.toString(qlen11) );\r\n double Tresp11 = sysB.t_response_time1/ sysB.completed_request1;\r\n System.out.println(\"S1 TRESP:\" + \" \"+ Double.toString(Tresp11) );\r\n \r\n \r\n // System.out.println();\r\n // double util12 = sysB.t_busy_time12/ maxtime;\r\n // System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n // double qlen12 = sysB.Qlength1/ sysB.monitering_event;\r\n // System.out.println(\"S1,2 QLEN:\"+\" \"+ Double.toString(qlen12) );\r\n // double Tresp12 = sysB.t_response_time12/sysB.completed_request12;\r\n // System.out.println(\"S1,2 TRESP:\" + \" \"+ Double.toString(Tresp12) );\r\n\r\n System.out.println();\r\n double util2 = sysB.t_busy_time2/ maxtime;\r\n System.out.println(\"S2 UTIL:\"+ \" \" + Double.toString(util2) );\r\n double qlen2 = sysB.Qlength2/ sysB.monitering_event;\r\n System.out.println(\"S2 QLEN:\"+\" \"+ Double.toString(qlen2) );\r\n double Tresp2 = sysB.t_response_time2/sysB.completed_request2;\r\n System.out.println(\"S2 TRESP:\" + \" \"+ Double.toString(Tresp2) );\r\n System.out.println(\"S2 DROPPED:\" + \" \"+ Integer.toString(sysB.num_drop));\r\n\r\n System.out.println();\r\n double util3 = sysB.t_busy_time3/ maxtime;\r\n System.out.println(\"S3 UTIL:\"+ \" \" + Double.toString(util3) );\r\n double qlen3 = sysB.Qlength3/ sysB.monitering_event;\r\n System.out.println(\"S3 QLEN:\"+\" \"+ Double.toString(qlen3) );\r\n double Tresp3 = sysB.t_response_time3/sysB.completed_request3;\r\n System.out.println(\"S3 TRESP:\" + \" \"+ Double.toString(Tresp3) );\r\n\r\n \r\n\r\n System.out.println();\r\n\r\n double qtotal = (sysB.Qlength0 + sysB.Qlength1 + sysB.Qlength2+sysB.Qlength3) / sysB.monitering_event;\r\n System.out.println(\"QTOT:\"+\" \"+ Double.toString(qtotal) );\r\n // double Totalresp= sysB.t_response_time0 + sysB.t_response_time2 +sysB.t_response_time11 +sysB.t_response_time12 + sysB.t_response_time3;\r\n \r\n double total = sysB.t_response_timefinal/sysB.completed_system;\r\n \r\n System.out.println(\"TRESP:\"+ \" \" + Double.toString(total));\r\n // System.out.println(sysB.Qlength1);\r\n // System.out.println(sysB.Qlength2);\r\n // System.out.println(sysB.Qlength3);\r\n // System.out.println(sysB.Qlength0);\r\n \r\n // System.out.println(\"TRESP:\"+ \" \" + Double.toString(TTRESP));\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n }", "public static void main(String[] args) {\n\t\tint choix = 3;\n\t\t\n\t\t//On cree un simulateur\n\t\tGUISimulator window;\n\t\t\n\t\t//On cree un simulateur d'automate qui sera initialise selon son type\n\t\tAutomateSimulator autoSimu;\n\t\t\n\t\t//On cree un gestionnaire manager\n\t\tEventManager manager = new EventManager();\n\t\t\n\t\tswitch (choix) {\n\t\tcase 1:\n\t\t\t//Test sur Conway\n\t\t\twindow = new GUISimulator(500, 500, Color.WHITE);\n\t\t\tint [][] grille1= {\n\t\t\t\t\t{0,0,0,0,0},\n\t\t\t\t\t{0,1,1,0,0},\n\t\t\t\t\t{0,1,0,0,0},\n\t\t\t\t\t{0,0,1,0,0},\n\t\t\t\t\t{0,0,0,0,1}\n\t\t\t};\n\t\t\tAutomate auto1 = new Conway(grille1);\n\t\t\t\n\t\t\t//Creation d'un premier evenement pour demarrer la recursivite\n\t\t\tmanager.addEvent(new AutomateSimulatorEvent(1, auto1));\n\n\t\t\tautoSimu = new ConwaySimulator(window, auto1, manager);\n\t\t\tbreak;\n\t\tcase 2: \n\t\t\t//Test sur Immigration\n\t\t\twindow = new GUISimulator(500, 500, Color.WHITE);\n\t\t\tint [][] grille2= {\n\t\t\t\t\t{0,2,2},\n\t\t\t\t\t{0,1,1},\n\t\t\t\t\t{3,1,0}\n\t\t\t};\n\n\t\t\tAutomate auto2 = new Immigration(grille2, 4);\n\t\t\t\n\t\t\t//Creation d'un premier evenement pour demarrer la recursivite\n\t\t\tmanager.addEvent(new AutomateSimulatorEvent(1, auto2));\n\n\t\t\tautoSimu = new ImmigrationSimulator(window, auto2, manager);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t//Test sur Schelling\n\t\t\twindow = new GUISimulator(500, 500, Color.WHITE);\n\t\t\t//Les cases a 0 representent les maisons vides (pas une couleur)\n\t\t\tint [][] grille3= {\n\t\t\t\t\t{0,2,0,2,0,2,3,1,0,2,1,1,2},\n\t\t\t\t\t{0,1,2,1,3,1,2,3,3,0,3,0,0},\n\t\t\t\t\t{2,1,1,3,2,3,0,1,2,1,3,2,1},\n\t\t\t\t\t{1,1,2,2,2,3,0,1,2,1,1,0,3},\n\t\t\t\t\t{0,2,0,2,0,2,3,1,0,2,1,1,2},\n\t\t\t\t\t{3,3,2,1,3,1,0,1,2,3,1,1,1},\n\t\t\t\t\t{2,1,0,1,2,1,3,1,2,3,2,2,3},\t\t\t\t\n\t\t\t\t\t{0,2,0,2,0,2,3,1,0,2,1,1,2},\n\t\t\t\t\t{2,1,3,1,2,1,0,1,2,3,2,2,3},\n\t\t\t\t\t{3,1,0,2,2,1,0,1,3,3,2,2,1},\n\t\t\t\t\t{2,1,0,1,3,1,0,1,2,3,3,2,2}\n\t\t\t};\n\n\t\t\tAutomate auto3 = new Schelling(grille3, 3, 3);\n\t\t\t\n\t\t\t//Creation d'un premier evenement pour demarrer la recursivite\n\t\t\tmanager.addEvent(new AutomateSimulatorEvent(1, auto3));\n\n\t\t\tautoSimu = new SchellingSimulator(window, auto3, manager);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Lancement de la simulation\n\t\twindow.setSimulable(autoSimu);\n\t}", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "public CrapsSimulation() {\n\t\tthis.crapsMetricsMonitor = new CrapsMetricsMonitor();\n\t\tthis.crapsGame = new CrapsGame(this.crapsMetricsMonitor);\n\t\tthis.name = \" \";\n\t\tthis.balance = 0;\n\t\tthis.bet = 0;\n\t\tthis.currentWinStreak = 0;\n\t\tthis.currentLoseStreak = 0;\n\t\tthis.s = new Scanner(System.in);\n\t}", "public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }", "public CarWashSimulation ()\n {\n bay = new Bay(CarWashApplication.BAY_TIME);\n waitingLine = new LLQueue<Car>();\n randGen = new Random();\n reset();\n }", "public abstract String simulate(double inputFlow);", "public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }", "@Override\n public void setExperiencia(){\n experiencia1=Math.random()*50*nivel;\n experiencia=experiencia+experiencia1;\n subida();\n }", "public void rodaAleatorio()\r\n {\r\n // Carrega os dados\r\n String ArqBD = \"Dados/Base\" + NUM_DB + \"/DADOS\" + NUM_PROV + \"x\" + NUM_PIS + \".txt\";\r\n String ArqReq = \"Requisicoes/Base\" + NUM_DB + \"/REQ\" + NUM_REQ + \"_\" + NUM_PIS + \".txt\";\r\n AvaliaFitness af = new AvaliaFitness(ArqBD, ArqReq);\r\n //af.imprime();\r\n \r\n // Variaveis\r\n int i, numIt, NUM_VARS = af.getBase_dados().getNumProvedores();\r\n long tempoInicial, tempoFinal;\r\n IndividuoBin atual;\r\n IndividuoBin melhor; \r\n IndividuoBin[] eleitos = new IndividuoBin[MAX_EXECUCOES]; \r\n double[] tempoExecusao = new double[MAX_EXECUCOES];\r\n \r\n System.out.println(\"# # # # # Algoritmo de Busca Aleatoria # # # # #\\n\"); \r\n //System.out.println(\"Espaço de busca: \" + (long)(Math.pow(2, NUM_VARS) - 1));\r\n System.out.println(\"NumProv: \" + NUM_PROV + \"\\nNumReq: \" + NUM_REQ + \"\\nNumPIs: \" + NUM_PIS + \"\\nNumDB: \" + NUM_DB);\r\n \r\n // Inicia as execuções\r\n int execucao = 1;\r\n // LOOP DE EXECUÇÕES\r\n while(execucao <= MAX_EXECUCOES)\r\n {\r\n numIt = 0; \r\n melhor = new IndividuoBin(NUM_VARS);\r\n // Inicia o cronômetro\r\n tempoInicial = System.currentTimeMillis(); \r\n // LOOP DE ITERAÇÕES\r\n while(numIt < MAX_ITERACOES)\r\n {\r\n atual = new IndividuoBin(NUM_VARS);\r\n atual.geraCodRand();\r\n //atual.imprimeCodificacao();\r\n af.fitness(atual);\r\n if(atual.getFitness() > melhor.getFitness())\r\n melhor = atual;\r\n \r\n numIt++;\r\n }\r\n // Interrompe o cronômetro\r\n tempoFinal = (System.currentTimeMillis() - tempoInicial);\r\n //System.out.println(\"\\nTempo de execução: \" + tempoFinal + \" ms ou \" + (tempoFinal/1000.0) + \" seg\\n\");\r\n \r\n // Guarda o melhor individuo e o tempo dessa execução\r\n eleitos[execucao - 1] = melhor;\r\n tempoExecusao[execucao - 1] = tempoFinal;\r\n \r\n // Imprime o melhor individuo\r\n System.out.println(\"\\nExecução \" + execucao + \": \");\r\n // Resposta\r\n if(!melhor.isPenalizado())\r\n {\r\n System.out.println(\"Melhor fitness: \" + melhor.getFitness());\r\n //System.out.print(\"Codificação: \");\r\n //melhor.imprimeCod();\r\n melhor.imprimeProvCod(); \r\n }\r\n else\r\n {\r\n System.out.println(\"Não foi encontrado um individuo valido com \" + MAX_ITERACOES + \" iterações.\"); \r\n System.out.println(\"Melhor fitness: \" + melhor.getFitness());\r\n //System.out.print(\"Codificação: \");\r\n //melhor.imprimeCod();\r\n melhor.imprimeProvCod(); \r\n }\r\n \r\n //System.out.println(\"\\nTempo da execução \" + execucao + \": \" + tempoFinal + \" ms ou \" + (tempoFinal/1000.0) + \" seg\");\r\n // Próxima execucao\r\n execucao++;\r\n } // Fim das execucoes\r\n \r\n // # # # # Estatisticas pós execuções do Aleatorio # # # #\r\n estatisticaFinais(eleitos, tempoExecusao);\r\n }", "public void SOM() {\n // Pick an input vector randomly.\n // A input vector can't be picked twice in a row.\n ArrayList<Double> oldVector = new ArrayList<>();\n ArrayList<Double> vector;\n\n for (int t = 0; t < this.nbIterations; t++) {\n\n // Choose another entry vector than the previous one.\n do {\n int randomInput = (int) (Math.random() * this.input.size());\n vector = this.input.get(randomInput);\n } while (oldVector.equals(vector));\n\n // The old vector is replaced by the new one.\n oldVector = new ArrayList<>(vector);\n\n // Calculation of BMU (Best Matching Unit).\n Neuron BMU = this.getBMU(vector);\n\n // Update the BMU's neighbors.\n this.updateNeighbors(BMU, vector, t);\n\n // Update the screen.\n this.screen.repaint();\n // Sleep for the animation.\n try {\n Thread.sleep(10);\n }\n catch (InterruptedException e) {\n System.out.println(\"Erreur sleep : \" + e);\n }\n }\n }", "public void drive(double percorso) {\n\n\t\tdouble resaReale = 0;\n\n\t\tfor (int i = 0; i < percorso; i++) {\n\t\t\t\n\t\t\tif (serbatoio > 0) {\n\t\t\t\t\n\n\t\t\tresaReale = (ruote.getPressioneRuote() * resa) / MAX_PRESSIONE;\n\t\t\tserbatoio = serbatoio - (1 / resaReale);\n\t\t\truote.setStatoRuote(1);\n\t\t\truote.setPressioneRuote(1);\n\t\t\t\n\t\t\t}\n\t\t\tif (serbatoio < 0) serbatoio = 0;\n\t\t}\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 }", "void Step(){\n if(G().rn.nextDouble()<GetBirthProbability()){\n Divide();\n }\n }", "void think() {\n //get the output of the neural network\n decision = brain.output(vision);\n\n if (decision[0] > 0.8) {//output 0 is boosting\n boosting = true;\n } else {\n boosting = false;\n }\n if (decision[1] > 0.8) {//output 1 is turn left\n spin = -0.08f;\n } else {//cant turn right and left at the same time\n if (decision[2] > 0.8) {//output 2 is turn right\n spin = 0.08f;\n } else {//if neither then dont turn\n spin = 0;\n }\n }\n //shooting\n if (decision[3] > 0.8) {//output 3 is shooting\n shoot();\n }\n }", "@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "private void completeSimulation(double gravity, double initialSpeed, int angle, double maxHeight, double maxHeightTime, double reach){\r\n this.resultArea.setText(\"\");\r\n\t if (angle == 0){\r\n\t\t JOptionPane.showMessageDialog(this,\"Os parâmetros de velocidade inicial e alcance fornecidos são incompatíveis.\",\"Erro de parâmetros\",JOptionPane.ERROR_MESSAGE);\r\n\t } else {\r\n\t \tthis.resultArea.append(\"Dadas as informações iniciais para esta situação, o lançamento \"\r\n\t \t+\"do projétil alcançou uma altura máxima de \" + String.valueOf((float)maxHeight)\r\n\t \t+\" metros em \" + String.valueOf((float)maxHeightTime) + \" segundos, alcançando \"\r\n\t \t+ String.valueOf((float)reach) + \" metros em \"+2*maxHeightTime+ \" segundos.\");\r\n\t }\r\n\t this.reachField.setText(String.valueOf((double)reach));\r\n\t this.mHeightField.setText(String.valueOf((double)maxHeight));\r\n\t this.gravityField.setText(String.valueOf((double)gravity));\r\n\t this.speedField.setText(String.valueOf((double)initialSpeed));\r\n\t this.angleSlider.text.setText(String.valueOf((int)angle));\r\n \r\n Point point = new Point();\r\n this.graphPanel.reach = (int)reach;\r\n this.graphPanel.maxHeight = (int)maxHeight;\r\n this.graphPanel.points.clear();\r\n if (angle != 90){\r\n int lastX = 0;\r\n for (int x=0; x <= reach; x++){\r\n point = this.ball.getParablePoint(x);\r\n this.graphPanel.points.add(point);\r\n //this.resultArea.append(x+\"m = (\"+point.getX()+\" , \"+point.getY()+\")\\n\");\r\n lastX = (int)point.getX();\r\n }\r\n this.graphPanel.points.add(new Point(lastX,0));\r\n } else {\r\n for (int y=0; y <= 150; y++){\r\n point.setLocation(0,y);\r\n this.graphPanel.points.add(point);\r\n //this.resultArea.append(y+\"m = (\"+point.getX()+\" , \"+point.getY()+\")\\n\");\r\n }\r\n }\r\n if (angle != 0)this.graphPanel.startAnimation();\r\n //this.graphPanel.repaint();\r\n //this.resultArea.append(\"Quantidade de pontos = \"+this.graphPanel.points.size());\r\n }", "public void action() {\n\t\t\ttreinador.Correu();\r\n\t\t\ttreinador.Perdeu();\r\n\t\t\treturn;\r\n\t\t}", "private static void normal(){\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n\n //NSGAII algorithm = new NSGAII();\n SPEA2 algorithm = new SPEA2();\n //SPEAHADKA algorithm = new SPEAHADKA();\n //AEMMT algorithm = new AEMMT();\n //AEMMD algorithm = new AEMMD();\n //MOEAD algorithm = new MOEAD();\n\n int x =1;\n int counter = 0;\n\n if (AEMMD.class.isInstance(algorithm) || AEMMT.class.isInstance(algorithm)){\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n }\n else{\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n }\n\n while (counter < x) {\n algorithm.runAlgorithm(problem);\n counter++;\n }\n }", "public void cheat() {\r\n\t\t\t\tnourriture += population*10;\r\n\t\t\t\tarmee += population/2;\r\n\t\t\t\tpopulation += armee*tailleArmee;\r\n\t\t\t}", "public void faiBagnetto() {\n System.out.println(\"Scrivere 1 per Bagno lungo, al costo di 150 Tam\\nSeleziona 2 per Bagno corto, al costo di 70 Tam\\nSeleziona 3 per Bide', al costo di 40 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiVita += 50;\n puntiFelicita -= 30;\n soldiTam -= 150;\n }\n case 2 -> {\n puntiVita += 30;\n puntiFelicita -= 15;\n soldiTam -= 70;\n }\n case 3 -> {\n puntiVita += 10;\n puntiFelicita -= 5;\n soldiTam -= 40;\n }\n }\n checkStato();\n }", "public void simulationStep(int currentTime, int speed) {\n \t\t\n \t\tstudents[0][0].printAcutalState();\n \t\t\n \t\t// -------------------------------------------------\n \t\t// -------------- pre conditions -------------------\n \t\t// -------------------------------------------------\n \t\t\n \t\t// the new array for the calculated students, fill it with EmptyPalce\n \t\tIPlace[][] newState = new IPlace[students.length][students[0].length];\n \t\tfor (int y = 0; y < 5; y++) {\n \t\t\tfor (int x = 0; x < 7; x++) {\n \t\t\t\tnewState[y][x] = new EmptyPlace(properties.size());\n \t\t\t}\n \t\t}\n \t\t\n \t\t// -------------------------------------------------\n \t\t// -------- student independent calculations -------\n \t\t// -------------------------------------------------\n \t\t\n \t\tCalcVector preChangeVector = new CalcVector(properties.size());\n \t\tpreChangeVector.printCalcVector(\"Init\");\n \t\t\n \t\t// breakReaction ( inf(Break) * breakInf )\n \t\tdouble breakInf = 0.01;\n \t\tif (lecture.getTimeBlocks().getTimeBlockAtTime(currentTime / 60000).getType() == BlockType.pause) {\n \t\t\tlogger.info(\"Influenced by break\");\n \t\t\tpreChangeVector.addCalcVector(influence.getEnvironmentVector(EInfluenceType.BREAK_REACTION, breakInf));\n \t\t}\n \t\tpreChangeVector.printCalcVector(\"after break\");\n \t\t\n \t\t// timeDending ( inf(Time) * currentTime/1000 * timeInf )\n \t\tdouble timeInf = 0.001;\n \t\tdouble timeTimeInf = timeInf * currentTime / 1000;\n \t\tpreChangeVector.addCalcVector(influence.getEnvironmentVector(EInfluenceType.TIME_DEPENDING, timeTimeInf));\n \t\tpreChangeVector.printCalcVector(\"after time depending\");\n \t\t\n \t\t// -------------------------------------------------\n \t\t// ---------- iterate over all students ------------\n \t\t// -------------------------------------------------\n \t\tfor (int y = 0; y < students.length; y++) {\n \t\t\tfor (int x = 0; x < students[y].length; x++) {\n \t\t\t\tif (students[y][x] instanceof Student) {\n \t\t\t\t\tStudent student = (Student) students[y][x];\n \t\t\t\t\t// check if there was an interaction from the don\n \t\t\t\t\tEntry<Integer, Student> donInteraction = student.historyDonInputInInterval(currentTime - speed,\n \t\t\t\t\t\t\tcurrentTime);\n \t\t\t\t\tif (donInteraction != null) {\n \t\t\t\t\t\tstudent = donInteraction.getValue();\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// influence of the surrounding students\n \t\t\t\t\tCalcVector neighborInfl = getNeighborsInfluence(student, x, y);\n \t\t\t\t\t// output for one student (0,0) -> only for analyzing the simulation behavior\n \t\t\t\t\tif (y == 0 && x == 0)\n \t\t\t\t\t\tneighborInfl.printCalcVector(\"Neighbor\");\n \t\t\t\t\t\n \t\t\t\t\t// create a new vector which contains the pre calculates vector and the neighbor vector\n \t\t\t\t\tCalcVector preChangeVectorSpecial = neighborInfl.addCalcVector(preChangeVector).addCalcVector(\n \t\t\t\t\t\t\tneighborInfl);\n \t\t\t\t\t// output for one student (0,0) -> only for analyzing the simulation behavior\n \t\t\t\t\tif (y == 0 && x == 0)\n \t\t\t\t\t\tneighborInfl.printCalcVector(\"preChangeVectorSpecial = Neighbor + preChangeVector\");\n \t\t\t\t\t\n \t\t\t\t\t// create a new student and let him calculate a new change vector\n \t\t\t\t\tnewState[y][x] = student.clone();\n\t\t\t\t\t((Student) newState[y][x]).calcNextSimulationStep(preChangeVectorSpecial, influence, x, y);\n \t\t\t\t\tif (y == 0 && x == 0)\n \t\t\t\t\t\t((Student) newState[y][x]).printAcutalState();\n \t\t\t\t\t((Student) newState[y][x]).saveHistoryStates(currentTime);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t// -------------------------------------------------\n \t\t// -------------- post simulation ------------------\n \t\t// -------------------------------------------------\n \t\t\n \t\t// give the reference from newState to real students array\n \t\tstudents = newState;\n \t\t\n \t\t// notify all subscribers of the students array\n \t\tnotifyStudentsObservers();\n \t}", "private void runSimulation() throws Exception{\n\t\tsimulatable.simulate();\n\t\tprintUsage();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tFap<Couple<Double, Integer>> sT = new FapTableau<>();\r\n\t\tFap<Couple<Double, Integer>> sL = new FapListe<>();\r\n\t\t\r\n\t\tRandom r = new Random();\r\n\t\tfor (int i=0 ; i<100 ; i++) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(\"sequenceL vide :\" + sL.estVide());\r\n\t\t\t\tSystem.out.println(\"sequenceT vide :\" + sT.estVide());\r\n\t\t\t\tassert(sL.estVide() == sT.estVide());\r\n\t\t\t\t\r\n\t\t\t\tif (r.nextBoolean()) {\r\n\t\t\t\t\tCouple<Double, Integer> a = new Couple<Double, Integer>(r.nextDouble(), r.nextInt(10));\r\n\t\t\t\t\t\tSystem.out.println(\"insertion de :\" + a);\r\n\t\t\t\t\t\tsL.insere(a);\r\n\t\t\t\t\t\tsT.insere(a);\r\n\t\t\t\t\t\r\n\t\t\t\t} else if (!sL.estVide()){\r\n\t\t\t\t\tCouple<Double, Integer> k1 = sL.extraire();\r\n\t\t\t\t\tCouple<Double, Integer> k2 = sT.extraire();\r\n\t\t\t\t\tassert(k1.equals(k2));\r\n\t\t\t\t\tSystem.out.println(\"suppression de :\" + k1);\r\n\t\t\t\t\tSystem.out.println(\"suppression de :\" + k2);\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "static int runSimulation1() {\r\n\t\tSimulation sim1 = new Simulation(8, 8, false, false);\r\n\t\twhile(sim1.sameSquare() == false) { //stop when sameSquare\r\n\t\t\tsim1.doMove();\r\n\t\t}\r\n\t\treturn sim1.getTime();\r\n\t}", "public static void stopSimulation()\r\n {\r\n stopSimulation=true;\r\n }", "public void guru() {\n\t\tGenerator solve = new Generator();\n\t\tsolve.guru();\n\t\tAnswer = solve.getEquationResult();\n\t\tTextView Equation = (TextView) findViewById(R.id.textView3);\n\t\tEquation.setText(solve.getEquation());\n\t}", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "public void VaciarPila()\n {\n this.tope = 0;\n }", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "public void realizaSimulacion(){\r\n\t\t\r\n\t\tEntradaDeDatos entradaDatosUsuario = new EntradaDeDatos();\r\n\t\tEnum_Instrucciones ordenUsuarioEnEnumerado;\r\n\t\tint filaEntrada, columnaEntrada;\r\n\t\tboolean salir = false;\r\n\t\t\r\n\t\t// Mostramos la superficie.\r\n\t\tmundo.mostrarSuperficie();\r\n\t\t\t\r\n\t\twhile(!salir) {\r\n\t\t\t\r\n\t\t\tordenUsuarioEnEnumerado = entradaDatosUsuario.pedirComandoPorConsolaAlUsuario();\r\n\t\t\t\r\n\t\t\t// Dependiendo del enumerado haremos que se ejecute una accion u otra.\r\n\t\t\tswitch(ordenUsuarioEnEnumerado) {\r\n\t\t\tcase PASO:\r\n\t\t\t\t\r\n\t\t\t\tmundo.evoluciona();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase INICIAR:\r\n\t\r\n\t\t\t\tmundo.iniciar();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase CREARCELULA:\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable filaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tfilaEntrada = entradaDatosUsuario.devuelveFilaIntroducidaPorConsolaAlUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable columnaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tcolumnaEntrada = entradaDatosUsuario.devuelveColumnaIntroducidaPorConsolaUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Creamos la celula, si se ha podido nos notifica exito, y si no, nos informa de un error.\r\n\t\t\t\tif(mundo.crearCelula(filaEntrada, columnaEntrada)) {\r\n\t\t\t\t\tSystem.out.println(\"Creamos nueva celula en la posicion: (\" +\r\n\t\t\t\t\t\t\t\t\t\tfilaEntrada + \",\" + columnaEntrada + \").\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Error, no se ha podido crear la celula\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase ELIMINARCELULA:\r\n\t\t\t\r\n\t\t\t\t// Almacenamos en la variable filaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tfilaEntrada = entradaDatosUsuario.devuelveFilaIntroducidaPorConsolaAlUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable columnaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tcolumnaEntrada = entradaDatosUsuario.devuelveColumnaIntroducidaPorConsolaUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Creamos la c�lula, si se ha podido nos notifica exito, y si no error.\r\n\t\t\t\tif(mundo.eliminarCelula(filaEntrada, columnaEntrada)) {\r\n\t\t\t\t\tSystem.out.println(\"Celula eliminada con exito en la posicion: (\" +\r\n\t\t\t\t\t\t\t\t\t\tfilaEntrada + \",\" + columnaEntrada + \").\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Error, no se ha podido eliminar la celula\");\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase AYUDA:\r\n\t\t\t\t\r\n\t\t\t\tmostrarAyuda();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase VACIAR:\r\n\t\t\t\t\r\n\t\t\t\tmundo.vaciar();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase SALIR:\r\n\t\t\t\t\r\n\t\t\t\tsalir = true;\r\n\t\t\t\t \r\n\t\t\t\tbreak;\r\n\t\t\tcase DESCONOCIDO:\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Error de entrada.\");\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!salir) {\r\n\t\t\t\t\r\n\t\t\t\t// Muestra la superficie.\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tmundo.mostrarSuperficie();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Fin de la simulacion......\");\r\n\t}", "public void toilette() {\n if (!autoriseOperation()) {\n return;\n }\n incrSale(-3);\n incrHumeur(1);\n incrXp(1);\n\n setChanged();\n notifyObservers();\n }", "public void afficheSolde() \r\n\t\t\t\t\t\t{ // d�but de la fonction\r\n\t\t\t\t\t\tSystem.out.println(\"Valeur du solde : \" + this.solde);\t\t\r\n\t\t\t\t\t\t}", "void imprimeCalculos(){\n int a,b;\n a=calculaX();\n b=calculaY();\n System.out.println(\"Valor de X=\"+a);\n System.out.println(\"Valor de Y=\"+b);\n if(a==0){\n proporcion=0;\n }else{\n proporcion=(b/a);\n System.out.println(\"Valor de proporcion es: \"+proporcion);\n }\n }", "public RunSim(ArrayList<Shape> shapes,int speed,ArrayList<Microbe> bacteria, FoodPhero[][]foodPher, GUI gui){\n this.speed = speed;\n time = 0;\n this.proceed = proceed;\n this.gui = gui;\n step = 0;\n this.shapes = shapes;\n this.bacteria = bacteria;\n this.foodPher = foodPher;\n }", "int accidentVelo()\r\n\t{\r\n\t\tdouble rand = Math.random()*100;\r\n\t\tSystem.out.println(rand);\r\n\t\tif ((double)rand <= 0.5) {\r\n\t\t\tSystem.out.println(\"Finalement vous auriez du y aller à pied. Vous vous vider de votre sang sur le bord du trottoir.\");\r\n\t\t\treturn 0.5;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "protected static void runningSimulation() {\n Scanner sc = new Scanner(System.in);\n\n try {\n // Getting the simulation type.\n System.out.print(\"Select the Simulation Method : \\n\" +\n \"\\t0 : To Run the Simulation to the Current Waiting Room\\n\" +\n \"\\t1 : To Run the Simulation for the Whole Waiting Room\\n\" +\n \"\\n\\t\\t : \");\n int situation = sc.nextInt();\n sc.nextLine();\n\n // Checking if the Simulation Type is valid.\n if (situation == 0 || situation == 1) {\n creatingSimulationStats(situation);\n simulationReport(TrainStation.getSimulationTrainQueues());\n launchingSimulationGUI(\"SimTQ\", TrainStation.getSimulationTrainQueues(), 0, 0, 0);\n\n }\n // When the simulation type is invalid.\n else {\n System.out.println(\"Invalid Selection.\");\n mainMenu();\n }\n }\n // When an Invalid character is added.\n catch (InputMismatchException e) {\n System.out.println(\"Invalid Input.\");\n mainMenu();\n }\n // When an error is OCCured when writing the simulation report.\n catch ( IOException e) {\n System.out.println(\"ERROR - Making the Simulation Report.\");\n mainMenu();\n }\n }", "void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }", "private static void BicingsimulatedAnnealingSearch(int num, int n_est, int nbicis, int nfurgo, int d1, int cas, String Cas, String H, String D, int s) {\n\n\n try {\n\n double MedT = 0;\n //double MedN = 0;\n //double MedB = 0;\n int iteraciones = 100;\n Estado Bicing = new Estado(n_est,nbicis,nfurgo,d1,s,1);\n Bicing.setList_cdesp(iteraciones);\n long StartTime = System.nanoTime();\n Problem problem = new Problem(Bicing, new sucesoresA(), new isGoal(), new Heuristic_Function());\n SimulatedAnnealingSearch search = new SimulatedAnnealingSearch(iteraciones, 1000, 125, 0.00001D);\n SearchAgent agent = new SearchAgent(problem, search);\n List L = search.getPathStates();\n Properties properties = agent.getInstrumentation();\n long EndTime = System.nanoTime();\n Estado E = (Estado) search.getGoalState();\n long time = ((EndTime - StartTime) / 1000000);\n MedT += time;\n //MedB += E.getganancia();\n // MedN += Integer.parseInt(properties.getProperty((String)properties.keySet().iterator().next()));\n // MedB /= num;\n // MedN /= num;\n // MedT /= num;\n //MedB = (Math.round(MedB*100.0)/100.0);\n Writer output;\n output = new BufferedWriter(new FileWriter(\"Estadisticas_\" + Cas + \"_D\" + D + \"_H\" + H + \"S.txt\", true));\n double [] vec = E.getearnings();\n for (int i = 0 ; i < iteraciones; ++i) {\n String S = \"\" + vec[i];\n S = S + '\\n';\n output.append(S);\n }\n output.close();\n\n /*for (int i = 0; i < E.getN_furgo(); ++i) {\n System.out.println(\"Recorrido por furgoneta \" + i + \" \" + E.getIFurgo(i).getLong_t());\n }*/\n //printEstado(E);\n //System.out.println();\n //System.out.println(E.getganancia());\n //printActions(agent.getActions());\n //printInstrumentation(agent.getInstrumentation());\n } catch (Exception var4) {\n var4.printStackTrace();\n }\n\n }", "public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }", "public simulation() {\n\n }", "public void variation() {\r\n\t\t\r\n\t\tSystem.out.println(\"Line & Score\");\r\n\t\tSystem.out.println(\"Elevator Up\");\r\n\t\tElevator.setTargetPos(TeleopHandler.ElevatorStates.SCALE_POSITION_L);\r\n\t\tElevator.run(0);\r\n\t\tif(time.get()<5)\r\n\t\t\tDrive.runAt(0.25, 0.25);\r\n\t\telse {\r\n\t\t\tDrive.runAt(0, 0);\r\n\t\t\tSystem.out.println(\"Outtaking Cube\");\r\n\t\t\tIntake.run(TeleopHandler.IntakeStates.SLOW_OUTTAKING);\r\n\t\t}\r\n\t\t\t\r\n\t}", "public void realizaProcessamentoCartaoChance() throws Exception {\n if (indiceChance == 1) {\n DeslocarJogador(jogadorAtual(), 40);\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n\n } else if (indiceChance == 2) {\n DeslocarJogador(jogadorAtual(), 24);\n } else if (indiceChance == 3) {\n if (this.posicoes[this.jogadorAtual()] == 40 || this.posicoes[this.jogadorAtual()] > 11) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n }\n DeslocarJogador(jogadorAtual(), 11);\n\n\n } else if (indiceChance == 4) {\n if (this.posicoes[this.jogadorAtual()] < 12 || this.posicoes[this.jogadorAtual()] > 28) {\n DeslocarJogador(jogadorAtual(), 12);\n } else {\n DeslocarJogador(jogadorAtual(), 28);\n }\n } else if (indiceChance == 5 || indiceChance == 16) {\n if (this.posicoes[jogadorAtual()] < 5 || this.posicoes[jogadorAtual()] > 35) {\n DeslocarJogador(jogadorAtual(), 5);\n } else if (this.posicoes[jogadorAtual()] < 15) {\n DeslocarJogador(jogadorAtual(), 15);\n } else if (this.posicoes[jogadorAtual()] < 25) {\n DeslocarJogador(jogadorAtual(), 25);\n } else if (this.posicoes[jogadorAtual()] < 35) {\n DeslocarJogador(jogadorAtual(), 35);\n }\n\n int jogador = this.jogadorAtual();\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n }\n this.pagarFerrovia(possivelDono.getId(), jogador, 50, lugar.getNome());\n }\n\n } else if (indiceChance == 6) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(50);\n } else if (indiceChance == 7) {\n DeslocarJogador(jogadorAtual(), this.posicoes[jogadorAtual()] - 3);\n this.pagarEventuaisTaxas(jogadorAtual());\n } else if (indiceChance == 8) {\n DeslocarJogador(jogadorAtual(), 10);\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n\n } else if (indiceChance == 9) {\n int GastosRua = this.listaJogadores.get(jogadorAtual()).getQuantidadeDeCasas() * 25;\n GastosRua = GastosRua + this.listaJogadores.get(jogadorAtual()).getQuantidadeDeHoteis() * 10;\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(GastosRua);\n } else if (indiceChance == 10) {\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(15);\n } else if (indiceChance == 11) {\n\n this.listaJogadores.get(jogadorAtual()).ganharCartaoSaidaDePrisao(\"chance\");\n this.cardChancePrisaoEmPosse = true;\n } else if (indiceChance == 12) {\n if (this.posicoes[this.jogadorAtual()] > 5) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n }\n DeslocarJogador(jogadorAtual(), 5);\n if (this.posicoes[this.jogadorAtual()] > 5) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n }\n } else if (indiceChance == 13) {\n DeslocarJogador(jogadorAtual(), 39);\n } else if (indiceChance == 14) {\n int debito = numeroDeJogadores * 50 - 50;\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(debito);\n for (int i = 0; i < numeroDeJogadores; i++) {\n if (i != jogadorAtual()) {\n this.listaJogadores.get(i).addDinheiro(50);\n }\n }\n } else if (indiceChance == 15) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(150);\n }\n\n\n\n if (indiceChance < 16) {\n indiceChance++;\n } else {\n indiceChance = 1;\n }\n }", "private static void fakePole() {\n\t\tint turns = 1000;\n\t\tModelLearnerHeavy modeler = new ModelLearnerHeavy(100, new int[] {30},\n\t\t\t\tnew int[] {30}, new int[] {30}, ActivationFunction.SIGMOID0p5, turns);\n\n\t\tfinal boolean NN_FORM = false;\n\t\tdouble[] mins = Pole.stateMins;\n\t\tdouble[] maxes = Pole.stateMaxes;\n\t\tEnvTranslator stateTranslator = EnvTranslator.rbfEnvTranslator(mins, maxes, new int[] {12,12}, .5);\n\t\tEnvTranslator actTranslator = Pole.actionTranslator;\n\t\tList<double[]> actions = Pole.actionChoices;\n\t\tactions.add(new double[] {1,0});\n//\t\tactions.add(new double[] {0,0});\n\t\tactions.add(new double[] {0,1});\n\t\tfinal Collection<double[]> tmpCorrel = new ArrayList<double[]>();\n\t\tfor (int t = 0; t < turns; t++) {\n\t\t\tdouble[] preState = new double[mins.length];\n\t\t\tfor (int i = 0; i < preState.length; i++) {\n\t\t\t\tfinal double spread = (maxes[i] - mins[i]) / 10;\n\t\t\t\tpreState[i] = RandomUtils.randBetween(mins[i] - spread, maxes[i] + spread);\t\n\t\t\t}\n\t\t\tdouble[] inNN = stateTranslator.toNN(preState);\n\t\t\tdouble[] action = RandomUtils.randomOf(actions);\n\t\t\tmodeler.observePreState(inNN);\n\t\t\tmodeler.observeAction(action);\n\t\t\t\n\t\t\tdouble[] postState = new double[mins.length];\n\t\t\tdouble act = Math.random() < 0.99 ? action[0] - action[1] : (2*Math.round(Math.random())-1);\n\t\t\tdouble r = act/100;\n\t\t\tfor (int i = 0; i < postState.length; i++) {\n\t\t\t\tpostState[i] = preState[i] * Math.exp(Math.signum(preState[i]) * (i == 0 ? r : -r));\n\t\t\t} // act0 moves state[0] up and state[1] down, act1 moves state[0] down and state[1] up\n\t\t\ttmpCorrel.add(new double[] {act, postState[0] - preState[0]});\n\t\t\tmodeler.observePostState(stateTranslator.toNN(postState));\n\t\t\tmodeler.saveMemory();\n\t\t}\n\t\tmodeler.learnFromMemory(1.5, 0.5, 0, false, 1000, 0.0003); // IT SEEMS CONFIDENCE IS NOT RELIABLE INDICATOR\n//\t\tfor (double[] dd : tmpCorrel) {\n//\t\t\tString s = \"\"; for (double d : dd) s += d + \"\t\";\n//\t\t\tSystem.out.println(s);\n//\t\t}\n\t\tfor (int i = 0; i < 10; i++) System.out.println(\"*********\");\n\t\tSystem.out.println(modeler.getModelVTA().getConfidenceEstimate());\n//\t\tmodeler.testit(1000, mins, maxes, stateTranslator, actTranslator, actions, NN_FORM);\n\t\t\n\t\tfor (int t = 0; t < 500; t++) {\n\t\t\tfinal double[] state = new double[mins.length];\n\t\t\tfor (int i = 0; i < state.length; i++) state[i] = RandomUtils.randBetween(mins[i], maxes[i]);\n\t\t\tString s = \"\";\n\t\t\tfor (double d : state) s += d + \"\t\";\n\t\t\tfor (double[] act : actions) {\n\t\t\t\tdouble[] foresight = Foresight.montecarlo(modeler, stateTranslator.toNN(state), act, 1, 100, 30);\n\t\t\t\tdouble[] postV = stateTranslator.fromNN(foresight);\n\t\t\t\ts += \"act:\" + actTranslator.fromNN(act) + \":\t\";\n\t\t\t\tfor (double d : postV) s += Utils.round(d * 100, 2) + \"\t\";\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}", "public Behaviour runObjective() {\n //System.out.println(\"Simulation runObjective(): running method\");\n final int iterations = config.getSimulationIterations();\n return objectiveSimulation(iterations);\n }", "public static void curar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int curador;\n //condicion de puntos de mana para ejecutar la curacion del jugador\n if(puntosDeMana>=1){\n //acciones de la funcion curar en el jugador\n aleatorio = (numeroAleatorio.nextInt(25-15+1)+15);\n curador= ((nivel+1)*5)+aleatorio;\n puntosDeVida= puntosDeVida+curador;\n puntosDeMana=puntosDeMana-1;\n }\n else{//imprimiendo el mensaje de curacion fallada\n System.out.println(\"no cuentas con Puntos De mana (MP) para curarte\");\n }\n }", "@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }", "public void imprimir() {\n\t\r\n\tSystem.out.println(\"El circulo tiene un perimetro de \"+ this.perimetro + \" y un area de \"+ this.area);\r\n\t\r\n\t}", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "public void start() {\n boolean continua = true;\n Dati datiRMP;\n int codPiatto;\n int codRiga;\n int quantiCoperti;\n int quanteComande;\n String descPiatto;\n String catPiatto;\n Modulo modRMP = RMPModulo.get();\n Modulo modPiatto = PiattoModulo.get();\n Modulo modCategoria = CategoriaModulo.get();\n ModuloRisultati modRisultati = getModuloRisultati();\n Campo chiaveRMP;\n int codRMP;\n int codMenu;\n int[] codici;\n double qtaOff;\n double qtaCom;\n double gradimento = 0.0;\n PanCoperti panCoperti;\n\n try { // prova ad eseguire il codice\n\n /* azzera il numero di coperti serviti */\n panCoperti = getPanCoperti();\n panCoperti.setNumCopertiPranzo(0);\n panCoperti.setNumCopertiCena(0);\n\n /* svuota i dati del modulo risultati */\n getModuloRisultati().query().eliminaRecords();\n\n datiRMP = this.getDati();\n chiaveRMP = modRMP.getCampoChiave();\n\n /* spazzola le RMP trovate */\n for (int k = 0; k < datiRMP.getRowCount(); k++) {\n\n this.quanti++;\n\n codRMP = datiRMP.getIntAt(k, chiaveRMP);\n codPiatto = datiRMP.getIntAt(k, modRMP.getCampo(RMP.CAMPO_PIATTO));\n descPiatto = datiRMP.getStringAt(k,\n modPiatto.getCampo(Piatto.CAMPO_NOME_ITALIANO));\n catPiatto = datiRMP.getStringAt(k,\n modCategoria.getCampo(Categoria.CAMPO_SIGLA));\n\n codRiga = addPiatto(codPiatto, descPiatto, catPiatto);\n\n if (codRiga <= 0) {\n continua = false;\n break;\n }// fine del blocco if\n\n /* incrementa di 1 il numero di volte in cui il piatto è stato proposto\n * per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quanteVolte, 1);\n\n /* determina il numero dei coperti presenti nel menu al\n * quale questa RMP appartiene */\n codMenu = datiRMP.getIntAt(k, modRMP.getCampo(RMP.CAMPO_MENU));\n quantiCoperti = getQuantiCoperti(codMenu);\n\n /* incrementa il numero di coperti potenziali per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quantiCoperti, quantiCoperti);\n\n /* determina il numero di comande effettuate\n * per questa RMP */\n quanteComande = getQuanteComande(codRMP);\n\n /* incrementa il numero di comande effettuate per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quanteComande, quanteComande);\n\n /* interruzione nella superclasse */\n if (super.isInterrompi()) {\n continua = false;\n break;\n }// fine del blocco if\n\n } // fine del ciclo for\n\n /* spazzola le righe dei risultati per regolare il gradimento */\n if (continua) {\n codici = modRisultati.query().valoriChiave();\n for (int k = 0; k < codici.length; k++) {\n codRiga = codici[k];\n gradimento = 0.0;\n qtaOff = modRisultati.query()\n .valoreDouble(Campi.Ris.quantiCoperti.getCampo(), codRiga);\n qtaCom = modRisultati.query()\n .valoreDouble(Campi.Ris.quanteComande.getCampo(), codRiga);\n if (qtaOff != 0) {\n gradimento = qtaCom / qtaOff;\n gradimento = Lib.Mat.arrotonda(gradimento, 4);\n }// fine del blocco if\n modRisultati.query().registraRecordValore(codRiga,\n Campi.Ris.gradimento.getCampo(),\n gradimento);\n } // fine del ciclo for\n }// fine del blocco if\n\n datiRMP.close();\n\n getNavigatore().aggiornaLista();\n\n /* aggiorna il numero di coperti serviti */\n Filtro filtro;\n Number numero;\n Modulo moduloRMT = RMTModulo.get();\n Filtro filtroMenu = getFiltroMenu();\n Filtro filtroPranzo = FiltroFactory.crea(MenuModulo.get().getCampo(Menu.Cam.pasto), Ristorante.COD_DB_PRANZO);\n Filtro filtroCena = FiltroFactory.crea(MenuModulo.get().getCampo(Menu.Cam.pasto), Ristorante.COD_DB_CENA);\n filtro = new Filtro();\n filtro.add(filtroMenu);\n filtro.add(filtroPranzo);\n numero = moduloRMT.query().somma(RMT.Cam.coperti.get(), filtro);\n panCoperti.setNumCopertiPranzo(Libreria.getInt(numero));\n filtro = new Filtro();\n filtro.add(filtroMenu);\n filtro.add(filtroCena);\n numero = moduloRMT.query().somma(RMT.Cam.coperti.get(), filtro);\n panCoperti.setNumCopertiCena(Libreria.getInt(numero));\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }", "private void estadoInicial(){\n double referencias[] = new double[sigmas.length];\n for(int i=0;i<sigmas.length;i++){\n referencias[i] = (ppl.limiteSuperiorR(i+1)+ppl.limiteInferiorR(i+1))/2;\n System.out.printf(\"limS:%g, limI:%g, Referencias[%d] = %g\\n\",ppl.limiteSuperiorR(i+1),ppl.limiteInferiorR(i+1),i,referencias[i]);\n }\n\n double Zc = ppl.Z(referencias[0],referencias[1]);\n TActual = Zc*0.2;\n System.out.printf(\"TActual:T%g \\n\",TActual);\n\n estadoMejor = new Estado(\n iteracionActual, \n TActual, \n referencias,\n Zc);\n\n calcularSoluciones(estadoMejor);\n calcularProbabilidadAceptacion(estadoMejor);\n\n historialEstados.add(estadoMejor);\n }", "public void testPeriodic()\n\t{\n\t\tif (oi.getGunS() > 0.5)\t{\n\t\t\tdrive.TimerMove(0.3, 0.75);\n\t\t\tdrive.TimerMove(-0.3, 0.75);\n\t\t}\n\t\tlong milis = (long)(1.5 * 1000);\n \tlong time = System.currentTimeMillis();\n \twhile (System.currentTimeMillis() < time + milis)\n \t\tconveyor.setConveyor(1);\n\t\ttime = System.currentTimeMillis();\n\t\twhile (System.currentTimeMillis() < time + milis)\n\t\t\tconveyor.setConveyor(-1);\n\t\tconveyor.setConveyor(0);\n\t\ttime = System.currentTimeMillis();\n\t\twhile (System.currentTimeMillis() < time + milis)\n\t\t\tconveyor.setPlate(false);\n\t\ttime = System.currentTimeMillis();\n\t\twhile (System.currentTimeMillis() < time + milis)\n\t\t\tconveyor.setPlate(true);\n\t\telRaise.elCycle();\n\t\tLiveWindow.run();\n\t}", "@Override\n public Coup meilleurCoup(Plateau _plateau, Joueur _joueur, boolean _ponder) {\n \n _plateau.sauvegardePosition(0);\n \n /* On créé un noeud père, qui est le noeud racine de l'arbre. On définit arbitrairement le joueur associé (\n (0 ou 1, il importe peu de savoir quel joueur correspond à ce nombre, cette information étant déjà portée par \n j1 et j2 dans l'algorithme. Le tout est de faire alterner cette valeur à chaque niveau de l'arbre. */\n \n Noeud pere = new Noeud();\n pere.joueurAssocie = 0;\n \n // On définit ici c, le coefficient d'arbitrage entre exploration et exploitation. Ce dernier est théroquement optimal pour una valeur égale à sqrt(2).\n \n double c = 10 * Math.sqrt(2);\n double[] resultat = new double[2];\n \n // Conditions de fonctionnement par itération\n \n //int i = 1;\n //int nbTours = 10000;\n \n //while(i <= nbTours){\n \n // Conditions de fonctionnement en mode \"compétition\" (100 ms pour se décider au maximum).\n \n long startTime = System.currentTimeMillis();\n \n while((System.currentTimeMillis()-startTime) < 100){\n\n // La valeur résultat ne sert à rien fondamentalement ici, elle sert uniquement pour le bon fonctionnement de l'algorithme en lui même.\n // On restaure le plateau à chaque tour dans le MCTS (Sélection - Expension - Simulation - Backpropagation). \n \n resultat = MCTS(pere, _plateau, this.j_humain, this.j_ordi, c, this.is9x9, this.methodeSimulation);\n _plateau.restaurePosition(0);\n \n //i++;\n }\n\n // On doit maintenant choisir le meilleur coup parmi les fils du noeud racine, qui correspondent au coup disponibles pour l'IA.\n \n double maxValue = 0;\n int maxValueIndex = 0;\n \n for(int j = 0; j < pere.fils.length; j++){\n \n double tauxGain = ((double)pere.fils[j].nbPartiesGagnees / (double)pere.fils[j].nbPartiesJouees);\n\n // On choisirat le coup qui maximise le taux de gain des parties simulées.\n \n if(tauxGain >= maxValue){\n maxValueIndex = j;\n maxValue = tauxGain;\n \n }\n }\n \n // On retourne le coup associé au taux de gain le plus élevé.\n\n return pere.fils[maxValueIndex].coupAssocie;\n }", "public void startSimulation() {\r\n \t\tif(animationHolder != null ) {\r\n \t\t\tanimationHolder.stop();\r\n \t\t}\r\n \t\t// if simulation is not in pause state\r\n \t\tif (!stopSimulation.isEnabled()) {\r\n \t\t\t// Asks for confirmation before overwriting previous simulation data\r\n \t\t\tif (model.containsSimulationResults()) {\r\n \t\t\t\t// Find frame to show confirm dialog\r\n \t\t\t\tComponent parent = mainWindow;\r\n \t\t\t\tif (resultsWindow != null && resultsWindow.isFocused()) {\r\n \t\t\t\t\tparent = resultsWindow;\r\n \t\t\t\t}\r\n \r\n\t\t\t\tint resultValue = JOptionPane.showConfirmDialog(parent, \"This operation will overwrite old simulation results. Continue anyway?\",\r\n \t\t\t\t\t\t\"JMT - Warning\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\r\n \t\t\t\tif (resultValue == JOptionPane.NO_OPTION) {\r\n \t\t\t\t\treturn;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t// Asks for confirmation if a logger-file exists (and has existing data) [MF08 0.7.4 (Marco Bertoli)]\r\n \t\t\tString[] ln = model.getLoggerNameList();\r\n \t\t\tString ln2 = \"\";\r\n \t\t\tif (ln != null) {\r\n \t\t\t\tif (model.getLoggingGlbParameter(\"autoAppend\")\r\n \t\t\t\t\t\t.equalsIgnoreCase(new Integer(jmt.engine.log.LoggerParameters.LOGGER_AR_ASK).toString())) {\r\n \t\t\t\t\tif (ln.length > 0) {\r\n \t\t\t\t\t\t// Cache the absolute log-path\r\n \t\t\t\t\t\tString logabspath;\r\n \t\t\t\t\t\tif (model.getLoggingGlbParameter(\"path\").equalsIgnoreCase(\"\") || (model.getLoggingGlbParameter(\"path\").equalsIgnoreCase(\".\"))) {\r\n \t\t\t\t\t\t\tlogabspath = new File(\"\").getAbsolutePath() + File.separator;\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tlogabspath = new File(model.getLoggingGlbParameter(\"path\")).getAbsolutePath() + File.separator;\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t// Find if the logfiles have data in them:\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\t//Code to remove duplicate file names from the list to obtain a unique list of File names.\r\n \t\t\t\t\t\t\tArrays.sort(ln);\r\n \t\t\t\t\t\t\tint k = 0;\r\n \t\t\t\t\t\t\tfor (int i = 0; i < ln.length; i++){\r\n \t\t\t\t\t\t\t\tif (i > 0 && ln[i].equals(ln[i -1])){\r\n \t\t\t\t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tln[k++] = ln[i];\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tString[] unique = new String[k];\r\n \t\t\t\t\t\t\tSystem.arraycopy(ln, 0, unique, 0, k);\r\n \r\n \t\t\t\t\t\t\tfor (String element : unique) {\r\n \t\t\t\t\t\t\t\t// if the files have data, print what will be overwritten\r\n \t\t\t\t\t\t\t\tif (new File(logabspath + element).length() > 0) {\r\n \t\t\t\t\t\t\t\t\t\tln2 = ln2 + element + \", \";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t// remove the trailing comma\r\n \t\t\t\t\t\t\tif (ln2 != \"\") {\r\n \t\t\t\t\t\t\t\tln2 = ln2.substring(0, ln2.length() - 2);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\t\te.printStackTrace();\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\tif (ln2 != \"\") {\r\n \t\t\t\t\t\t\t// Find frame to show dialog\r\n \t\t\t\t\t\t\tComponent parent = mainWindow;\r\n \t\t\t\t\t\t\tif (resultsWindow != null && resultsWindow.isFocused()) {\r\n \t\t\t\t\t\t\t\tparent = resultsWindow;\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t\tint resultValue = JOptionPane.showConfirmDialog(parent, \"This operation will modify the following logfile(s): \" + ln2\r\n \t\t\t\t\t\t\t\t\t+ \". \" + \"Continue anyway?\", \"JMT - Warning\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\r\n \t\t\t\t\t\t\tif (resultValue == JOptionPane.NO_OPTION) {\r\n \t\t\t\t\t\t\t\treturn;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\t//System.out.println(\"Empty file\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t} // end confirmation if file exists\r\n \t\t\t// Correct eventual problems on preloading for closed classes\r\n \t\t\tmodel.manageJobs();\r\n \t\t\tmc = new ModelChecker(model, model, model, model, false);\r\n \t\t\tpw = new JModelProblemsWindow(mainWindow, mc, this);\r\n \t\t\tif (!mc.isEverythingOkNormal()) {\r\n \t\t\t\tpw.show();\r\n \t\t\t}\r\n \t\t\tif (mc.isEverythingOkNormal() || ((!mc.isEverythingOkNormal()) && (pw.continued()))) {\r\n \t\t\t\tif (!model.isParametricAnalysisEnabled()) {\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\t// Removes previous ResultsWindow\r\n \t\t\t\t\t\tif (resultsWindow != null) {\r\n \t\t\t\t\t\t\tresultsWindow.dispose();\r\n \t\t\t\t\t\t\tshowResults.setEnabled(false);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tFile temp = File.createTempFile(\"~JModelSimulation\", \".xml\");\r\n \t\t\t\t\t\ttemp.deleteOnExit();\r\n \t\t\t\t\t\tXMLWriter.writeXML(temp, model);\r\n \t\t\t\t\t\t// Creates results data structure\r\n \t\t\t\t\t\tmodel.setSimulationResults(new ResultsModel(model.getPollingInterval()));\r\n \t\t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t\t\tdispatcher = new DispatcherThread(this, model, (ResultsModel) model.getSimulationResults());\r\n \t\t\t\t\t\tdispatcher.startSimulation(temp);\r\n \t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\thandleException(e);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\t// Removes previous ResultsWindow\r\n \t\t\t\t\tshowResults.setEnabled(false);\r\n \t\t\t\t\tif (resultsWindow != null) {\r\n \t\t\t\t\t\tresultsWindow.dispose();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (progressWindow == null) {\r\n \t\t\t\t\t\tprogressWindow = new PAProgressWindow(mainWindow, simulate, pauseSimulation, stopSimulation, model\r\n \t\t\t\t\t\t\t\t.getParametricAnalysisModel());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tbatchThread = new PADispatcherThread(this, model, progressWindow);\r\n \t\t\t\t\tchangeSimActionsState(false, true, true);\r\n \t\t\t\t\tprogressWindow.initialize(model.getParametricAnalysisModel().getNumberOfSteps());\r\n \t\t\t\t\tprogressWindow.start();\r\n \t\t\t\t\tprogressWindow.show();\r\n \t\t\t\t\tbatchThread.start();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tif (!model.isParametricAnalysisEnabled()) {\r\n \t\t\t\tdispatcher.restartSimulation();\r\n \t\t\t} else {\r\n \t\t\t\tbatchThread.restartSimulation();\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public void solution() {\n\t\t\n\t}", "public abstract void sacar( Double valor);", "public void simulationTerminating() {\n }", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public double runSimulation(ArrayList<Rocket>list){\n int totalBudget = 0;\n int sentRocket = 0;\n int explodedRocket= 0;\n int successRocket = 0;\n for(Rocket rocket:list){\n if(!rocket.launch() || !rocket.land()) {\n sentRocket++;\n explodedRocket++;\n totalBudget += rocket.rocketCost;\n } else {\n sentRocket++;\n successRocket++;\n totalBudget += rocket.rocketCost;\n }\n }\n\n System.out.println(\"Total number of rockets sent \"+sentRocket);\n System.out.println(\"Total number of exploded rockets \"+explodedRocket);\n\n return totalBudget;\n\n }", "public void popier() {\n Scanner input1 = new Scanner(System.in);\n //Ivedame vaiku skaiciu\n Scanner input2 = new Scanner(System.in);\n //Idame tevu skaiciu\n Scanner input3 = new Scanner(System.in);\n\n System.out.println(\"Iveskite atlyginimą ant popieriaus: \");\n double atlyginimas = input1.nextDouble();\n\n System.out.println(\"Iveskite turimų vaikų iki 18 metų skaičių.\");\n int vaikai = input2.nextInt();\n if (vaikai == 0) {\n\n //Apskaiciuojame NPD\n double npd = 310 - 0.5 * (atlyginimas - 380);\n if (npd >= 0)\n System.out.println(\"NPD: \" + npd);\n else\n System.out.println(\"NPD: \" + 0);\n\n //Bendras NPD\n double bnpd = npd;\n System.out.println(\"Bendras NPD: \" + bnpd);\n\n //Darbuotojo mokesciai\n System.out.println(\"\\nDarboutojo mokesčiai:\");\n\n //Apskaiciuojame GPM\n //Gauname neapmokestinama dali\n double nep = atlyginimas - bnpd;\n\n //GPM 15%\n double gpm = nep * 1.15 - nep;\n System.out.printf(\"Pajamu mokestis (GPM): %.2f %n\", gpm);\n\n //Apskaiciuojame PSD 6%\n double psd = atlyginimas * 1.06 - atlyginimas;\n System.out.printf(\"Sveikatos draudimas (PSD): %.2f %n\", psd);\n\n //Apskaiciuojame pensija ir soc draudima 3%\n double soc = atlyginimas * 1.03 - atlyginimas;\n System.out.printf(\"Pensijų ir soc. Draudimas: %.2f %n\", soc);\n\n\n //Darbdavio mokesciai\n System.out.println(\"\\nDabdavio mokami mokesčiai:\");\n\n //Sodros imoka 30.98%\n double sod = atlyginimas * 1.3098 - atlyginimas;\n System.out.printf(\"Sodros įmoka (VSD): %.2f %n\", sod);\n\n // Imoka i garantini fonda 0.2%\n double gar = atlyginimas * 1.002 - atlyginimas;\n System.out.printf(\"Įmokos į Garantinį fondą: %.2f %n\", gar);\n\n //Uzmokestis i rankas\n double rank = atlyginimas - gpm - psd - soc;\n System.out.printf(\"%nUžmokestis gaunamas į rankas: %.2f %n\", rank);\n\n //Darbo vietos kaina\n double viet = atlyginimas + sod + gar;\n System.out.printf(\"Darbo vietos kaina darbdaviui: %.2f\", viet);\n\n\n } else {\n\n System.out.println(\"Keliese auginate vaikus?\");\n int tevai = input3.nextInt();\n\n\n //Apskaiciuojame NPD\n double npd = 310 - 0.5 * (atlyginimas - 380);\n if (npd >= 0)\n System.out.println(\"NPD: \" + npd);\n else\n System.out.println(\"NPD: \" + 0);\n\n //Apskaiciuojame PNPD\n double pnpd = (200 * vaikai) / tevai;\n System.out.println(\"PNPD: \" + pnpd);\n\n //Bendras NPD\n double bnpd = npd + pnpd;\n System.out.println(\"Bendras NPD: \" + bnpd);\n\n //Darbuotojo mokesciai\n System.out.println(\"\\nDarboutojo mokesčiai:\");\n\n //Apskaiciuojame GPM\n //Gauname neapmokestinama dali\n double nep = atlyginimas - bnpd;\n\n //GPM 15%\n double gpm = nep * 1.15 - nep;\n System.out.printf(\"Pajamu mokestis (GPM): %.2f %n\", gpm);\n\n //Apskaiciuojame PSD 6%\n double psd = atlyginimas * 1.06 - atlyginimas;\n System.out.printf(\"Sveikatos draudimas (PSD): %.2f %n\", psd);\n\n //Apskaiciuojame pensija ir soc draudima 3%\n double soc = atlyginimas * 1.03 - atlyginimas;\n System.out.printf(\"Pensijų ir soc. Draudimas: %.2f %n\", soc);\n\n\n //Darbdavio mokesciai\n System.out.println(\"\\nDabdavio mokami mokesčiai:\");\n\n //Sodros imoka 30.98%\n double sod = atlyginimas * 1.3098 - atlyginimas;\n System.out.printf(\"Sodros įmoka (VSD): %.2f %n\", sod);\n\n // Imoka i garantini fonda 0.2%\n double gar = atlyginimas * 1.002 - atlyginimas;\n System.out.printf(\"Įmokos į Garantinį fondą: %.2f %n\", gar);\n\n //Uzmokestis i rankas\n double rank = atlyginimas - gpm - psd - soc;\n System.out.printf(\"%nUžmokestis gaunamas į rankas: %.2f %n\", rank);\n\n //Darbo vietos kaina\n double viet = atlyginimas + sod + gar;\n System.out.printf(\"Darbo vietos kaina darbdaviui: %.2f\", viet);\n\n }\n\n\n\n }", "public void eduque() {\n if (!autoriseOperation()) {\n return;\n }\n incrXp(2);\n incrFatigue(1);\n incrHumeur(1);\n\n setChanged();\n notifyObservers();\n }", "@Override\n\tpublic void EmitirSom() {\n\t\tSystem.out.println(\"\\nEsta preguiça emite o som tec tec tec\\n\");\t\t\n\t}" ]
[ "0.6505171", "0.64878273", "0.6410619", "0.6401821", "0.6390463", "0.62583363", "0.62445736", "0.6166118", "0.60902125", "0.60887086", "0.60543203", "0.60382396", "0.6022065", "0.6011982", "0.60082537", "0.5982403", "0.5950259", "0.59498954", "0.5936011", "0.5933753", "0.59273976", "0.59095603", "0.5909483", "0.58993906", "0.5898211", "0.58712095", "0.5869085", "0.5860252", "0.5854667", "0.58540934", "0.5852913", "0.5851445", "0.5848798", "0.58387077", "0.58354205", "0.5834943", "0.5832402", "0.5831992", "0.58299714", "0.58294725", "0.5826726", "0.58264166", "0.5820247", "0.5819768", "0.58077186", "0.5798099", "0.57822543", "0.5764616", "0.57601595", "0.575398", "0.57526755", "0.5744729", "0.5743802", "0.57353306", "0.5729326", "0.5728134", "0.5717945", "0.5715675", "0.5711797", "0.57114154", "0.5706261", "0.5705727", "0.56870776", "0.56823623", "0.56823194", "0.56775945", "0.56751645", "0.56722546", "0.566838", "0.5665429", "0.56633484", "0.56614965", "0.5655961", "0.5650087", "0.56473225", "0.5644635", "0.56438726", "0.5626774", "0.5623791", "0.5611431", "0.5611173", "0.56079555", "0.56056345", "0.56048375", "0.5601692", "0.5599267", "0.5592192", "0.55855644", "0.5583942", "0.5582256", "0.5577847", "0.5576451", "0.55758494", "0.5567263", "0.5564251", "0.5560743", "0.556074", "0.55581844", "0.55563027", "0.5551427" ]
0.698118
0
Make procedures on Patient.
private void makeProcedures(Patient patient, String proc) { patient.setLastProcedure(proc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void registerPatientMethod1(Patient p);", "ProcedureCall createProcedureCall();", "public void careForPatient(Patient patient);", "public void tweakProcedure(Procedure proc) {\n }", "ProcedureDecl createProcedureDecl();", "void AddPatiant(Patient p) throws Exception;", "protected void updateProcedures() {\n if (!STORED_PROCEDURE_ENABLED.contains(dbType)) {\n return;\n }\n\n // Build/update the tables as well as the stored procedures\n PhysicalDataModel pdm = new PhysicalDataModel();\n buildCommonModel(pdm, updateFhirSchema, updateOauthSchema,updateJavaBatchSchema);\n\n // Now only apply the procedures in the model. Much faster than\n // going through the whole schema\n try {\n try (Connection c = createConnection()) {\n try {\n JdbcTarget target = new JdbcTarget(c);\n IDatabaseAdapter adapter = getDbAdapter(dbType, target);\n pdm.applyProcedures(adapter);\n pdm.applyFunctions(adapter);\n } catch (Exception x) {\n c.rollback();\n throw x;\n }\n c.commit();\n }\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n }", "private void setPersonProceduresBySpecies(IacucProtocol iacucProtocol, List<IacucProtocolStudyGroup> iacucProtocolStudyGroups) {\n for(ProtocolPersonBase protocolPerson : iacucProtocol.getProtocolPersons()) {\n List<IacucProtocolSpeciesStudyGroup> iacucProtocolSpeciesStudyGroups = getListOfProcedureStudyBySpecies(iacucProtocolStudyGroups);\n IacucProtocolPerson iacucProtocolPerson = (IacucProtocolPerson)protocolPerson;\n iacucProtocolPerson.setProcedureDetails(getPersonProcedureDetails(iacucProtocolSpeciesStudyGroups, iacucProtocolPerson));\n iacucProtocolPerson.setAllProceduresSelected(isAllProceduresChecked(iacucProtocolPerson.getProcedureDetails()));\n }\n }", "public static Patient makePatient(String[] pt) {\n\n\t\tPatient output = new Patient(pt[1], pt[2], pt[0], 0);\n\t\tString[] staff = pt[4].split(\",\");\n\t\tfor (String member : staff)\n\t\t\toutput.addMedicalStaff(new MedicalStaff(member));\n\n\t\t@SuppressWarnings(\"unused\") // Medication currently disabled\n\t\tString[] meds = pt[5].split(\",\");\n\t\t// for (String med : meds)\n\t\t// output.addMedication(new Medication(med));\n\n\t\tString address = pt[6];\n\t\toutput.getContactInfo().addAddress(address);\n\t\tString[] phoneNumbers = pt[7].split(\",\");\n\t\tfor (String number : phoneNumbers)\n\t\t\toutput.getContactInfo().addPhone(number);\n\t\tString email = pt[8];\n\t\toutput.getContactInfo().addEmail(email);\n\t\tString[] pets = pt[9].split(\",\");\n\t\tfor (String pet : pets)\n\t\t\toutput.getPreferences().addPet(new Pet(pet, null, false));\n\t\tString[] allergies = pt[10].split(\",\");\n\t\tfor (String allergy : allergies)\n\t\t\toutput.getPreferences().addAllergy(allergy);\n\t\tString[] dietaryNeeds = pt[11].split(\",\");\n\t\tfor (String diet : dietaryNeeds)\n\t\t\toutput.getPreferences().addDietaryRestrictions(diet);\n\t\treturn output;\n\t}", "public Procedures generateCode(DeclNode.ProcedureNode node) {\n beginGen(\"Program\");\n staticLevel = node.getBlock().getBlockLocals().getLevel();\n assert staticLevel == 1; // Main program is at static level 1\n /* Generate the code for the main program and all procedures */\n visitProcedureNode(node);\n endGen(\"Program\");\n return procedures;\n }", "private void createNewStudyProcedures(IacucProtocol sourceProtocol, IacucProtocol destProtocol) {\n destProtocol.setIacucProtocolStudyGroups(new ArrayList<IacucProtocolStudyGroupBean>());\n HashMap<String, IacucProtocolSpecies> newIacucProtocolSpeciesMapping = getIacucProtocolSpeciesMapping(destProtocol.getIacucProtocolSpeciesList());\n for(IacucProtocolStudyGroupBean iacucProtocolStudyGroupBean : sourceProtocol.getIacucProtocolStudyGroups()) {\n IacucProtocolStudyGroupBean newIacucProtocolStudyGroupBean = (IacucProtocolStudyGroupBean)deepCopy(iacucProtocolStudyGroupBean);\n setAttributesForStudyProcedures(newIacucProtocolStudyGroupBean, destProtocol, newIacucProtocolSpeciesMapping);\n destProtocol.getIacucProtocolStudyGroups().add(newIacucProtocolStudyGroupBean);\n }\n }", "HospitalSystem(Patient patient, Action action){\r\n\t\tthis.patient=patient;\r\n\t\treferredTo=action;\r\n\t\t\r\n\t\t//call the selection action method which will process the patient\r\n\t\tselectAction();\r\n\t\t\r\n\t}", "public static interface SoftwareProcedure\r\n\t{\r\n\t\tpublic boolean execute(final Software sw, final String uword, final MOB mob, final String unparsed, final List<String> parsed);\r\n\t}", "public Patient (){\r\n }", "private void addProceduresForSpeciesGroups(IacucProtocol protocol) {\n for(IacucProtocolSpeciesStudyGroup protocolStudyGroupSpecies : protocol.getIacucProtocolStudyGroupSpeciesList()) {\n protocolStudyGroupSpecies.setResponsibleProcedures(new ArrayList<IacucProtocolStudyGroupBean>());\n protocolStudyGroupSpecies.getResponsibleProcedures().addAll(getStudyGroupProceduresForSpeciesGroup(protocol, protocolStudyGroupSpecies.getIacucProtocolSpecies()));\n }\n }", "public Patient(String n, String type){\n name =\"Brendan\";\n pid = \"01723-X72312-7123\";\n birthDate = new Date();\n nationalID = n;\n sex =\"Female\";\n mothersName = \"Mary\";\n fathersName = \"John\";\n enrolledSchema = new Schema();\n doctype = 1;\n }", "public Patient() {\r\n\r\n\t}", "public Patient() {\n\t\t\n\t}", "public static <A> CompositeProcedure<A> procedure(Procedure<? super A> procedure) {\n return new CompositeProcedure<A>(procedure);\n }", "private void setPersonProceduresByGroups(IacucProtocol iacucProtocol, List<IacucProtocolStudyGroup> iacucProtocolStudyGroups) {\n for(ProtocolPersonBase protocolPerson : iacucProtocol.getProtocolPersons()) {\n List<IacucProtocolSpeciesStudyGroup> iacucProtocolSpeciesStudyGroups = getListOfProcedureStudyBySpeciesGroup(iacucProtocolStudyGroups);\n IacucProtocolPerson iacucProtocolPerson = (IacucProtocolPerson)protocolPerson;\n iacucProtocolPerson.setProcedureDetails(getPersonProcedureDetails(iacucProtocolSpeciesStudyGroups, iacucProtocolPerson));\n iacucProtocolPerson.setAllProceduresSelected(isAllProceduresChecked(iacucProtocolPerson.getProcedureDetails()));\n }\n }", "void showPatients() {\n\t\t\t\n\t}", "private void addPersonResponsibleProcedures(IacucProtocolStudyGroupBean iacucProtocolStudyGroupBean, IacucProtocolPerson protocolPerson, \n IacucProtocolSpeciesStudyGroup protocolSpeciesStudyGroup) {\n if(iacucProtocolStudyGroupBean.isNewProcedure()) {\n for(IacucProtocolStudyGroup iacucProtocolStudyGroup : protocolSpeciesStudyGroup.getIacucProtocolStudyGroups()) {\n if(iacucProtocolStudyGroup.getIacucProtocolStudyGroupBean().getProcedureCode().equals(iacucProtocolStudyGroupBean.getProcedureCode())) {\n IacucProcedurePersonResponsible newIacucProcedurePersonResponsible = getNewPersonResponsibleProcedure(protocolPerson, iacucProtocolStudyGroup);\n iacucProtocolStudyGroup.getIacucProcedurePersonResponsibleList().add(newIacucProcedurePersonResponsible);\n }\n }\n }\n }", "@Override\n\t@Transactional\n\tpublic List callProcR(String proc, List<String> paras) {\n\t\tSession session = getHibernateTemplate().getSessionFactory().openSession();\n\t\t// Transaction tx = session.beginTransaction();\n\t\tSQLQuery q = session.createSQLQuery(\"{call \" + proc + \"(?) }\");\n\t\tif (paras != null) {\n\t\t\tint i = 0;\n\t\t\tfor (String para : paras) {\n\t\t\t\tq.setString(i++, para);\n\t\t\t}\n\t\t}\n\t\treturn q.list();\n\n\t}", "public static void addSystemProcedures(IProcedure procedure) {\r\n\t\tsystemProcedures.add(procedure);\r\n\t}", "private void addStudyGroupProceduresForSpecies(IacucProtocol protocol) {\n for(IacucProtocolSpeciesStudyGroup protocolStudyGroupSpecies : protocol.getIacucProtocolStudyGroupSpeciesList()) {\n protocolStudyGroupSpecies.setResponsibleProcedures(new ArrayList<IacucProtocolStudyGroupBean>());\n Integer speciesCode = protocolStudyGroupSpecies.getSpeciesCode();\n protocolStudyGroupSpecies.getResponsibleProcedures().addAll(getStudyGroupProceduresForSpecies(protocol, speciesCode));\n }\n }", "@Override\n\t@Transactional\n\tpublic void callProc(String proc, List<String> paras) {\n\t\tSession session = getHibernateTemplate().getSessionFactory().openSession();\n\t\t// Transaction tx = session.beginTransaction();\n\t\tSQLQuery q = session.createSQLQuery(\"{call \" + proc + \" }\");\n\t\tif (paras != null) {\n\t\t\tint i = 0;\n\t\t\tfor (String para : paras) {\n\t\t\t\tq.setString(i++, para);\n\t\t\t}\n\t\t}\n\t\tq.executeUpdate();\n\n\t}", "public Patient() {\n }", "public interface PatientService {\n\n /**\n * 新增病人获取ID\n *\n * @return\n */\n Long getNewPid(Patient patient);\n\n /**\n * 新增病人\n *\n * @param patient\n * @return\n */\n JSONObject newPatient(Patient patient);\n\n\n /**\n * 复诊输入病人条件查询\n *\n * @param patient\n * @return\n */\n JSONObject revisit(Patient patient);\n\n\n /**\n * 获取地址列表\n * @return\n */\n JSONObject getPlace();\n\n\n /**\n * 获取病人列表\n * @return\n */\n JSONObject getPatientList(String pName,Integer pageSize,Integer pageNum);\n\n\n /**\n * 获取病人基本信息\n * @param pId\n * @return\n */\n JSONObject getPatientInfo(Long pId);\n\n /**\n * 更新病人基本信息\n * @param patient\n * @return\n */\n JSONObject updatePatientInfo(Patient patient);\n\n\n /**\n * 复诊时,有重复条件者获取病人列表\n */\n JSONObject getRevisitList(Patient patient,Integer pageSize,Integer pageNum);\n\n\n /**\n * 删除病人\n * @param patientId\n * @return\n */\n JSONObject deletePatient(Long patientId);\n\n /**\n * 将选中的病人的病历保存到Word文档\n */\n void saveObjToWord(List<Long> inquiryIdList, boolean all,Long patientId, HttpServletResponse response);\n}", "public CodingDt addProcedure() {\n\t\tCodingDt newType = new CodingDt();\n\t\tgetProcedure().add(newType);\n\t\treturn newType; \n\t}", "public void addProcedure(Procedure procedure) {\n String nameInLowerCase = Ascii.toLowerCase(procedure.getName());\n Preconditions.checkState(!registered);\n Preconditions.checkArgument(!procedures.containsKey(nameInLowerCase));\n procedures.put(nameInLowerCase, procedure);\n }", "private IacucProcedurePersonResponsible getNewPersonResponsibleProcedure(IacucProtocolPerson protocolPerson, IacucProtocolStudyGroup iacucProtocolStudyGroup) {\n IacucProcedurePersonResponsible resposibleProcedure = new IacucProcedurePersonResponsible();\n setAttributesForPersonResponsibleProcedure(resposibleProcedure, protocolPerson, iacucProtocolStudyGroup);\n return resposibleProcedure;\n }", "Patient save(Patient patient);", "private void setLocationProceduresBySpecies(IacucProtocol iacucProtocol, List<IacucProtocolStudyGroup> iacucProtocolStudyGroups) {\n for(IacucProtocolStudyGroupLocation iacucProtocolStudyGroupLocation : iacucProtocol.getIacucProtocolStudyGroupLocations()) {\n List<IacucProtocolSpeciesStudyGroup> iacucProtocolSpeciesStudyGroups = getListOfProcedureStudyBySpecies(iacucProtocolStudyGroups);\n iacucProtocolStudyGroupLocation.setProcedureDetails(getLocationProcedureDetails(iacucProtocolSpeciesStudyGroups, iacucProtocolStudyGroupLocation));\n iacucProtocolStudyGroupLocation.setAllProceduresSelected(isAllProceduresChecked(iacucProtocolStudyGroupLocation.getProcedureDetails()));\n }\n }", "private static void changePatient(){\r\n // opretter ny instans af tempPatinet som overskriver den gamle\r\n Patient p = new Patient(); // det her kan udskiftes med en nulstil funktion for at forsikre at der altid kun er en patient.\r\n Patient.setCprNumber((Long) null);\r\n }", "public void setProcedure(String Procedure) {\n this.Procedure = Procedure;\n }", "public void visitProcedureNode(DeclNode.ProcedureNode node) {\n beginGen(\"Procedure\");\n // Generate code for the block\n Code code = visitBlockNode(node.getBlock());\n code.generateOp(Operation.RETURN);\n procedures.addProcedure(node.getProcEntry(), code);\n endGen(\"Procedure\");\n }", "public final void mPROCEDURE() throws RecognitionException {\n try {\n int _type = PROCEDURE;\n // /Users/benjamincoe/HackWars/C.g:14:11: ( 'procedure' )\n // /Users/benjamincoe/HackWars/C.g:14:13: 'procedure'\n {\n match(\"procedure\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "@POST\n @Path(\"patients\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(\"application/json\")\n public Patient newPatient(Patient pat){\n serv.editPatient(pat);\n return pat;\n }", "private void addProceduresDetails(List<IacucProtocolStudyGroup> iacucProtocolStudyGroups, List<IacucProtocolStudyGroupBean> protocolStudyGroups, \n IacucProtocolStudyGroupBean protocolStudyGroupBean) {\n if(!iacucProtocolStudyGroups.isEmpty()) {\n IacucProtocolStudyGroupBean newProtocolStudyGroupBean = getNewProtocolStudyGroupBean(protocolStudyGroupBean);\n newProtocolStudyGroupBean.getIacucProtocolStudyGroups().addAll(iacucProtocolStudyGroups);\n protocolStudyGroups.add(newProtocolStudyGroupBean);\n }\n }", "public List<List<ChartProcedure>> viewUpcomingChartProcedures() {\r\n\r\n\t\tSet<AppliedChart> charts = instance.getAppliedCharts();\r\n\r\n\t\tList<List<ChartProcedure>> procedures = new ArrayList<List<ChartProcedure>>();\r\n\r\n\t\t/*\r\n\t\tfor (AppliedChart appliedChart : charts) {\r\n\t\t\tDate beginDate = appliedChart.getDateCreated();\r\n\t\t\t\r\n\t\t\tList<ChartProcedure> proceduresOfType = new ArrayList<ChartProcedure>();\r\n\r\n\t\t\tSet<ChartItem> items = appliedChart.getChart().getChartItems();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (ChartItem chartItem : items) {\r\n\t\t\t\t\r\n\t\t\t\tint duration = chartItem.getDuration();\r\n\r\n\t\t\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\t\t\tChartProcedure procedure = new ChartProcedure();\r\n\t\t\t\t\tDateTime dt = new DateTime();\r\n\t\t\t\t\tprocedure.setDueDate(dt.plusMinutes((int) (duration * i\r\n\t\t\t\t\t\t\t* chartItem.getFrequencyPeriod().getValue())).toDate());\r\n\t\t\t\t\tprocedure.setPatient(instance);\r\n\t\t\t\t\t\r\n\t\t\t\t\tprocedure.setChartItem(chartItem);\r\n\t\t\t\t\tproceduresOfType.add(procedure);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprocedures.add(proceduresOfType);\r\n\t\t}\r\n\t\t*/\r\n\t\treturn procedures;\r\n\t}", "public void createNew(PatientBO patient)\n {\n _dietTreatment = new DietTreatmentBO();\n _dietTreatment.setPatient(patient);\n setPatient(patient);\n }", "public static void main(String[] args) {\n\t\tPatient Timmy = new Patient();\r\n\t\tSystem.out.println(\"Patient ID: \" + Timmy.getID() +\r\n\t\t\t\t\"\\nPatient Age: \" + Timmy.getAge());\r\n\t\tTimmy.displayBlood();\r\n\t\t\r\n\t\t//Patient spike has its own set of values\r\n\t\tPatient Spike = new Patient(1337,19,RhFactor.NEGATIVE, BloodType.AB);\r\n\t\tSystem.out.println(\"Patient ID: \" + Spike.getID() + \"\\nPatientAge: \" + Spike.getAge());\r\n\t\tSpike.displayBlood();\r\n\t}", "public boolean addPaient(Patient patient) throws TooManyExceptions;", "@Override\n\tpublic void addPatients(String name, int id, Long mobilenumber, int age) {\n\t\t\n\t}", "private void synchronizeProcedurePersonnel(IacucProtocol sourceProtocol, IacucProtocol destProtocol) {\n HashMap<String, IacucProtocolPerson> newProtocolPersons = getProtocolPersons(sourceProtocol); \n for(ProtocolPersonBase protocolPersonBase : destProtocol.getProtocolPersons()) {\n IacucProtocolPerson destIacucProtocolPerson = (IacucProtocolPerson)protocolPersonBase;\n IacucProtocolPerson sourceIacucProtocolPerson = newProtocolPersons.get(destIacucProtocolPerson.getPersonId());\n destIacucProtocolPerson.setProcedureQualificationDescription(sourceIacucProtocolPerson.getProcedureQualificationDescription());\n }\n }", "private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"te@te.te\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}", "public void mostrarInformacion(){\n mostrarInformacionP();\n }", "public final void mT__142() throws RecognitionException {\n try {\n int _type = T__142;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:112:8: ( 'procedure' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:112:10: 'procedure'\n {\n match(\"procedure\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void rule__AstProcedure__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9514:1: ( ( 'procedure' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9515:1: ( 'procedure' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9515:1: ( 'procedure' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9516:1: 'procedure'\n {\n before(grammarAccess.getAstProcedureAccess().getProcedureKeyword_1()); \n match(input,72,FOLLOW_72_in_rule__AstProcedure__Group__1__Impl19489); \n after(grammarAccess.getAstProcedureAccess().getProcedureKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public interface PatientDAO {\n\n List<Patient> getPatient();\n\n\n void addPatient(Patient patient);\n\n public Patient getPatient(int patientId);\n\n List<Patient> getPatientsByLastName(String lastName);\n\n void deletePatient(int theId);\n}", "protected void contructPatientInstance() {\r\n\t\tResources resources = getApplicationContext().getResources();\r\n\t\r\n \t// constuct the patient instance\r\n try {\r\n \tsetPatientAssessment((new PatientHandlerUtils()).populateCcmPatientDetails(resources, getReviewItems()));\t\r\n\t\t} catch (ParseException e) {\r\n\t\t\tLoggerUtils.i(LOG_TAG, \"Parse Exception thrown whilst constructing patient instance\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main (String[] arg){\n\n Personnage[] tpers = {new Guerrier(),new Sniper(),new Chirirugien(),new Medecin(), new Civil()};\n\n for (Personnage p : tpers) {\n\n System.out.println(\"\\t Instancier de\" +p.getClass().getName());\n System.out.println(\"********************************\");\n p.seDeplacer();\n p.soigne();\n p.combattre();\n\n\n }\n System.out.println(\"********************************\");\n Personnage pers = new Guerrier();\n pers.soigne();\n pers.setSoin(new Operation(\n\n ));\n pers.soigne();\n }", "public void addPatient()\n {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter name of patient\");\n String name=sc.nextLine();\n int pos,id;\n\n do\n {\n System.out.println(\"Enter doctor id to assign to\");\n id=sc.nextInt();\n pos=checkDoctor(id);\n if(pos==-1)\n System.out.println(\"Invalid doctor id\");\n }\n while(pos==-1);\n String docname=doc.get(pos).getName();\n Patient p=new Patient(name,id,docname);\n pt.add(p);\n\n }", "public boolean createPatient(Patient patient,PatientRecord patientRecord) {\r\n\t\tboolean isCreated= false;\r\n\t\tString[] row= new String[9];\r\n\t\ttry {\r\n\t\t\tString query = \"INSERT INTO patients VALUES (?,?,?,?,?,?,?,?,?,?,?,?)\";\r\n\t\t\tPreparedStatement pStatement= super.getConnection().prepareStatement(query);\r\n\t\t\tpStatement.setInt(1, patient.getId());\r\n\t\t\tpStatement.setString(2, patient.getFirstName());\r\n\t\t\tpStatement.setString(3, patient.getLastName());\r\n\t\t\tpStatement.setString(4, patient.getGender());\r\n\t\t\tpStatement.setInt(5, patient.getAge());\r\n\t\t\tpStatement.setString(6, patient.getPhone());\r\n\t\t\tpStatement.setString(7, patient.getAddress().getVillege());\r\n\t\t\tpStatement.setString(8, patient.getAddress().getCommune());\r\n\t\t\tpStatement.setString(9, patient.getAddress().getCity());\r\n\t\t\tpStatement.setString(10, patient.getAddress().getProvince());\r\n\t\t\tpStatement.setString(11, patient.getAddress().getCountry());\r\n\t\t\tpStatement.setString(12, patient.getType());\r\n\t\t\t\r\n\t\t\tif(pStatement.executeUpdate() > 0) {\r\n\t\t\t\tpatientID.add(patient.getId());\r\n\t\t\t\trow[0]= patient.getId()+\"\";\r\n\t\t\t\trow[1]= patient.getFirstName();\r\n\t\t\t\trow[2]= patient.getLastName();\r\n\t\t\t\trow[3]= patient.getGender();\r\n\t\t\t\trow[4]= patient.getAge()+\"\";\r\n\t\t\t\trow[5]= patientRecord.getDate()+\"\";\r\n\t\t\t\trow[6]= patient.getPhone();\r\n\t\t\t\tmodelPatient.addRow(row);\r\n\t\t\t\tisCreated= true;\r\n\t\t\t\tSystem.out.println(\"You have insert a patient record\");\r\n\t\t\t\t\r\n\t\t\t};\r\n\t\t}catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn isCreated;\r\n\t}", "public R visit(Procedure n) {\n R _ret=null;\n coming_from_stmt_list=0;\n coming_from_procedure=1;\n String s0 = (String)n.f0.accept(this);\n coming_from_stmt_list=0; \n n.f1.accept(this);\n String s2 = (String)n.f2.accept(this);\n System.out.println(\" [ \"+s2+\" ] \");\n System.out.println(\"BEGIN\");\n n.f3.accept(this);\n String s4 = (String)n.f4.accept(this);\n System.out.println(\"RETURN \"+s4);\n System.out.println(\"END\");\n return _ret;\n }", "public final EObject ruleProcedure() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n Token otherlv_3=null;\n Token otherlv_6=null;\n EObject lv_params_4_0 = null;\n\n EObject lv_ins_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2411:28: ( (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:1: (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:1: (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:3: otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure'\n {\n otherlv_0=(Token)match(input,55,FOLLOW_55_in_ruleProcedure5003); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getProcedureAccess().getProcedureKeyword_0());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2416:1: ( (lv_name_1_0= RULE_ID ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2417:1: (lv_name_1_0= RULE_ID )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2417:1: (lv_name_1_0= RULE_ID )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2418:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleProcedure5020); \n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getProcedureAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getProcedureRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,20,FOLLOW_20_in_ruleProcedure5037); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getProcedureAccess().getWithKeyword_2());\n \n otherlv_3=(Token)match(input,56,FOLLOW_56_in_ruleProcedure5049); \n\n \tnewLeafNode(otherlv_3, grammarAccess.getProcedureAccess().getParamsKeyword_3());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2442:1: ( (lv_params_4_0= ruleParameters ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2443:1: (lv_params_4_0= ruleParameters )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2443:1: (lv_params_4_0= ruleParameters )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2444:3: lv_params_4_0= ruleParameters\n {\n \n \t newCompositeNode(grammarAccess.getProcedureAccess().getParamsParametersParserRuleCall_4_0()); \n \t \n pushFollow(FOLLOW_ruleParameters_in_ruleProcedure5070);\n lv_params_4_0=ruleParameters();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getProcedureRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"params\",\n \t\tlv_params_4_0, \n \t\t\"Parameters\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2460:2: ( (lv_ins_5_0= ruleInstructions ) )+\n int cnt34=0;\n loop34:\n do {\n int alt34=2;\n int LA34_0 = input.LA(1);\n\n if ( ((LA34_0>=16 && LA34_0<=19)||(LA34_0>=21 && LA34_0<=22)||LA34_0==24||LA34_0==35||LA34_0==40||(LA34_0>=48 && LA34_0<=53)||LA34_0==55) ) {\n alt34=1;\n }\n\n\n switch (alt34) {\n \tcase 1 :\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2461:1: (lv_ins_5_0= ruleInstructions )\n \t {\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2461:1: (lv_ins_5_0= ruleInstructions )\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2462:3: lv_ins_5_0= ruleInstructions\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getProcedureAccess().getInsInstructionsParserRuleCall_5_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleInstructions_in_ruleProcedure5091);\n \t lv_ins_5_0=ruleInstructions();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getProcedureRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"ins\",\n \t \t\tlv_ins_5_0, \n \t \t\t\"Instructions\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt34 >= 1 ) break loop34;\n EarlyExitException eee =\n new EarlyExitException(34, input);\n throw eee;\n }\n cnt34++;\n } while (true);\n\n otherlv_6=(Token)match(input,57,FOLLOW_57_in_ruleProcedure5104); \n\n \tnewLeafNode(otherlv_6, grammarAccess.getProcedureAccess().getEndProcedureKeyword_6());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public static void sendData(Program ProgramCur, Patient pat) throws Exception {\n String path = Programs.getProgramPath(ProgramCur);\n ArrayList ForProgram = ProgramProperties.getForProgram(ProgramCur.ProgramNum);\n ;\n if (pat == null)\n {\n MessageBox.Show(\"Please select a patient first\");\n return ;\n }\n \n //The path is available in the registry, but we'll just make the user enter it.\n if (!File.Exists(path))\n {\n MessageBox.Show(\"Could not find \" + path);\n return ;\n }\n \n //Make sure the program is running\n if (Process.GetProcessesByName(\"DentalEye\").Length == 0)\n {\n Process.Start(path);\n Thread.Sleep(TimeSpan.FromSeconds(4));\n }\n \n //command=\"[Add][PatNum][Fname][Lname][Address|Address2|City, ST Zip][phone1][phone2][mobile phone][email][sex(M/F)][birthdate (YYYY-MM-DD)]\"\n ProgramProperty PPCur = ProgramProperties.getCur(ForProgram,\"Enter 0 to use PatientNum, or 1 to use ChartNum\");\n ;\n String patID = new String();\n if (StringSupport.equals(PPCur.PropertyValue, \"0\"))\n {\n patID = pat.PatNum.ToString();\n }\n else\n {\n if (StringSupport.equals(pat.ChartNumber, \"\"))\n {\n MessageBox.Show(\"ChartNumber for this patient is blank.\");\n return ;\n }\n \n patID = pat.ChartNumber;\n } \n String command = \"[Add][\" + patID + \"]\" + \"[\" + pat.FName + \"]\" + \"[\" + pat.LName + \"]\" + \"[\" + pat.Address + \"|\";\n if (!StringSupport.equals(pat.Address2, \"\"))\n {\n command += pat.Address2 + \"|\";\n }\n \n command += pat.City + \", \" + pat.State + \" \" + pat.Zip + \"]\" + \"[\" + pat.HmPhone + \"]\" + \"[\" + pat.WkPhone + \"]\" + \"[\" + pat.WirelessPhone + \"]\" + \"[\" + pat.Email + \"]\";\n if (pat.Gender == PatientGender.Female)\n command += \"[F]\";\n else\n command += \"[M]\"; \n command += \"[\" + pat.Birthdate.ToString(\"yyyy-MM-dd\") + \"]\";\n try\n {\n //MessageBox.Show(command);\n //Create a context that uses a dedicated thread for DDE message pumping.\n DdeContext context = new DdeContext();\n try\n {\n {\n //Create a client.\n DdeClient client = new DdeClient(\"DENTEYE\", \"Patient\", context);\n try\n {\n {\n //Establish the conversation.\n client.Connect();\n //Add patient or modify if already exists\n client.Execute(command, 2000);\n //timeout 2 secs\n //Then, select patient\n command = \"[Search][\" + patID + \"]\";\n client.Execute(command, 2000);\n }\n }\n finally\n {\n if (client != null)\n Disposable.mkDisposable(client).dispose();\n \n }\n }\n }\n finally\n {\n if (context != null)\n Disposable.mkDisposable(context).dispose();\n \n }\n }\n catch (Exception __dummyCatchVar0)\n {\n }\n \n }", "public static List<String> getProcedures(final String toAppend) {\n return appendAll(PROCEDURES, toAppend);\n }", "@Test\n public void testCreatePatient() throws Exception {\n System.out.println(\"createPatient\");\n String wscaller = \"\";\n String nom = \"\";\n Integer num_secu = null;\n String adresse = \"\";\n String email = \"\";\n String telephone = \"\";\n String code_postal = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MonWebService instance = (MonWebService)container.getContext().lookup(\"java:global/classes/MonWebService\");\n String expResult = \"\";\n String result = instance.createPatient(wscaller, nom, num_secu, adresse, email, telephone, code_postal);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void demo1() {\n\n\t\tConnection con = null;\n\t\t\n\t\ttry {\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"scott\",\"tiger\");\n\n\t\t\tCallableStatement cs = con.prepareCall(\"CALL p1()\");\n\t\t\tcs.execute();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//DbUtils.closeConnection();\n\t\t}\n\n\t}", "public Patient() {\n\t\tsuper();\n\t\t/*\n\t\t * TODO initialize lists\n\t\t */\n\t\ttreatments = Collections.emptyList();\n\t}", "public java.util.List<CodingDt> getProcedure() { \n\t\tif (myProcedure == null) {\n\t\t\tmyProcedure = new java.util.ArrayList<CodingDt>();\n\t\t}\n\t\treturn myProcedure;\n\t}", "public Long addPatient(long pid, String name, Date dob, int age) throws PatientExn;", "public void addPatient(Patient P)\r\n {\r\n\t int age =0;\r\n\t String secQ =\"What is your favorite food?\";\r\n\t String newPat = \"INSERT INTO PATIENTDATA (FIRSTNAME,LASTNAME,AGE,USERNAME,PASSWORD,SECURITYQN,SECURITYANS,\"+\r\n\t\t\t \t\t \"SYMPTOM1,SYMPTOM2,SYMPTOM3,SYMPTOM4,SYMPTOM5,SYMPTOM6,SYMPTOM7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM1_1,PrevSYMPTOM1_2,PrevSYMPTOM1_3,PrevSYMPTOM1_4,PrevSYMPTOM1_5,PrevSYMPTOM1_6,PrevSYMPTOM1_7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM2_1,PrevSYMPTOM2_2,PrevSYMPTOM2_3,PrevSYMPTOM2_4,PrevSYMPTOM2_5,PrevSYMPTOM2_6,PrevSYMPTOM2_7,\"+\r\n\t\t\t \t\t \"SYMPTOM1Thresh,SYMPTOM2Thresh,SYMPTOM3Thresh,SYMPTOM4Thresh,SYMPTOM5Thresh,SYMPTOM6Thresh,SYMPTOM7Thresh, DOCTORSNAME, NOTIFICATION ) \"; //added notification\r\n\t newPat = newPat+\"VALUES ('\"+P.firstName+\"', '\"+P.lastName+\"', \"+age+\", '\"+P.userName+\"', '\"+P.password+\"', '\"+secQ+\"', '\"+P.securityQuestionAnswer+\"',\"\r\n\t\t\t \t\t +P.getEnterSymptomLevel()[0]+\",\"+P.getEnterSymptomLevel()[1]+\",\"+P.getEnterSymptomLevel()[2]+\",\"+P.getEnterSymptomLevel()[3]+\",\"+P.getEnterSymptomLevel()[4]+\",\"+P.getEnterSymptomLevel()[5]+\",\"+P.getEnterSymptomLevel()[6]+\r\n\t\t\t \t\t\t\",\" +P.getPreviousSymptomLevel1()[0]+\",\"+P.getPreviousSymptomLevel1()[1]+\",\"+P.getPreviousSymptomLevel1()[2]+\",\"+P.getPreviousSymptomLevel1()[3]+\",\"+P.getPreviousSymptomLevel1()[4]+\",\"+P.getPreviousSymptomLevel1()[5]+\",\"+P.getPreviousSymptomLevel1()[6]+\",\"\r\n\t\t\t \t\t\t+P.getPreviousSymptomLevel2()[0]+\",\"+P.getPreviousSymptomLevel2()[1]+\",\"+P.getPreviousSymptomLevel2()[2]+\",\"+P.getPreviousSymptomLevel2()[3]+\",\"+P.getPreviousSymptomLevel2()[4]+\",\"+P.getPreviousSymptomLevel2()[5]+\",\"+P.getPreviousSymptomLevel2()[6]+\",\"\r\n\t\t\t \t\t\t+P.getSymptomsThreshold()[0]+\",\"+P.getSymptomsThreshold()[1]+\",\"+P.getSymptomsThreshold()[2]+\",\"+P.getSymptomsThreshold()[3]+\",\"+P.getSymptomsThreshold()[4]+\",\"+P.getSymptomsThreshold()[5]+\",\"+P.getSymptomsThreshold()[6]+\",'\"+P.getPatientsDoctor()+\"',0);\";\r\n\t \r\n\t try {\r\n\t\tstmt.executeUpdate(newPat);\r\n\t} catch (SQLException e) {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "public void createPPF(){\n\t\tSystem.out.println(\"HDFC:: createed ppf\");\n\t}", "private void groupProcedureStudyBySpecies(IacucProtocol iacucProtocol) {\n for(IacucProtocolStudyGroupBean iacucProtocolStudyGroupBean : iacucProtocol.getIacucProtocolStudyGroups()) {\n groupProcedureStudyBySpecies(iacucProtocolStudyGroupBean);\n }\n }", "@Override\n\tpublic List<Component> caseProcedure(Procedure procedure) {\n\t\tsuper.caseProcedure(procedure);\n\t\treturn componentList;\n\t}", "Operacion createOperacion();", "public static final void LoadProcedures(Connection conn) throws SQLException {\n\t\t/*\n\t\t * REGEXP procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure REGEXP\");\n\t\tFunction.create(conn, \"REGEXP\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 2 ) {\n\t\t\t\t\tthrow new SQLException(\"REGEXP requires 2 String parameters\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_TEXT ) {result(0); return;}}\n\t\t\t\tString exp = value_text(0);\n\t\t\t\tString str = value_text(1);\n\t\t\t\tresult((str.matches(exp))? 1: 0);\n\t\t\t}\n\t\t});\n\t\t/*\n\t\t * corner00_ra procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner00_ra\");\n\t\tFunction.create(conn, \"corner00_ra\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 4 ) {\n\t\t\t\t\tthrow new SQLException(\"corner00_ra requires 4 double parameters in degrees\");\n\t\t\t\t}\t\t\t\t\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner00_ra(value_double(0), value_double(1), value_double(2), value_double(3)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner00_ra: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t/*\n\t\t * corner00_dec procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner00_dec\");\n\t\tFunction.create(conn, \"corner00_dec\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 2 ) {\n\t\t\t\t\tthrow new SQLException(\"corner00_dec requires 2 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner00_dec(value_double(0), value_double(1)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner00_dec: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * corner01_ra procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner01_ra\");\n\t\tFunction.create(conn, \"corner01_ra\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 4 ) {\n\t\t\t\t\tthrow new SQLException(\"corner01_ra requires 4 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner01_ra(value_double(0), value_double(1), value_double(2), value_double(3)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner01_ra: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * corner01_dec procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner01_dec\");\n\t\tFunction.create(conn, \"corner01_dec\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 2 ) {\n\t\t\t\t\tthrow new SQLException(\"corner01_dec requires 2 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner01_dec(value_double(0), value_double(1)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner01_dec: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * corner10_ra procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner10_ra\");\n\t\tFunction.create(conn, \"corner10_ra\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 4 ) {\n\t\t\t\t\tthrow new SQLException(\"corner10_ra requires 4 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner10_ra(value_double(0), value_double(1), value_double(2), value_double(3)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner10_ra: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * corner10_dec procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner10_dec\");\n\t\tFunction.create(conn, \"corner10_dec\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 2 ) {\n\t\t\t\t\tthrow new SQLException(\"corner10_dec requires 2 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner10_dec(value_double(0), value_double(1)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner10_dec: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * corner11_ra procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner11_ra\");\n\t\tFunction.create(conn, \"corner11_ra\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 4 ) {\n\t\t\t\t\tthrow new SQLException(\"corner11_ra requires 4 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner11_ra(value_double(0), value_double(1), value_double(2), value_double(3)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner11_ra: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * corner11_dec procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure corner11_dec\");\n\t\tFunction.create(conn, \"corner11_dec\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 2 ) {\n\t\t\t\t\tthrow new SQLException(\"corner11_dec requires 2 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.corner11_dec(value_double(0), value_double(1)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"corner11_dec: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * distancedegree procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure distancedegree\");\n\t\tFunction.create(conn, \"distancedegree\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 4 ) {\n\t\t\t\t\tthrow new SQLException(\"distancedegree requires 4 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.distancedegree(value_double(0), value_double(1), value_double(2), value_double(3)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"distancedegree: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * tileleftborder procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure tileleftborder\");\n\t\tFunction.create(conn, \"tileleftborder\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 4 ) {\n\t\t\t\t\tthrow new SQLException(\"tileleftborder requires 4 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.tileleftborder(value_double(0), value_double(1), value_double(2), value_double(3)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"tileleftborder: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * tileleftborder procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure tilerightborder\");\n\t\tFunction.create(conn, \"tilerightborder\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 4 ) {\n\t\t\t\t\tthrow new SQLException(\"tilerightborder requires 4 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.DOUBLE); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.tilerightborder(value_double(0), value_double(1), value_double(2), value_double(3)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"tilerightborder: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * isinbox procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure isinbox\");\n\t\tFunction.create(conn, \"isinbox\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 6 ) {\n\t\t\t\t\tthrow new SQLException(\"isinbox requires 6 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(0); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.isinbox(value_double(0), value_double(1), value_double(2), value_double(3), value_double(4), value_double(5)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"isinbox: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * getmjd procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure getmjd\");\n\t\tFunction.create(conn, \"getmjd\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 1 ) {\n\t\t\t\t\tthrow new SQLException(\"getmjd requires 1 double parameters\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(SaadaConstant.STRING); return;}}\n\t\t\t\tresult(Procedures.getmjd(value_double(0)));\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * boxcenter procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure boxcenter\");\n\t\tFunction.create(conn, \"boxcenter\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 7 ) {\n\t\t\t\t\tthrow new SQLException(\"boxcenter requires 7 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(0); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.boxcenter(value_double(0), value_double(1), value_double(2), value_double(3), value_double(4), value_double(5), value_double(6)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"boxcenter: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * boxcovers procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure boxcovers\");\n\t\tFunction.create(conn, \"boxcovers\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 7 ) {\n\t\t\t\t\tthrow new SQLException(\"boxcovers requires 7 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(0); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.boxcovers(value_double(0), value_double(1), value_double(2), value_double(3), value_double(4), value_double(5), value_double(6)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"boxcovers: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * boxenclosed procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure boxenclosed\");\n\t\tFunction.create(conn, \"boxenclosed\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 7 ) {\n\t\t\t\t\tthrow new SQLException(\"boxenclosed requires 7 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(0); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.boxenclosed(value_double(0), value_double(1), value_double(2), value_double(3), value_double(4), value_double(5), value_double(6)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"boxenclosed: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t/*\n\t\t * boxoverlaps procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure boxoverlaps\");\n\t\tFunction.create(conn, \"boxoverlaps\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 7 ) {\n\t\t\t\t\tthrow new SQLException(\"boxoverlaps requires 7 double parameters in degrees\");\n\t\t\t\t}\n\t\t\t\tfor( int i=0 ; i<nba ; i++ ) { if( value_type(i) != SQLITE_FLOAT && value_type(i) != SQLITE_INT ) {result(0); return;}}\n\t\t\t\ttry {\n\t\t\t\t\tresult(Procedures.boxoverlaps(value_double(0), value_double(1), value_double(2), value_double(3), value_double(4), value_double(5), value_double(6)));\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tMessenger.printMsg(Messenger.ERROR, \"boxoverlaps: \" + e.getMessage());\n\t\t\t\t\tresult(0);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\n\t\t/*\n\t\t * string format procedure\n\t\t */\n\t\tif (Messenger.debug_mode)\n\t\t\tMessenger.printMsg(Messenger.DEBUG, \"loading procedure sprintf\");\n\t\tFunction.create(conn, \"sprintf\", new Function() {\n\t\t\t@Override\n\t\t\tpublic void xFunc() throws SQLException {\n\t\t\t\tint nba = args();\n\t\t\t\tif( nba != 2 ) {\n\t\t\t\t\tthrow new SQLException(\"sprintf requires 2 parameters (one string and one either text, int or double\");\n\t\t\t\t}\n\t\t\t\tif( value_type(0) != SQLITE_TEXT ) {result(0); return;}\n\t\t\t\tswitch(value_type(1)){\n\t\t\t\tcase SQLITE_FLOAT: result(String.format(value_text(0), value_double(1))); break;\n\t\t\t\tcase SQLITE_INT : result(String.format(value_text(0), value_int(1))); break;\n\t\t\t\tcase SQLITE_TEXT : result(String.format(value_text(0), value_text(1))); break;\n\t\t\t\tdefault: throw new SQLException(\"2nd parameter must be either a text, an int ora double\");\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t}", "public static Long createPregnancy(Connection conn, Map queries, EncounterData vo, Long patientId, Date dateVisit, String userName, Long siteId) throws ServletException, SQLException {\r\n Long pregnancyId;\r\n String sqlCreatePregnancy = (String) queries.get(\"SQL_CREATE_PREGNANCY\");\r\n Pregnancy pregnancy = vo.getPregnancy();\r\n String pregnancyUuid = null;\r\n if (pregnancy != null) {\r\n pregnancyUuid = pregnancy.getUuid();\r\n } else {\r\n \tUUID uuid = UUID.randomUUID();\r\n pregnancyUuid = uuid.toString();\r\n }\r\n ArrayList pregnancyValues = new ArrayList();\r\n // add patient_id to pregnancyValues\r\n pregnancyValues.add(patientId);\r\n // add date_visit to pregnancyValues\r\n pregnancyValues.add(dateVisit);\r\n FormDAO.AddAuditInfo(vo, pregnancyValues, userName, siteId);\r\n // adds uuid\r\n pregnancyValues.add(pregnancyUuid);\r\n pregnancyId = (Long) DatabaseUtils.create(conn, sqlCreatePregnancy, pregnancyValues.toArray());\r\n return pregnancyId;\r\n }", "void dischargePatient(int id);", "public Patient() {\n this(DSL.name(\"patient\"), null);\n }", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public interface ForgetPsdSecondPresenter {\n\n void checkPsd(String phone,String smsCode, String newPsd, String confirmPsd);\n\n void checkCaptchas(String phone, String smsCode);\n}", "public interface ContServiceDataImpulseImportRepository extends JpaRepository<ContServiceDataImpulseImport, Long> {\n\n @Modifying\n @Procedure(name = \"importImpulseData\")\n void processImport(@Param(\"par_session_uuid\") String sessionUUID);\n\n}", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public interface IPerson {\n\n void edir();\n\n void create();\n\n void delete();\n\n}", "public void create(Person p) {\n\t\t\n\t}", "private static void crearPedidoGenerandoOPP() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25 };\n\t\tint[] cantidades = { 7 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 2\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "Programming(){\n\t}", "public void registerNewPatients(int numberPatients, List<String> secondaryNames,\n BeanItemContainer<NewIvacSampleBean> samplesToRegister, String space, String description,\n Map<String, List<String>> hlaTyping) {\n String projectPrefix = spaceToProjectPrefixMap.get(space);\n\n // extract to function for that\n List<Integer> projectCodes = new ArrayList<Integer>();\n for (Project p : getOpenBisClient().getProjectsOfSpace(space)) {\n // String maxValue = Collections.max(p.getCode());\n String maxValue = p.getCode().replaceAll(\"\\\\D+\", \"\");\n int codeAsNumber;\n try {\n codeAsNumber = Integer.parseInt(maxValue);\n } catch (NumberFormatException nfe) {\n // bad data - set to sentinel\n codeAsNumber = 0;\n }\n\n projectCodes.add(codeAsNumber);\n }\n\n int numberOfProject;\n\n if (projectCodes.size() == 0) {\n numberOfProject = 0;\n } else {\n numberOfProject = Collections.max(projectCodes);\n }\n\n for (int i = 0; i < numberPatients; i++) {\n Map<String, Object> projectMap = new HashMap<String, Object>();\n Map<String, Object> firstLevel = new HashMap<String, Object>();\n\n numberOfProject += 1;\n int numberOfRegisteredExperiments = 1;\n int numberOfRegisteredSamples = 1;\n\n // register new patient (project), project prefixes differ in length\n String newProjectCode =\n projectPrefix + Utils.createCountString(numberOfProject, 5 - projectPrefix.length());\n\n projectMap.put(\"code\", newProjectCode);\n projectMap.put(\"space\", space);\n projectMap.put(\"desc\", description + \" [\" + secondaryNames.get(i) + \"]\");\n projectMap.put(\"user\", PortalUtils.getUser().getScreenName());\n\n // call of ingestion service to register project\n this.getOpenBisClient().triggerIngestionService(\"register-proj\", projectMap);\n // helpers.Utils.printMapContent(projectMap);\n\n String newProjectDetailsCode =\n projectPrefix + Utils.createCountString(numberOfProject, 3) + \"E_INFO\";\n String newProjectDetailsID = \"/\" + space + \"/\" + newProjectCode + \"/\" + newProjectDetailsCode;\n\n String newExperimentalDesignCode = projectPrefix + Utils.createCountString(numberOfProject, 3)\n + \"E\" + numberOfRegisteredExperiments;\n String newExperimentalDesignID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newExperimentalDesignCode;\n numberOfRegisteredExperiments += 1;\n\n // String newBiologicalEntitiyCode =\n // newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"H\";\n // String newBiologicalEntitiyID =\n // \"/\" + space + \"/\" + newBiologicalEntitiyCode\n // + helpers.BarcodeFunctions.checksum(newBiologicalEntitiyCode);\n String newBiologicalEntitiyID =\n String.format(\"/\" + space + \"/\" + \"%sENTITY-1\", newProjectCode);\n\n numberOfRegisteredSamples += 1;\n\n // register first level of new patient\n firstLevel.put(\"lvl\", \"1\");\n firstLevel.put(\"projectDetails\", newProjectDetailsID);\n firstLevel.put(\"experimentalDesign\", newExperimentalDesignID);\n firstLevel.put(\"secondaryName\", secondaryNames.get(i));\n firstLevel.put(\"biologicalEntity\", newBiologicalEntitiyID);\n firstLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", firstLevel);\n\n // helpers.Utils.printMapContent(firstLevel);\n\n Map<String, Object> fithLevel = new HashMap<String, Object>();\n\n List<String> newHLATypingIDs = new ArrayList<String>();\n List<String> newHLATypingSampleIDs = new ArrayList<String>();\n List<String> hlaClasses = new ArrayList<String>();\n List<String> typings = new ArrayList<String>();\n List<String> typingMethods = new ArrayList<String>();\n\n // TODO choose parent sample for hlaTyping\n String parentHLA = \"\";\n\n\n for (Iterator iter = samplesToRegister.getItemIds().iterator(); iter.hasNext();) {\n\n NewIvacSampleBean sampleBean = (NewIvacSampleBean) iter.next();\n\n for (int ii = 1; ii <= sampleBean.getAmount(); ii++) {\n Map<String, Object> secondLevel = new HashMap<String, Object>();\n Map<String, Object> thirdLevel = new HashMap<String, Object>();\n Map<String, Object> fourthLevel = new HashMap<String, Object>();\n\n List<String> newSamplePreparationIDs = new ArrayList<String>();\n List<String> newTestSampleIDs = new ArrayList<String>();\n List<String> testTypes = new ArrayList<String>();\n\n List<String> newNGSMeasurementIDs = new ArrayList<String>();\n List<String> newNGSRunIDs = new ArrayList<String>();\n List<Boolean> additionalInfo = new ArrayList<Boolean>();\n List<String> parents = new ArrayList<String>();\n\n List<String> newSampleExtractionIDs = new ArrayList<String>();\n List<String> newBiologicalSampleIDs = new ArrayList<String>();\n List<String> primaryTissues = new ArrayList<String>();\n List<String> detailedTissue = new ArrayList<String>();\n List<String> sequencerDevice = new ArrayList<String>();\n\n String newSampleExtractionCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n newSampleExtractionIDs\n .add(\"/\" + space + \"/\" + newProjectCode + \"/\" + newSampleExtractionCode);\n numberOfRegisteredExperiments += 1;\n\n String newBiologicalSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newBiologicalSampleID = \"/\" + space + \"/\" + newBiologicalSampleCode\n + BarcodeFunctions.checksum(newBiologicalSampleCode);\n\n parentHLA = newBiologicalSampleID;\n\n newBiologicalSampleIDs.add(newBiologicalSampleID);\n numberOfRegisteredSamples += 1;\n\n primaryTissues.add(sampleBean.getTissue());\n detailedTissue.add(sampleBean.getType());\n\n // register second level of new patient\n secondLevel.put(\"lvl\", \"2\");\n secondLevel.put(\"sampleExtraction\", newSampleExtractionIDs);\n secondLevel.put(\"biologicalSamples\", newBiologicalSampleIDs);\n\n if (sampleBean.getSecondaryName() == null) {\n secondLevel.put(\"secondaryNames\", \"\");\n } else {\n secondLevel.put(\"secondaryNames\", sampleBean.getSecondaryName());\n }\n secondLevel.put(\"parent\", newBiologicalEntitiyID);\n secondLevel.put(\"primaryTissue\", primaryTissues);\n secondLevel.put(\"detailedTissue\", detailedTissue);\n secondLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", secondLevel);\n // helpers.Utils.printMapContent(secondLevel);\n\n if (sampleBean.getDnaSeq()) {\n String newSamplePreparationCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newSamplePreparationID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newSamplePreparationCode;\n newSamplePreparationIDs.add(newSamplePreparationID);\n numberOfRegisteredExperiments += 1;\n\n String newTestSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newTestSampleID = \"/\" + space + \"/\" + newTestSampleCode\n + BarcodeFunctions.checksum(newTestSampleCode);\n newTestSampleIDs.add(newTestSampleID);\n numberOfRegisteredSamples += 1;\n testTypes.add(\"DNA\");\n\n String newNGSMeasurementCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newNGSMeasurementID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newNGSMeasurementCode;\n newNGSMeasurementIDs.add(newNGSMeasurementID);\n numberOfRegisteredExperiments += 1;\n\n String newNGSRunCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"R\";\n String newNGSRunID = \"/\" + space + \"/\" + newNGSRunCode\n + BarcodeFunctions.checksum(newNGSRunCode);\n newNGSRunIDs.add(newNGSRunID);\n numberOfRegisteredSamples += 1;\n\n additionalInfo.add(false);\n sequencerDevice.add(sampleBean.getSeqDevice());\n parents.add(newTestSampleID);\n\n }\n\n if (sampleBean.getRnaSeq()) {\n String newSamplePreparationCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newSamplePreparationID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newSamplePreparationCode;\n newSamplePreparationIDs.add(newSamplePreparationID);\n numberOfRegisteredExperiments += 1;\n\n String newTestSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newTestSampleID = \"/\" + space + \"/\" + newTestSampleCode\n + BarcodeFunctions.checksum(newTestSampleCode);\n newTestSampleIDs.add(newTestSampleID);\n numberOfRegisteredSamples += 1;\n testTypes.add(\"RNA\");\n\n String newNGSMeasurementCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newNGSMeasurementID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newNGSMeasurementCode;\n newNGSMeasurementIDs.add(newNGSMeasurementID);\n numberOfRegisteredExperiments += 1;\n\n String newNGSRunCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"R\";\n String newNGSRunID = \"/\" + space + \"/\" + newNGSRunCode\n + BarcodeFunctions.checksum(newNGSRunCode);\n newNGSRunIDs.add(newNGSRunID);\n numberOfRegisteredSamples += 1;\n\n additionalInfo.add(false);\n sequencerDevice.add(sampleBean.getSeqDevice());\n parents.add(newTestSampleID);\n }\n\n if (sampleBean.getDeepSeq()) {\n String newSamplePreparationCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newSamplePreparationID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newSamplePreparationCode;\n newSamplePreparationIDs.add(newSamplePreparationID);\n numberOfRegisteredExperiments += 1;\n\n String newTestSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newTestSampleID = \"/\" + space + \"/\" + newTestSampleCode\n + BarcodeFunctions.checksum(newTestSampleCode);\n newTestSampleIDs.add(newTestSampleID);\n numberOfRegisteredSamples += 1;\n testTypes.add(\"DNA\");\n\n String newNGSMeasurementCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newNGSMeasurementID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newNGSMeasurementCode;\n newNGSMeasurementIDs.add(newNGSMeasurementID);\n numberOfRegisteredExperiments += 1;\n\n String newNGSRunCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"R\";\n String newNGSRunID = \"/\" + space + \"/\" + newNGSRunCode\n + BarcodeFunctions.checksum(newNGSRunCode);\n newNGSRunIDs.add(newNGSRunID);\n numberOfRegisteredSamples += 1;\n\n additionalInfo.add(true);\n sequencerDevice.add(sampleBean.getSeqDevice());\n parents.add(newTestSampleID);\n }\n\n // register third and fourth level of new patient\n thirdLevel.put(\"lvl\", \"3\");\n thirdLevel.put(\"parent\", newBiologicalSampleID);\n thirdLevel.put(\"experiments\", newSamplePreparationIDs);\n thirdLevel.put(\"samples\", newTestSampleIDs);\n thirdLevel.put(\"types\", testTypes);\n thirdLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n fourthLevel.put(\"lvl\", \"4\");\n fourthLevel.put(\"experiments\", newNGSMeasurementIDs);\n fourthLevel.put(\"samples\", newNGSRunIDs);\n fourthLevel.put(\"parents\", parents);\n fourthLevel.put(\"types\", testTypes);\n fourthLevel.put(\"info\", additionalInfo);\n fourthLevel.put(\"device\", sequencerDevice);\n fourthLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n // TODO additional level for HLA typing\n\n // call of ingestion services for differeny levels\n // helpers.Utils.printMapContent(thirdLevel);\n // helpers.Utils.printMapContent(fourthLevel);\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", thirdLevel);\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", fourthLevel);\n }\n }\n\n for (Entry<String, List<String>> entry : hlaTyping.entrySet()) {\n\n String newHLATyping = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n\n newHLATypingIDs.add(\"/\" + space + \"/\" + newProjectCode + \"/\" + newHLATyping);\n\n numberOfRegisteredExperiments += 1;\n\n String newHLATypingSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"H\";\n\n String newHLATypingSampleID = \"/\" + space + \"/\" + newHLATypingSampleCode\n + BarcodeFunctions.checksum(newHLATypingSampleCode);\n\n newHLATypingSampleIDs.add(newHLATypingSampleID);\n numberOfRegisteredSamples += 1;\n\n hlaClasses.add(entry.getKey());\n typings.add(entry.getValue().get(0));\n typingMethods.add(entry.getValue().get(1));\n }\n\n fithLevel.put(\"lvl\", \"5\");\n fithLevel.put(\"experiments\", newHLATypingIDs);\n fithLevel.put(\"samples\", newHLATypingSampleIDs);\n fithLevel.put(\"typings\", typings);\n fithLevel.put(\"classes\", hlaClasses);\n fithLevel.put(\"methods\", typingMethods);\n fithLevel.put(\"parent\", parentHLA);\n\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", fithLevel);\n\n }\n }", "@Override\n\tpublic BaseOpenmrsData process(ClinicalStatement entry) throws DocumentImportException {\n\t\t\n\t\t// Validate\n\t\tif(this.m_configuration.getValidationEnabled())\n\t\t{\n\t\t\tValidationIssueCollection issues = this.validate(entry);\n\t\t\tif(issues.hasErrors())\n\t\t\t\tthrow new DocumentValidationException(entry, issues);\n\t\t}\n\t\telse if(!entry.isPOCD_MT000040UVProcedure())\n\t\t\tthrow new DocumentImportException(\"Expected entry to be Procedure\");\n\t\t\n\t\t// What is the mood code?\n\t\tProcedure procedure = (Procedure)entry;\n\t\t\n\t\t// Only store EVN or \" I DID PERFORM \" procedures, the other mood codes \n\t\t// if encountered should create more appropriate data like an ORDER for INT (i.e. I intend to perform a procedure)\n\t\tif(procedure.getMoodCode().getCode().equals(x_DocumentProcedureMood.Eventoccurrence))\n\t\t\treturn this.processEventOccurance(procedure);\n\t\telse if(procedure.getMoodCode().getCode().equals(x_DocumentProcedureMood.Intent))\n\t\t\treturn this.processIntent(procedure);\n\t\telse\n\t\t\tthrow new NotImplementedException(\"Only support procedures with moodCode = INT or EVN\");\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\tAdresse a1 = new Adresse(1, \"voie\", \"ville\", \"cp\");\n\t\tPatient p1 = new Patient(123, \"nom\", \"prenom\", a1);\n//\t\tContext.getInstance().getDaoPatient().insert(p1);\n\t\tfileAttente.add(p1);\n\t\tAdresse a2 = new Adresse(2, \"voie\", \"ville\", \"cp\");\n\t\tPatient p2 = new Patient(124, \"nom\", \"prenom\", a2);\n\t\tfileAttente.add(p2);\n//\t\tContext.getInstance().getDaoPatient().insert(p2);\n\t\tAdresse a3 = new Adresse(3, \"voie\", \"ville\", \"cp\");\n\t\tPatient p3 = new Patient(125, \"nom\", \"prenom\", a3);\n\t\tfileAttente.add(p3);\n//\t\tContext.getInstance().getDaoPatient().insert(p3);\n\t\tAdresse a4 = new Adresse(4, \"voie\", \"ville\", \"cp\");\n\t\tPatient p4 = new Patient(126, \"nom\", \"prenom\", a4);\n\t\tfileAttente.add(p4);\n//\t\tContext.getInstance().getDaoPatient().insert(p4);\n\t\t\n\t\t\n\t\tmenuPrincipal();\n\t}", "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "Prms createPrms();", "public interface Pracujacy {\r\n void pracuj();\r\n}", "public Patient (String patientID) {\n this.patientID = patientID;\n this.associatedDoctor = new ArrayList<>();\n }", "private List<IacucProtocolSpeciesStudyGroup> getPersonProcedureDetails(List<IacucProtocolSpeciesStudyGroup> iacucProtocolSpeciesStudyGroups, IacucProtocolPerson iacucProtocolPerson) {\n List<IacucProtocolSpeciesStudyGroup> personProcedureDetails = new ArrayList<IacucProtocolSpeciesStudyGroup>();\n for(IacucProtocolSpeciesStudyGroup iacucProtocolSpeciesStudyGroup : iacucProtocolSpeciesStudyGroups) {\n HashSet<Integer> studyGroupProcedures = new HashSet<Integer>();\n List<IacucProtocolStudyGroupBean> responsibleProcedures = new ArrayList<IacucProtocolStudyGroupBean>();\n for(IacucProtocolStudyGroup iacucProtocolStudyGroup : iacucProtocolSpeciesStudyGroup.getIacucProtocolStudyGroups()) {\n if(studyGroupProcedures.add(iacucProtocolStudyGroup.getIacucProtocolStudyGroupHeaderId())) {\n IacucProtocolStudyGroupBean newIacucProtocolStudyGroupBean = getNewCopyOfStudyGroupBean(iacucProtocolStudyGroup.getIacucProtocolStudyGroupBean());\n if(isPersonResponsibleForProcedure(iacucProtocolPerson, iacucProtocolStudyGroup)) {\n newIacucProtocolStudyGroupBean.setProcedureSelected(true);\n newIacucProtocolStudyGroupBean.setNewProcedure(false);\n }\n responsibleProcedures.add(newIacucProtocolStudyGroupBean);\n }\n }\n iacucProtocolSpeciesStudyGroup.setResponsibleProcedures(responsibleProcedures);\n personProcedureDetails.add(iacucProtocolSpeciesStudyGroup);\n }\n return personProcedureDetails;\n }", "public interface PatientMapper {\n\n public List<PatientEntity> getPatientList(String Pname);\n\n public List<PatientEntity> selectAllPatients();\n\n public PatientEntity getPatientsByPname(String Pname);\n\n public void addPatient(PatientEntity patient);\n\n public void updatePatient(PatientEntity patient);\n\n public void deletePatient(String Pname);\n\n List<String> getPatientlist();\n\n @Select(\"select * from patient where Pname = #{Pname}\")\n public Map<String, Object> selectPatientByPname(String Pname);\n}", "@Transactional\n\tpublic void saveNewPatient(FlowObjCreator foc){\n\t\tlog.debug(\"-----------\");\n\t\tlog.debug(\"-----------\"+foc.getIdf());\n\t\tlog.debug(\"-----------\"+foc.getBdate());\n\t\tTimestamp bd = new Timestamp(foc.getBdate().getTime());\n\t\tTree folderT = readDocT(foc.getIdf());\n\t\tPatient newPatientO = foc.getNewPatient();\n\t\tnewPatientO.setBirthdate(bd);\n\t\t\n\t\tsaveNewPatient(folderT, newPatientO);\n\t}", "List<Patient> findAllPatients();", "public static com.statuspatients.plugins.model.Patients createPatients(\n long fooId) {\n return getService().createPatients(fooId);\n }", "private void assignTests(Patient patient, String test) {\n patient.setTestToPass(test);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tprinteazaPersonalSpital(new MedicFactory(), \"Ana\");\r\n\t\tprinteazaPersonalSpital(new AsistentFactory(), \"Cosmin\");\r\n\t\tprinteazaPersonalSpital(new InfirmierFactory(), \"Tuti\");\r\n\t}", "public interface PrincipalPresenter {\n\n public void calcular(NumReq req, String operacion);\n}", "@Override\n public void visit(ProcedureCallNode procedureCallNode) {\n }", "@Override\n public void visit(final OpProcedure opProc) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpProc\");\n }\n if (opProc.getProcId() != null) {\n addOp(new OpProcedure(opProc.getProcId(), opProc.getArgs(), rewriteOp1(opProc)));\n } else {\n addOp(new OpProcedure(opProc.getURI(), opProc.getArgs(), rewriteOp1(opProc)));\n }\n }", "public Patient(String userID, String fullName, String address, String telephone){\n super(userID, fullName, address, telephone);\n }" ]
[ "0.6291421", "0.6037459", "0.573122", "0.5606748", "0.5591482", "0.55320084", "0.54983824", "0.5471573", "0.5467487", "0.5389158", "0.5238116", "0.5237797", "0.52369213", "0.5224088", "0.52081686", "0.52019745", "0.5189897", "0.51549774", "0.51066834", "0.51023406", "0.50692016", "0.50678194", "0.50672424", "0.5053019", "0.50439596", "0.50419086", "0.5038772", "0.5031779", "0.49700677", "0.4944822", "0.4906842", "0.48968312", "0.4883637", "0.4880637", "0.48798242", "0.48687375", "0.48519492", "0.48401788", "0.48187453", "0.48181656", "0.4817076", "0.48155457", "0.48119643", "0.47946432", "0.4794479", "0.47860977", "0.47667181", "0.47666943", "0.47653538", "0.4751584", "0.47490492", "0.4741181", "0.4740825", "0.47309214", "0.47280687", "0.47275662", "0.47273842", "0.47253072", "0.4723041", "0.47225174", "0.47212547", "0.47192588", "0.47176087", "0.4707783", "0.4707224", "0.46938694", "0.46925798", "0.4691553", "0.468967", "0.46795714", "0.4667317", "0.46659568", "0.46644297", "0.46540523", "0.46512756", "0.46490946", "0.46490946", "0.46490946", "0.46486214", "0.46463418", "0.46443808", "0.46353757", "0.46351734", "0.46249288", "0.4613393", "0.46095714", "0.46060634", "0.46054173", "0.4605175", "0.45895135", "0.45857266", "0.45837966", "0.4583008", "0.45792246", "0.45784777", "0.45738384", "0.4568056", "0.45676538", "0.4566859", "0.45642763" ]
0.7773028
0
Set diagnosis for patient.
private void makeDiagnosis(Patient patient, String diagnosis) { patient.setDiagnosis(diagnosis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDiagnosis(String theDiagnosis)\n {\n if(!theDiagnosis.equals(null) && !theDiagnosis.equals(\"\") &&\n theDiagnosis.length() > 0)\n {\n this.diagnosis = theDiagnosis;\n \n }//end of IF\n \n else\n {\n this.diagnosis = \"**no diagnosis**\";\n \n }//end of ELSE\n \n }", "public String getDiagnosis()\n {\n return this.diagnosis;\n \n }", "String diagnosis(String patient) {\n return String.format(\"The doctor %s says that %s is sick.\", this.getFullName(), patient);\n }", "public void setDoctor(String doctor) {\r\n this.doctor = doctor;\r\n }", "public void setPatientId(int patientId) {\n\t\t\t\n\t\tthis.patientId=patientId;\t\t\n\t}", "public void setDoctor(Doctor doctor) {\r\n\t\tthis.doctor = doctor;\r\n\t}", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "private void assignDiagnosisInfo( String cosmoId )\r\n {\r\n\r\n String[] info = helper.retrieveHealthStatusInfo(cosmoId);\r\n familyPhysicianTxt.setText(info[0]);\r\n physicianPhoneTxt.setText(info[1]);\r\n participantDiagnosisTxt.setText(info[2]);\r\n tylenolGiven.setSelected(Boolean.parseBoolean(info[3]));\r\n careGiverPermission.setSelected(Boolean.parseBoolean(info[4]));\r\n\r\n dateCompletedTxt.setText(info[5]);\r\n otherInfoTxt.setText(info[6]);\r\n\r\n }", "public boolean updateDiagnosis(Diagnosis diagnosis) {\n\t\treturn false;\n\t}", "public void setDoctorID(String doctorID){\n this.doctorID = doctorID;\n }", "protected void setDpc(int dpc) {\n this.dpc = dpc;\n }", "public void setDoctor(Person d){\n this.doctor = d;\n }", "void setDomicilio(java.lang.String domicilio);", "public void setDX(int DX){\n \tdx = DX;\n }", "public void setPatientID(int patientID) {\n\t\tthis.patientID = patientID;\n\t}", "public void setPatientId(String patientId) {\n\t\tif (patientId == null) {\n\t\t\tthis.patientId = \"\";\n\t\t} else {\n\t\t\tthis.patientId = patientId;\n\t\t}\n\t}", "public void setDis(int xIndex, int yIndex, double dis)\n\t{\n\t\tif(xIndex < this.sqNum && yIndex < this.sqNum){\n\t\t\tdm[xIndex][yIndex] = dis;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\" Sets the matrix position to exceed the number of sequence boundaries! \");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void setPatient(org.hl7.fhir.ResourceReference patient)\n {\n generatedSetterHelperImpl(patient, PATIENT$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public Diagnosis getDiagnosis(int diagId) {\n\t\treturn null;\n\t}", "private static void changePatient(){\r\n // opretter ny instans af tempPatinet som overskriver den gamle\r\n Patient p = new Patient(); // det her kan udskiftes med en nulstil funktion for at forsikre at der altid kun er en patient.\r\n Patient.setCprNumber((Long) null);\r\n }", "public ImagingStudy setClinicalInformation(StringDt theValue) {\n\t\tmyClinicalInformation = theValue;\n\t\treturn this;\n\t}", "public void setCardinal(DTDCardinal aCardinal)\n {\n cardinal = aCardinal;\n }", "private void setThePatient() {\n String ppsn = mPPSN.getText().toString();\n thePatient.set_id(ppsn.substring(ppsn.indexOf(\":\")+1).trim());\n\n String name = mName.getText().toString();\n thePatient.setName(name.substring(name.indexOf(\":\")+1).trim());\n\n String illness = mCondition.getText().toString();\n thePatient.setIllness(illness.substring(illness.indexOf(\":\")+1).trim());\n\n Address a = new Address();\n String addressLine1 = mAddressLine1.getText().toString();\n a.setAddressLine1(addressLine1.substring(addressLine1.indexOf(\":\")+1).trim());\n\n String addressLine2 = mAddressLine2.getText().toString();\n a.setAddressLine2(addressLine2.substring(addressLine2.indexOf(\":\")+1).trim());\n\n String city = mCity.getText().toString();\n a.setCity(city.substring(city.indexOf(\":\")+1).trim());\n\n String county = mCounty.getText().toString();\n a.setCounty(county.substring(county.indexOf(\":\")+1).trim());\n\n String country = mCountry.getText().toString();\n a.setCountry(country.substring(country.indexOf(\":\")+1).trim());\n\n String postcode = mPostCode.getText().toString();\n a.setPostCode(postcode.substring(postcode.indexOf(\":\")+1).trim());\n\n thePatient.setAddress(a);\n }", "Diagnose(Doctor doc, String complaints, String diag, PatientFile creator) throws InvalidDoctorException,\n\t\t\tInvalidDiagnoseException, InvalidComplaintsException, InvalidPatientFileException {\n\t\tif (!this.canHaveAsPatientFile(creator))\n\t\t\tthrow new InvalidPatientFileException(\"can not have this as creator\");\n\t\tif (!this.canHaveAsDoctor(doc))\n\t\t\tthrow new InvalidDoctorException(\"Doctor is invalid!\");\n\t\tif (!this.isValidDiagnosis(diag))\n\t\t\tthrow new InvalidDiagnoseException(\"Diagnose in Diagnoseconstructor is invalid!\");\n\t\tif (!this.isValidDiagnosis(complaints))\n\t\t\tthrow new InvalidComplaintsException(\"Invalid complaints were given when trying to create new Diagnose!\");\n\t\tthis.myPatientFile = creator;\n\t\tthis.complaints = complaints;\n\t\tthis.attending = doc;\n\t\tthis.diag = diag;\n\t\tthis.treatments = new LinkedList<Task<? extends Treatment>>();\n\t}", "public void setPatientId(String patientId){\n\t\tthis.patientId = patientId;\n\t}", "public void setPatientPhone(String patientPhone) {\n this.patientPhone = patientPhone == null ? null : patientPhone.trim();\n }", "public void setDiseaseId(DiseaseId diseaseId) {\n this.diseaseId = diseaseId;\n }", "public void setPatientId(String patientId) {\n\t\tthis.patientId = patientId == null ? null : patientId.trim();\n\t}", "public void addColumnDdcDiagnosis() {\n addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_DX);\n }", "public void setPatientId(String patientId)\n {\n this.patientId = patientId;\n }", "public void setMedicalid(Integer medicalid) {\n this.medicalid = medicalid;\n }", "public void setD(String d) {\n this.d = d == null ? null : d.trim();\n }", "public ImagingStudy setClinicalInformation( String theString) {\n\t\tmyClinicalInformation = new StringDt(theString); \n\t\treturn this; \n\t}", "public void setDia(int dia){\n if(dia > 31 || dia < 0){\n System.out.println(\"Dia inválido\");\n }else {\n this.dia = dia;\n }\n }", "public void setDomicilio(String domicilio) {\n this.domicilio = domicilio;\n }", "public void setDificultad(int dificultad){\n this.dificultad=dificultad;\n }", "public void setTestSetDiscrepancyReportId(String testSetDiscrepancyReportId) {\n this.testSetDiscrepancyReportId = testSetDiscrepancyReportId;\n }", "public void setDrugDAC(IDrugDAC drugDAC)\r\n\t{\r\n\t\tthis.drugDAC = drugDAC;\r\n\t}", "public Builder setIdMedication(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n idMedication_ = value;\n onChanged();\n return this;\n }", "public void setDx(double newDx) {\n dx = (int) newDx;\n }", "public int createDiagnosis(Diagnosis diagnosis) {\n\t\treturn 0;\n\t}", "public void setPatientidentifierId(String patientidentifierId) {\n\t\tthis.patientidentifierId = patientidentifierId == null ? null\n\t\t\t\t: patientidentifierId.trim();\n\t}", "public void setDx(double newDx) {\r\n this.dx = newDx;\r\n }", "public void setiD(int iD) {\n this.iD = iD;\n }", "@POST(PRESCRIPTION_PATH)\n\tPrescription assignMedication(\n\t\t\t@Path(PATIENT_ID_PARAM) long patientId,\n\t\t\t@Query(MEDICATION_NAME_PARAM) String medication);", "public void setSpecimenDead(long killed) {\n specimenDead = killed;\n }", "@Test\r\n\tpublic void testDischargePatient() {\r\n\t\tsessionController.login(testC1Doctor1, getCampus(0));\r\n\t\tdoctorController.consultPatientFile(testPatient4);\r\n\t\tdoctorController.dischargePatient(); // ontslaat geselecteerde patient in patient file controller\r\n\t\tassertEquals(testPatient4.isDischarged(), true);\r\n\t}", "public void setDiagParams (java.util.Set<jkt.hms.masters.business.DiagParam> diagParams) {\n\t\tthis.diagParams = diagParams;\n\t}", "public void setDomicilio(String domicilio) {\r\n\t\tthis.domicilio = domicilio;\r\n\t}", "public void setDoctorName(String doctorName){\n \tthis.doctorName = doctorName;\n }", "public void setDificulty(int dificulty) {\n this.ACTUAL_DIFICULTY = dificulty;\n }", "public void setClinicalStatement(ClinicalStatement clinicalStatement) {\n\t\tthis.clinicalStatement = clinicalStatement;\n\t}", "public void setDimes(int d)\n {\n\tthis.dimes = d;\n\tchangeChecker();\n }", "public void setPatientCode(String patientCode) {\r\n\t\tthis.patientCode = patientCode;\r\n\t}", "void setMedlineSi(gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi medlineSi);", "public void setDx(double dx1) {\n this.dx = dx1;\n }", "public void setPatientLoginId(String patientLoginId) {\n this.patientLoginId = patientLoginId == null ? null : patientLoginId.trim();\n }", "public boolean deleteDiagnosis(Diagnosis diagnosis) {\n\t\treturn false;\n\t}", "public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }", "public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }", "public void setDni(String dni);", "public void setDisintegratorid(String disintegratorid) {\n this.disintegratorid = disintegratorid == null ? null : disintegratorid.trim();\n }", "public void setDydj(String dydj) {\n this.dydj = dydj == null ? null : dydj.trim();\n }", "public void setDoctoroneCode(String doctoroneCode) {\n this.doctoroneCode = doctoroneCode == null ? null : doctoroneCode.trim();\n }", "void setPhone(String ph){ // SETTER METHOD\n\t\tif(ph.length()>10 && ph.length()<=13){\n\t\t\tphone = ph; // writing the data based on some rules\n\t\t}else{\n\t\t\tphone = \"NA\";\n\t\t\tSystem.out.println(\"Please Enter Correct Phone Number\");\n\t\t}\n\t}", "public Builder setD(int value) {\n bitField0_ |= 0x00000001;\n d_ = value;\n onChanged();\n return this;\n }", "public void setPatientSex(String patientSex){\n\t\tthis.patientSex = patientSex;\n\t}", "public abstract void setNovedad(java.lang.String newNovedad);", "public void setDsdate(String dsdate) {\n this.dsdate = dsdate == null ? null : dsdate.trim();\n }", "private void patientSetBtnActionPerformed(java.awt.event.ActionEvent evt) {\n patientArr[patientI] = new patient(patientNameBox.getText(),\n Integer.parseInt(patientAgeBox.getText()),\n patientDiseaseBox.getText(),\n Integer.parseInt(patientIDBox.getText()));\n try {\n for (int i = 0; i < doc.length; i++) {\n if (patientDiseaseBox.getText().equalsIgnoreCase(doc[i].expertise)) {\n doc[i].newPatient(patientArr[patientI]);\n patientArr[patientI].docIndex = i;\n break;\n }\n }\n } catch (NullPointerException e) {\n for (int i = 0; i < doc.length; i++) {\n if (doc[i].expertise.equalsIgnoreCase(\"medicine\")) {\n doc[i].newPatient(patientArr[patientI]);\n\n }\n }\n }\n\n patientArr[patientI].due += 1000;\n\n patientI++;\n \n }", "public void setSelected(int patientId) {\n\t\ttable.getItems().forEach(p -> {\n\t\t\tif (p.getWardId() == patientId) {\n\t\t\t\ttable.getSelectionModel().select(p);\n\t\t\t}\n\t\t});\n\t}", "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "@Override\n\tpublic void setSurvey(int id, int survey) {\n\t\t\n\t}", "public void setIndicate(String indicate) {\n this.indicate = indicate == null ? null : indicate.trim();\n }", "@Override\n\tpublic void setDMO(DmcObject dmo) {\n\t\t\n\t}", "public void setDm(double value) {\n this.dm = value;\n }", "public void setMedication(org.hl7.fhir.ResourceReference medication)\n {\n generatedSetterHelperImpl(medication, MEDICATION$10, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public void setEdad(Integer edad)\r\n/* 203: */ {\r\n/* 204:371 */ this.edad = edad;\r\n/* 205: */ }", "@Override\n\tpublic String editDoctor(String doctor) {\n\t\treturn null;\n\t}", "public Builder setD(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n d_ = value;\n onChanged();\n return this;\n }", "public void setPatientName(String patientName){\n\t\tthis.patientName = patientName;\n\t}", "private void setPhysician(Physician physician) {\n\t\tthis.physician = physician;\r\n\r\n\t}", "public void setDID(java.lang.String DID) {\r\n this.DID = DID;\r\n }", "public void setDosageArray(org.hl7.fhir.MedicationStatementDosage[] dosageArray)\n {\n check_orphaned();\n arraySetterHelper(dosageArray, DOSAGE$14);\n }", "public void setMeasureIdentification(final Identifier newValue) {\n checkWritePermission(measureIdentification);\n measureIdentification = newValue;\n }", "void dischargePatient(int id);", "protected void setDid(DID did) {\n\t\tthis.did = did;\n\t}", "public void setD ( boolean d ) {\n\n\tthis.d = d;\n }", "private void setHospital(String p_hospital){\n\t\tthis.nombreHospital = p_hospital;\n\t}", "public void setDireccion(String direccion){\n if(direccion == null){\n throw new IllegalArgumentException(\"Direccion de domicilio igual a null\");\n }\n this.direccion = direccion;\n }", "public void setPatientName(String patientName)\n {\n this.patientName = patientName;\n }", "public void setMidiDevice( MidiDeviceDescriptor midiDevice ) throws IllegalStateException;", "public void setEdad(int value) {\n this.edad = value;\n }", "public void setDoctor_code(java.lang.String doctor_code) {\r\n this.doctor_code = doctor_code;\r\n }", "public void setMedal(java.lang.String value) {\n\t\tsetValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.MEDAL, value);\n\t}", "public void careForPatient(Patient patient);", "public void setMSCD(java.lang.String MSCD) {\n this.MSCD = MSCD;\n }", "public void setDeviceid(String deviceid) {\n this.deviceid = deviceid == null ? null : deviceid.trim();\n }", "void setDoctorRecordsFilePath(Path doctorRecordsFilePath);", "@Test\r\n\tpublic void testSetGetNhsNumberInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setNhsNumber(nhsNumberInvalid);\r\n\t\tassertEquals(nhsNumberInvalid, doctor.getNhsNumber());\r\n\t}" ]
[ "0.7456551", "0.60827047", "0.5846599", "0.5804611", "0.57789373", "0.56850815", "0.5671563", "0.5669551", "0.5646999", "0.55786985", "0.55415547", "0.549526", "0.5491534", "0.54569936", "0.53964907", "0.5390876", "0.5378612", "0.5334687", "0.5330152", "0.53274345", "0.532583", "0.53238493", "0.53001255", "0.52906835", "0.5287559", "0.5286077", "0.5285156", "0.5279525", "0.5274481", "0.52384174", "0.52202445", "0.5194746", "0.5171455", "0.5120141", "0.5107153", "0.50881964", "0.50876784", "0.5074063", "0.50720334", "0.5052029", "0.503474", "0.50316495", "0.50285435", "0.50274056", "0.5020799", "0.5002814", "0.4992277", "0.49894658", "0.49412093", "0.49411306", "0.49395195", "0.4939084", "0.49354562", "0.49218667", "0.49176916", "0.491329", "0.4909736", "0.4907147", "0.4903669", "0.4903669", "0.4892349", "0.48916113", "0.48883972", "0.48843476", "0.4883456", "0.48800826", "0.48476145", "0.4843466", "0.4832716", "0.48298913", "0.48179898", "0.48174447", "0.48062795", "0.48057604", "0.48001713", "0.4792332", "0.4783332", "0.4765775", "0.47643873", "0.47389427", "0.47364923", "0.47315463", "0.47309718", "0.47265282", "0.4720798", "0.47170448", "0.47088385", "0.4707385", "0.46990693", "0.46985647", "0.46686012", "0.46676013", "0.46672454", "0.46621358", "0.46619424", "0.46592036", "0.4651743", "0.46381545", "0.4637883", "0.4634174" ]
0.7565752
0
Give patient a recipe.
private void giveRecipe(Patient patient) { patient.setHasRecipe(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Recipe getRecipe() {\r\n return recipe;\r\n }", "@Override\n public void showRecipe(Recipe recipe) {\n mName.setText(recipe.getName());\n mServings.setSelection(mPresenter.getServingsSelection());\n mPreparationTime.setSelection(mPresenter.getPreparationTimeSelection());\n mPreparation.setText(recipe.getDirections());\n }", "public Recipe getRecipe() {\n return recipe;\n }", "void createRecipe(Recipe recipe) throws ServiceFailureException;", "public void addNewRecipe() {\r\n listOfRecipes.add(new Recipe().createNewRecipe());\r\n }", "public void addRecipe(Recipe recipe)\n {\n recipe.setDataSource(this);\n _recipes.add(recipe);\n }", "@java.lang.Override\n public io.grafeas.v1.Recipe getRecipe() {\n return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_;\n }", "RecipeObject addRecipe(RecipeObject recipe);", "public void addRecipe(Recipe recipe){\n //recipes.add(recipe);\n if(recipe != null){\n recipes.add(recipe);\n }\n }", "public Recipe getRecipe(){\n\t\tRecipe recipe = new Recipe();\n\t\trecipe.setName(name);\n\t\trecipe.setNumPersons(numPersons);\n\t\trecipe.setPrepTime(prepTime);\n\t\trecipe.setRestTime(restTime);\n\t\trecipe.setCookingTime(cookingTime);\n\t\tHashMap<Ingredient, Quantity> ingredients = new HashMap<Ingredient,Quantity>();\n\t\tfor(int i = 0; i<ingredientsList.size(); i++){\n\t\t\tingredients.put(ingredientsList.get(i), quantities.get(i));\n\t\t}\n\t\trecipe.setIngredients(ingredients);\n\t\trecipe.setSteps(steps);\n\t\treturn recipe;\n\t}", "public void addIngredientRecipe(IngredientRecipePOJO ingr);", "public Builder setRecipe(io.grafeas.v1.Recipe value) {\n if (recipeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n recipe_ = value;\n } else {\n recipeBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }", "@RequestMapping(\"/saveRecipePatient\")\r\n\tpublic ModelAndView saveRecipePatient(@RequestParam Integer recipe_idr, @ModelAttribute Patient patient) {\r\n\t\tRecipe parent_recipe = recipeService.saveRecipePatient(recipe_idr, patient);\r\n\r\n\t\tModelAndView mav = new ModelAndView();\r\n\t\tmav.addObject(\"recipe_idr\", recipe_idr);\r\n\t\tmav.addObject(\"recipe\", parent_recipe);\r\n\t\tmav.setViewName(\"recipe/viewRecipe.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "public io.grafeas.v1.Recipe getRecipe() {\n if (recipeBuilder_ == null) {\n return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_;\n } else {\n return recipeBuilder_.getMessage();\n }\n }", "@RequestMapping(\"/selectRecipePatient\")\r\n\tpublic ModelAndView selectRecipePatient(@RequestParam Integer recipe_idr, @RequestParam Integer patient_id) {\r\n\t\tPatient patient = patientDAO.findPatientByPrimaryKey(patient_id, -1, -1);\r\n\r\n\t\tModelAndView mav = new ModelAndView();\r\n\t\tmav.addObject(\"recipe_idr\", recipe_idr);\r\n\t\tmav.addObject(\"patient\", patient);\r\n\t\tmav.setViewName(\"recipe/patient/viewPatient.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "void updateRecipe(Recipe recipe) throws ServiceFailureException;", "@RequestMapping(\"/newRecipePatient\")\r\n\tpublic ModelAndView newRecipePatient(@RequestParam Integer recipe_idr) {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\t\tmav.addObject(\"recipe_idr\", recipe_idr);\r\n\t\tmav.addObject(\"patient\", new Patient());\r\n\t\tmav.addObject(\"newFlag\", true);\r\n\t\tmav.setViewName(\"recipe/patient/editPatient.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "@Override\n public void createRecipe(RecipeEntity recipeEntity)\n {\n this.save(recipeEntity);\n }", "@RequestMapping(\"/editRecipePatient\")\r\n\tpublic ModelAndView editRecipePatient(@RequestParam Integer recipe_idr, @RequestParam Integer patient_id) {\r\n\t\tPatient patient = patientDAO.findPatientByPrimaryKey(patient_id, -1, -1);\r\n\r\n\t\tModelAndView mav = new ModelAndView();\r\n\t\tmav.addObject(\"recipe_idr\", recipe_idr);\r\n\t\tmav.addObject(\"patient\", patient);\r\n\t\tmav.setViewName(\"recipe/patient/editPatient.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "public void addRecipe(IRecipe recipe) {\n this.recipes.add(recipe);\n }", "@PostMapping(\"/recipes\")\n\tpublic String postRecipe(@RequestBody Recipe recipe) {\n\t\tSystem.out.println(\"hit recipes post\");\n\t\tSystem.out.println(recipe.getName());\n\t\tSystem.out.println(recipe.getSpoonacularId());\n\t\tSystem.out.println(recipe.getImage());\n\t\t\n\t\tList<Food> newFoods = recipe.getFoods();\n\t\tList<Step> newSteps = recipe.getSteps();\n\t\trecipe.setFoods(null);\n\t\trecipe.setSteps(null);\n\t\tRecipe newRecipe = rRepo.save(recipe);\n\t\t\n\t\tfor (Food food: newFoods) {\n\t\t\tFood newFood = new Food(food.getName(), food.getAmount());\n\t\t\tnewFood.setRecipe(newRecipe);\n\t\t\tfRepo.save(newFood);\n\t\t}\n\t\tfor (Step step: newSteps) {\n\t\t\tStep newStep = new Step(step.getName());\n\t\t\tnewStep.setRecipe(newRecipe);\n\t\t\tsRepo.save(newStep);\n\t\t}\n\n\t\treturn \"success\";\n\t}", "Recipe findRecipeById(Long id) throws ServiceFailureException;", "void addRecipe(RecipeGroup rg)\r\n\t{\tthis.recipes.add(rg);\t}", "@Override\n public void onClickRecipe(Recipe recipe) {\n String recipeJson = ObjectConverter.getStringFromRecipe(recipe);\n SharedPreferences.Editor editor = mRecipeSharedPref.edit();\n editor.putString(getString(R.string.recipe_key), recipeJson);\n editor.apply();\n\n //detail intent\n Intent intentToStartDetailActivity = new Intent(this, RecipeDetailActivity.class);\n intentToStartDetailActivity.putExtra(getString(R.string.recipe_key), recipe);\n startActivity(intentToStartDetailActivity);\n\n\n }", "@Override\n public void onClick(Recipe selectedRecipe) {\n\n SharedPreferences preferences =\n PreferenceManager.getDefaultSharedPreferences(getActivity());\n\n /*\n Store the recipe title and ingredient list (converted to JSON) in shared preferences\n This will be the base information for the widget.\n */\n preferences\n .edit()\n .putString(RECIPE_TITLE, selectedRecipe.getTitle())\n .putString(RECIPE_INGREDIENTS, GsonUtils\n .ingredientsToJson(selectedRecipe.getIngredients()))\n .apply();\n\n /* Update the widget with the selected recipe */\n WidgetService.startActionUpdateWidget(getActivity());\n\n // Open the recipe detail activity and pass in the new recipe\n Intent intent = new Intent(getActivity(), RecipeDetailActivity.class);\n intent.putExtra(SELECTED_RECIPE, selectedRecipe);\n startActivity(intent);\n }", "public void saveRecipe(Recipe recipe) {\r\n \t\tif (!recipeList.contains(recipe)) {\r\n \t\t\trecipeList.add(recipe);\r\n \t\t}\r\n \t\tpersistenceManager.save(recipe);\r\n \t}", "public long insertRecipe(Recipe recipe)\n {\n ContentValues cv = new ContentValues();\n cv.put(RECIPE_NAME, recipe.getRecipeName());\n cv.put(RECIPE, recipe.getRecipe());\n cv.put(PROCESS, recipe.getProcess());\n cv.put(NOTES, recipe.getNotes());\n this.openWriteableDB();\n long rowID = db.insert(TABLE_RECIPES, null, cv);\n this.closeDB();\n\n return rowID;\n }", "@Test\n\tpublic void testEditExistedRecipe() {\n\t\tcoffeeMaker.addRecipe(recipe2);\n\t\tassertEquals(\"Mocha\", coffeeMaker.editRecipe(0, recipe3));\n\t\tassertEquals(\"Latte\", coffeeMaker.getRecipes()[0].getName());\n\t}", "Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);", "private void saveIngreInRecipe(Recipe recipe) {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.get() == ButtonType.OK) {\r\n try {\r\n if (saveRecipe(recipe)) {\r\n Alert alert2 = new Alert(Alert.AlertType.INFORMATION);\r\n alert2.setTitle(\"Message\");\r\n alert2.setContentText(\"Saved..\");\r\n alert2.show();\r\n\r\n tblRecipe.getItems().clear();\r\n\r\n try {\r\n loadRecipe(getRecipe(cmbCakeID.getSelectionModel().getSelectedItem()));\r\n } catch (SQLException | ClassNotFoundException throwables) {\r\n throwables.printStackTrace();\r\n }\r\n\r\n } else {\r\n new Alert(Alert.AlertType.WARNING, \"Try Again..\").show();\r\n }\r\n } catch (Exception e) {\r\n new Alert(Alert.AlertType.WARNING, \"Duplicate Entry..\").show();\r\n }\r\n }\r\n }", "void cook(Food food) {\n //cook in pressure cooker\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\teditRecipe(recipeString);\n\t\t\t\t\t\t\t\t\t\tsavedDialog();\n\t\t\t\t\t\t\t\t\t}", "Execution submitRecipe(TestRecipe recipe);", "@Override\r\n protected void readImpl() {\r\n _recipeId = readD();\r\n }", "public static void register(Recipe recipe){\n Bukkit.getServer().addRecipe(recipe);\n }", "@Test\n\tpublic void testAddRecipe(){\n\t\t\n\t\ttestingredient1.setName(\"Peanut Butter\");\n\t\ttestingredient2.setName(\"Jelly\");\n\t\ttestingredient3.setName(\"Bread\");\n\t\t\n\t\t\n\t\tingredients.add(testingredient1);\n\t\tingredients.add(testingredient2);\n\t\tingredients.add(testingredient3);\n\t\t\n\t\ttestRecipe.setName(\"PB and J\");\n\t\ttestRecipe.setDescription(\"A nice, tasty sandwich\");\n\t\ttestRecipe.setIngredients(ingredients);\n\t\t\n\t\ttest2.saveRecipe(testRecipe);\n\t\t//test2.deleteRecipe(testRecipe);\n\t}", "private void editRecipe(String recipeString) {\n\t\tUUID recipeID = UUID.fromString(recipeString);\n\t\tRecipe newRecipe = grabRecipeInfo();\n\t\tRecipeController.updateRecipe(recipeID, newRecipe,\n\t\t\t\tgetApplicationContext());\n\t}", "public Recipe createRecipe(String name) {\r\n\t\tRecipe recipe=new Recipe(name,this);\r\n\t\trecipes.add(recipe);\r\n\t\treturn recipe;\r\n\t}", "public Recipe findRecipeDetails(String selectedRecipeName){\r\n for (int i = 0; i < listOfRecipes.size(); i++) {\r\n if (listOfRecipes.get(i).getRecipeName().equals(selectedRecipeName)) {\r\n Recipe recipeToAdjust = listOfRecipes.get(i);\r\n printAdjustedRecipeDetails(recipeToAdjust);\r\n }\r\n }\r\n return recipeToAdjust;\r\n }", "void deleteRecipe(RecipeObject recipe);", "@Test\n public void getRecipeByID_ReturnsRecipe(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertNotEquals(\"getRecipeByName - Returns a Recipe\", null, testDatabase.getRecipe(returned));\n }", "@Override\n public IRecipe addRecipe() {\n return RecipeRegistry.addShapedRecipe(new ItemStack(this),\n \"igi\",\n \"gog\",\n \"igi\",\n 'o', \"obsidian\", 'i', \"ingotIron\", 'g', \"blockGlass\");\n }", "public void updateRecipe(Recipe recipe) {\n try {\n PreparedStatement preparedStatement = connection\n .prepareStatement(\"update recipe set recipename=?, dishtype=?, dishflavour=?, difficultylevel=?\" +\n \" where recipeid=?\");\n // Parameters start with 1\n preparedStatement.setString(1, recipe.getName());\n preparedStatement.setString(2, recipe.getType());\n preparedStatement.setString(3, recipe.getFlavour());\n preparedStatement.setString(4, recipe.getDifficulty());\n preparedStatement.setInt(5, recipe.getRecipeId());\n preparedStatement.executeUpdate();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void careForPatient(Patient patient);", "public static void addRecipeToMealPlan(Recipe recipe, MealPlan mealPlan) {\n Connection conn = new ConnectDb().setupConnection();\n OraclePreparedStatement pst = null;\n OracleResultSet rs = null;\n \n try {\n String sqlStatement = \"insert into mealplanrecipe values (?, ?)\";\n \n pst = (OraclePreparedStatement) conn.prepareStatement(sqlStatement);\n pst.setInt(1, mealPlan.getId());\n pst.setInt(2, recipe.getId());\n \n pst.executeUpdate();\n \n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, e);\n } finally {\n ConnectDb.close(conn);\n ConnectDb.close(rs);\n ConnectDb.close(pst);\n }\n }", "@Test\n\tpublic void testAddTheUniqueNameOfRecipe() {\n\t\tcoffeeMaker.addRecipe(recipe1);\n\t\tassertTrue(coffeeMaker.addRecipe(recipe2));\n\t}", "@java.lang.Override\n public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() {\n return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_;\n }", "void deleteRecipe(Recipe recipe) throws ServiceFailureException;", "@Override public void onRecipeClicked(RecipeModel recipeModel) {\n }", "public void registerRecipe() {\n\t ItemStack itemStackDroidParts = new ItemStack(SuperDopeJediMod.entityManager.droidParts);\n\t ItemStack itemStackQuadaniumSteelIngot = new ItemStack(SuperDopeJediMod.quadaniumSteelIngot); \n\t ItemStack itemStackThis = new ItemStack(this);\n\t \n\t GameRegistry.addRecipe(itemStackThis, \"xxx\", \"xyx\", \"xxx\", 'x', itemStackDroidParts,\n\t \t\t\t'y', itemStackQuadaniumSteelIngot);\t\n\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n String rec = recipes.get(i);\n inMealRecipes.add(rec);\n adapterM.notifyDataSetChanged();\n }", "public void cook(Chef chef) {\n new Cooker(chef).cookIngredients(ingredients);\n }", "private final void deleteRecipe() {\n \tnew DeleteRecipeTask().execute();\n }", "public static void addMARecipe (IRecipeMA recipe)\n\t{\n\t\tregister.addMARecipe(recipe);\n\t}", "@Override\n\tpublic Recipe getRecipe() {\n\t\treturn null;\n\t}", "RecipeObject getRecipe(int recipeID);", "public void loadRecipe(View view) {\n\n Intent intent = new Intent(this, SavedRecipes.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUser user = User.getInstance();\n\t\t\t\tuser.emailRecipe(currentRecipe, getApplicationContext());\n\t\t\t}", "@RequestMapping(\"/deleteRecipePatient\")\r\n\tpublic ModelAndView deleteRecipePatient(@RequestParam Integer recipe_idr, @RequestParam Integer related_patient_id) {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\r\n\t\tRecipe recipe = recipeService.deleteRecipePatient(recipe_idr, related_patient_id);\r\n\r\n\t\tmav.addObject(\"recipe_idr\", recipe_idr);\r\n\t\tmav.addObject(\"recipe\", recipe);\r\n\t\tmav.setViewName(\"recipe/viewRecipe.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "private static void createRecipe(int code, String name, int quantity ) {\n\t\tString sqlTotalkcal=\"select sum(kcal) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalcarb=\"select sum(carbohidrates) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalProt=\"select sum(Proteines) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalFat=\"select sum(Fat) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalSalt=\"select sum(Salt) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqltotalAllergen=\"select codeAllergen from allergenxingredients where codeIngredient in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\t\r\n\t\t//recuperar datos\r\n\t\t\r\n\t\ttry {\r\n\t\t\tdouble kcal = dataRecovery(sqlTotalkcal);\r\n\t\t\tdouble carb = dataRecovery(sqlTotalcarb);\r\n\t\t\tdouble prot = dataRecovery(sqlTotalProt);\r\n\t\t\tdouble fat = dataRecovery(sqlTotalFat);\r\n\t\t\tdouble salt = dataRecovery(sqlTotalSalt);\r\n\t\t\tString aler = dataRecoveryAllergenList(sqltotalAllergen);\r\n\t\t\tcreateRecipeData(code, name, quantity, kcal, carb, prot, fat, salt, aler);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Hubo un error al crear la receta\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public Recipe(int inProduced)\n\t{\n\t\tthis.produced = inProduced;\n\t\tingredients = new ArrayList<Ingredient>();\n\t}", "@Override\n public void onListItemClick(Recipe clickedRecipe) {\n IngredientsWidgetProvider.setRecipe(clickedRecipe);\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n IngredientsWidgetProvider.updateAppWidgets(\n this,\n appWidgetManager,\n appWidgetManager.getAppWidgetIds(new ComponentName(this, IngredientsWidgetProvider.class))\n );\n Intent intent = new Intent(this, RecipeDetailsActivity.class);\n intent.putExtra(AppUtils.RECIPE_KEY, Parcels.wrap(clickedRecipe));\n startActivity(intent);\n }", "public void printAdjustedRecipeDetails(Recipe adjustmentNeeded) {\r\n listOfRecipes.add(new Recipe().adjustPortion(adjustmentNeeded));\r\n }", "public void insert(Recipe recipe ) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\tsession.save(recipe);\n\t\ttx.commit();\n\t\tsession.close();\n\t}", "@Test\r\n public void testPurChaseBeverageWithNonValidRecipe() {\r\n coffeeMaker.addRecipe(recipe3); // add mocha which use 20 chocolate while we only have 15 chocolate\r\n assertEquals(75, coffeeMaker.makeCoffee(1, 75)); // non valid recipe\r\n }", "@Test\r\n public void testEditRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.editRecipe(0, recipe2));\r\n }", "@RequestMapping(value = \"/addRecipe\", method = RequestMethod.GET, consumes={\"text/html\"}, produces={\"text/xml\"})\n\t@ResponseBody\n\tpublic EditRecipeResponse addRecipe(@RequestBody Recipe recipe) {\n\t\tEditRecipeRequest request = new EditRecipeRequest();\n\t\tEditRecipeResponse response = null;\n\n\t\trequest.setEditType(\"ADD\");\n\t\trequest.setRecipe(recipe);\n\t\ttry {\n\t\t\tresponse = recipeJaxProxyService.editRecipe(request);\n\n\t\t\tlogger.debug(response.getCode());\n\t\t} catch (SoapFaultClientException sfce) {\n\t\t\tlogger.error(\"We sent an invalid message\", sfce);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Unexpected exception\", e);\n\t\t}\n\n\t\treturn response;\n\t}", "@PostMapping(\"/lerValores\")\n\tpublic ModelAndView lerValores(Recipe recipe) {\n\t\trecipes.add(new Recipe(recipe.getName(), recipe.getTimeRecipe(), recipe.getCreatedBy()));\n\t\treturn getMV();\n\t}", "@Test\n\tpublic void testAddTheNotUniqueNameOfRecipe() {\n\t\tcoffeeMaker.addRecipe(recipe1);\n\t\tassertFalse(coffeeMaker.addRecipe(recipe1));\n\t}", "public static void startRecipeActivity(Context context, int id) {\n Log.i(\"RecipeActivity\", \"1...\");\n\n // save selected recipe id to SharedPrefs so that in the RemoteViewsFactory we\n // can retrieve it and then retrieve the corresponding ingredient list stored in Room\n SharedPreferences prefs = context.getSharedPreferences(\n \"com.example.app\", Context.MODE_PRIVATE);\n prefs.edit().putInt(\"selected_recipe\", id).apply();\n\n //Update widgets\n Intent widgetIntent = new Intent(context, BakingWidgetProvider.class);\n widgetIntent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);\n\n // https://stackoverflow.com/a/7738687/3500752\n int[] ids = AppWidgetManager.getInstance(context).getAppWidgetIds(\n new ComponentName(context, BakingWidgetProvider.class)\n );\n widgetIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, ids); // this will trigger onUpdate from AppWidgetProvider\n context.sendBroadcast(widgetIntent);\n\n Intent intent = new Intent(context, RecipeActivity.class);\n\n intent.putExtra(RECIPE_ID, id);\n context.startActivity(intent);\n }", "private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }", "@Override\n protected void onResume() {\n displayRecipe();\n super.onResume();\n }", "public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() {\n if (recipeBuilder_ != null) {\n return recipeBuilder_.getMessageOrBuilder();\n } else {\n return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_;\n }\n }", "public Patient(Reading reading) {\n this.firstName = reading.firstName;\n this.lastName = reading.lastName;\n this.ageYears = reading.ageYears;\n\n this.readings.add(reading);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (isEditableRecipe()) {\n\t\t\t\t\t\teditMode();\n\t\t\t\t\t\tButton saveButton = (Button) findViewById(R.id.b_recipeSave);\n\t\t\t\t\t\tsaveButton\n\t\t\t\t\t\t\t\t.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t// AS: The save button calls editRecipe\n\t\t\t\t\t\t\t\t\t\t// then finishes\n\t\t\t\t\t\t\t\t\t\teditRecipe(recipeString);\n\t\t\t\t\t\t\t\t\t\tsavedDialog();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\tButton newIngredientButton = (Button) findViewById(R.id.bNewIngredient);\n\n\t\t\t\t\t\tnewIngredientButton\n\t\t\t\t\t\t\t\t.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\tingredientDialog();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowThatNotEditable();\n\t\t\t\t\t}\n\t\t\t\t}", "private Recipe grabRecipeInfo() {\n\t\t// Get the number of images the recipe has\n\t\tImageController.updateImageNumber(currentRecipe);\n\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\tString title = etTitle.getText().toString();\n\t\tString description = etDescription.getText().toString();\n\t\tString directions = etDirections.getText().toString();\n\t\tString email = currentRecipe.getCreatorEmail();\n\t\tRecipe newRecipe = new Recipe();\n\t\tnewRecipe.setName(title);\n\t\tnewRecipe.setDescription(description);\n\t\tnewRecipe.setDirections(directions);\n\t\tnewRecipe.setIngredients(currentRecipe.getIngredients());\n\t\tnewRecipe.setQuantities(currentRecipe.getQuantities());\n\t\tnewRecipe.setUnits(currentRecipe.getUnits());\n\t\tnewRecipe.setCreatorEmail(email);\n\t\tnewRecipe.setRecipeId(currentRecipe.getRecipeId());\n\t\treturn newRecipe;\n\n\t}", "public final void rule__Pantry__IngredientAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPantryTextual.g:952:1: ( ( ruleIngredient ) )\n // InternalPantryTextual.g:953:2: ( ruleIngredient )\n {\n // InternalPantryTextual.g:953:2: ( ruleIngredient )\n // InternalPantryTextual.g:954:3: ruleIngredient\n {\n before(grammarAccess.getPantryAccess().getIngredientIngredientParserRuleCall_1_0()); \n pushFollow(FOLLOW_2);\n ruleIngredient();\n\n state._fsp--;\n\n after(grammarAccess.getPantryAccess().getIngredientIngredientParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void shareRecipe(){\n Intent shareRecipeIntent = new Intent();\n shareRecipeIntent.setAction(Intent.ACTION_SEND);\n shareRecipeIntent.putExtra(Intent.EXTRA_TITLE, \"Check out this recipe that I found on My Recipes Book\");\n shareRecipeIntent.putExtra(Intent.EXTRA_TEXT, setTextForSharing());\n shareRecipeIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(shareRecipeIntent, getResources().getString(R.string.share_intent_text)));\n }", "public void showSelectedRecipe() {\n selected = recipeList.getSelectedValue().toString();\n recipeName.setText(selected);\n recipeInfo.setText(model.getRecipeInformation(selected));\n }", "public void OnRecipeSelected();", "public boolean updateRecipe(long id, String recipeName, String recipe,String process, String notes)\n {\n ContentValues cv = new ContentValues();\n cv.put(RECIPE_NAME, recipeName);\n cv.put(RECIPE, recipe);\n cv.put(PROCESS, process);\n cv.put(NOTES, notes);\n this.openWriteableDB();\n db.update(TABLE_RECIPES, cv, \"_id = ?\", new String[]{String.valueOf(id)});\n db.close();\n return true;\n }", "@RequestMapping(\"/newRecipeDoctor\")\r\n\tpublic ModelAndView newRecipeDoctor(@RequestParam Integer recipe_idr) {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\t\tmav.addObject(\"recipe_idr\", recipe_idr);\r\n\t\tmav.addObject(\"doctor\", new Doctor());\r\n\t\tmav.addObject(\"newFlag\", true);\r\n\t\tmav.setViewName(\"recipe/doctor/editDoctor.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "@Override\n public void setupRecipes()\n {\n\n }", "@RequestMapping(\"/listRecipePatient\")\r\n\tpublic ModelAndView listRecipePatient(@RequestParam Integer idrKey) {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\r\n\t\tmav.addObject(\"recipe\", recipeDAO.findRecipeByPrimaryKey(idrKey));\r\n\t\tmav.setViewName(\"recipe/patient/listPatient.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "@Override\n\tpublic void save(RecipeTable recipe) {\n\t\t\n\t}", "Recipe getRecipe(CharSequence query);", "protected void displayRecipe(){\n Log.d(\"recipeBook\", \"Retrieving recipe contents\");\n\n MyDBHandler dbHandler = new MyDBHandler(this, null, null, 1);\n\n //retrieve latest recipe name and instructions based on id selected\n Recipe r = dbHandler.findRecipe(id);\n String name = r.getRecipeName();\n String text = r.getRecipeText();\n\n recipeName.setText(name);\n recipeText.setText(text);\n\n //buttons onClick listeners\n editFAB.setOnClickListener(view -> {\n //launch EditActivity so user can edit recipe\n Intent i = new Intent(getApplicationContext(), EditActivity.class);\n i.putExtra(\"id\", id);\n startActivity(i);\n });\n\n deleteFAB.setOnClickListener(view -> {\n //display alert dialog to confirm delete action\n AlertDialog.Builder alert = new AlertDialog.Builder(ViewActivity.this);\n\n alert\n .setTitle(\"Are you sure?\")\n .setMessage(\"This will delete this recipe forever\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", (dialogInterface, i) -> {\n dbHandler.deleteRecipe(id);\n Log.d(\"recipeBook\", \"Recipe deleted\");\n Toast.makeText(getApplicationContext(),\"Recipe deleted\", Toast.LENGTH_SHORT).show();\n finish();\n })\n .setNegativeButton(\"No\", (dialogInterface, i) -> {\n });\n AlertDialog alertDialog = alert.create();\n alertDialog.show();\n });\n }", "@Test\r\n public void testAddDuplicateRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertFalse(coffeeMaker.addRecipe(recipe1));\r\n }", "public Recipe getFirstRecipe(){\n Recipe first = null;\n if(!recipes.isEmpty()){\n first = recipes.get(0);\n }\n return first;//este metodo se llama a partir de la respuesta que recibe del servicio recipeservices\n //que esta construido a su vez por el cliente\n }", "public Recipe findByIdRecipe(int id) {\n\t\tSession session = sessionFactory.openSession();\n\t\treturn (Recipe) session.get(Recipe.class, id);\n\t}", "public void removeRecipe(Recipe recipe) {\r\n \t\trecipeList.remove(recipe);\r\n \t\tpersistenceManager.remove(recipe);\r\n \t}", "private final void updateRecipe(String text, String title) {\n \trecipe.setTitle(title);\n \trecipe.setDescription(text);\n \trecipe.setType(typeSpinner.getSelectedItem().toString());\n \tif(recipe.getId()==null) {\n \t\tnew CreateRecipeTask().execute();\n \t} else {\n \t\tnew UpdateRecipeTask().execute();\n \t}\n }", "@PostMapping(\"/editrecipe\")\n\tpublic ModelAndView editRecipe(Recipe recipe) {\n\t\t\n\t\tRecipe oldRecipe = getRecipeFromList(recipe.getId());\t\t\t\n\t\t\n\t\toldRecipe.setCreatedBy(recipe.getCreatedBy());\n\t\toldRecipe.setName(recipe.getName());\n\t\toldRecipe.setTimeRecipe(recipe.getTimeRecipe());\n\t\t\n\t\treturn getMV();\n\t}", "Dryer startDryingHands(String person);", "public final void cook(){\n\t\t\n\t\tprepare();\n\t\t\n\t\tif(customerWantsMeat()){\t\t\n\t\t\taddMeat();\t\t\n\t\t}\n\t\t\n\t\tif(customerWantsVegetables()){\t\n\t\t\taddVegetables();\t\t\t\n\t\t}\n\t\n\t\tsaveToPlate();\n\t\t\n\t}", "public void createNew(PatientBO patient)\n {\n _dietTreatment = new DietTreatmentBO();\n _dietTreatment.setPatient(patient);\n setPatient(patient);\n }", "static void TinkersEdits()\n\t{\n\t\tGameRegistry.addShapelessRecipe(new ItemStack(14276/*Seared Brick Ingot*/,3,2), new ItemStack(1474/*Seared Brick Block*/,1,2));\n\t}", "public static void reci(){\n\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(generatorBase, 1),\"XXX\", \"XXX\", \"XXX\", 'X', ItemHandler.ironHard));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(generatorCombust, 1), \"XYX\", \"DFD\", \"XXX\", 'X', generatorBase, 'Y', \"gemDiamond\", 'D', \"dustRedstone\", 'F', Blocks.furnace));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(tank, 1), \"XXX\", \"XYX\", \"XXX\", 'X', ItemHandler.ironHard, 'Y', \"blockGlass\"));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(charcoalBlock, 1), \"CCC\", \"CCC\", \"CCC\", 'C', new ItemStack(Items.coal, 1, 1)));\n GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.coal, 9, 1), new ItemStack(charcoalBlock)));\n }", "public FoodRecycle(final Food food, boolean canReproduct) {\n this.food = food;\n this.canReproduct = canReproduct;\n }", "private void createRecipeFromFile() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers,\n // it would be \"*/*\".\n intent.setType(\"*/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }" ]
[ "0.6443774", "0.6354208", "0.6342275", "0.63385683", "0.63161933", "0.62483585", "0.6169747", "0.6150255", "0.61055535", "0.6055324", "0.60491556", "0.6039106", "0.60348976", "0.601741", "0.60148394", "0.6009049", "0.5988693", "0.5872324", "0.581816", "0.58082163", "0.5794349", "0.57794213", "0.57741934", "0.57622737", "0.5756198", "0.5755181", "0.5699794", "0.5697918", "0.56796825", "0.5665522", "0.56027085", "0.5591549", "0.5583552", "0.5578792", "0.55737114", "0.55187076", "0.55160016", "0.5505237", "0.54891384", "0.54818195", "0.5478586", "0.5470233", "0.54573035", "0.54458326", "0.54179794", "0.5410495", "0.5404563", "0.5393513", "0.53922355", "0.5391762", "0.5384332", "0.5379598", "0.53728974", "0.53708494", "0.5366196", "0.536602", "0.53241163", "0.5323658", "0.5320405", "0.5311341", "0.5305535", "0.5302989", "0.5296884", "0.52955925", "0.5280494", "0.5275663", "0.52664536", "0.525513", "0.52514225", "0.52487034", "0.52483875", "0.5243186", "0.5237855", "0.52336615", "0.52188206", "0.52083635", "0.51999134", "0.51959395", "0.51929414", "0.51879466", "0.51868224", "0.5184019", "0.51725066", "0.5171241", "0.51708424", "0.51581895", "0.5149185", "0.51406455", "0.5136979", "0.51356494", "0.5133981", "0.5119032", "0.5118784", "0.5117107", "0.5113827", "0.5112854", "0.51072776", "0.51045096", "0.5103864", "0.50977194" ]
0.8171478
0
Send patient to make some health test.
private void assignTests(Patient patient, String test) { patient.setTestToPass(test); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }", "@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}", "@Test(priority = 1, groups= {\"regression\",\"smoke\"})\r\n\tpublic void PrintHospitals()\r\n\t{\r\n\t\tlogger= report.createTest(\"Printing Hospitals as per requirement\");\r\n\t\tDisplayHospitalNames hp=Base.nextPage1();\r\n\t\thp.selectLocation();\r\n\t\thp.selectHospital();\r\n\t\thp.applyFilters();\r\n\t\thp.hospitals();\r\n\t\thp.Back();\r\n\t}", "public void sendToOutpatients(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public void careForPatient(Patient patient);", "public void sendHeartbeat();", "public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}", "@Test\r\n\tpublic void testShootHit() {\n\t\t\r\n\t\tLoginResponse respLoginPepe = service.login(\"pepe\", \"123456\");\r\n\t\tassertEquals(LoginStateEnum.OK,respLoginPepe.getState());\r\n\t\t\r\n\t\tLoginResponse respLoginJuan = service.login(\"juan\", \"123456\");\r\n\t\tassertEquals(LoginStateEnum.OK,respLoginJuan.getState());\r\n\t\t\r\n\t\t// pepe pide usuarios disponibles\r\n\t\t\r\n\t\tGetUsersResponse usersResponse = service.getAvailableUsers(respLoginPepe.getToken());\r\n\t\tList<String> users = usersResponse.getUsers();\r\n\t\tassertNotNull(users);\r\n\t\tassertEquals(1,users.size());\r\n\t\t\r\n\t\t// pepe le declara la guerra a juan (por lo tanto tendrá derecho al primer disparo)\r\n\t\tDeclareWarResponse warResp = service.declareWar(respLoginPepe.getToken(), \"juan\");\r\n\t\tString warToken=warResp.getWarToken();\r\n\t\tSystem.out.println(warToken);\r\n\t\tassertNotNull(warToken);\r\n\t\t\r\n\t\t// Juan recibe invitación a pelear de Pepe\r\n\t\tNotificationResponse warDeclaredResp = service.getNotification(respLoginJuan.getToken());\r\n\t\tList<NotificationDto> nots= warDeclaredResp.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tNotificationDto not = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.DECLARED_WAR,not.getNotificationType());\r\n\t\tassertEquals(\"pepe\",not.getSenderNick());\r\n\t\t\r\n\t\t// Juan acepta el reto.\r\n\t\tAcceptDeclaredWarResponse declaredWarResponse = service.acceptDeclaredWar(respLoginJuan.getToken(), not.getWarToken());\r\n\t\tassertEquals(MessageStateEnum.OK, declaredWarResponse.getState());\r\n\t\t\r\n\t\t// Pepe recibe la notificación que Juan le aceptó el reto\r\n\t\tNotificationResponse juanAceptaRetoNotif = service.getNotification(respLoginPepe.getToken());\r\n\t\tnots= juanAceptaRetoNotif.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tnot = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.ACCEPTED_WAR,not.getNotificationType());\r\n\t\tassertEquals(\"juan\",not.getSenderNick());\r\n\t\t\r\n\t\t// Pepe Valida su flota\r\n\t\tValidateFleetResponse validateFleetResponse = service.validateFleet(respLoginPepe.getToken(), not.getWarToken(), fleet);\r\n\t\tassertEquals(MessageStateEnum.OK, validateFleetResponse.getState());\t\t\r\n\t\t\r\n\t\t// Juan valida la flota\r\n\t\t\r\n\t\tvalidateFleetResponse = service.validateFleet(respLoginJuan.getToken(), not.getWarToken(), fleet);\r\n\t\tassertEquals(MessageStateEnum.OK, validateFleetResponse.getState());\r\n\t\t\r\n\t\t// Pepe recibe la notificación para primer disparo\r\n\t\tNotificationResponse primerDisparoNotif = service.getNotification(respLoginPepe.getToken());\r\n\t\tnots= primerDisparoNotif.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tnot = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.TURN_TO_SHOOT,not.getNotificationType());\r\n\t\t\r\n\t\t\r\n\t\t//finalmente Dispara\r\n\t\t\r\n\t\tShootResponse shootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"1\", \"d\");\r\n\t\t// tocado, vuelve a disparar\r\n\t\tassertEquals(ShootEnum.HIT, shootResp.getShootResult());\r\n\r\n\t\t// disparo\r\n\t\t\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"2\", \"d\");\r\n\t\t// tocado\r\n\t\tassertEquals(ShootEnum.HIT, shootResp.getShootResult());\r\n\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"3\", \"d\");\r\n\r\n\t\t// hundido\r\n\t\tassertEquals(ShootEnum.HIT_SUNK, shootResp.getShootResult());\r\n\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"0\", \"d\");\r\n\r\n\t\t// agua\r\n\t\tassertEquals(ShootEnum.WATER, shootResp.getShootResult());\r\n\r\n\t\t\r\n\t\t// Juan quiere conocer los disparos de Pepe\r\n\t\t\r\n\t\tShootNotificationResponse shootNotifResp = service.getShootNotification(respLoginJuan.getToken());\r\n\t\tList<Shoot> shoots = shootNotifResp.getShoots();\r\n\t\tassertNotNull(shoots);\r\n\t\tassertEquals(4, shoots.size());\r\n\t\tShoot shoot1 = shoots.get(0), shoot2= shoots.get(1), shoot3 = shoots.get(2),shoot4 = shoots.get(3);\r\n\t\tassertEquals(\"1\", shoot1.getX());\r\n\t\tassertEquals(\"d\", shoot1.getY());\r\n\t\tassertEquals(\"2\", shoot2.getX());\r\n\t\tassertEquals(\"d\", shoot2.getY());\r\n\t\tassertEquals(\"3\", shoot3.getX());\r\n\t\tassertEquals(\"d\", shoot3.getY());\r\n\t\tassertEquals(\"0\", shoot4.getX());\r\n\t\tassertEquals(\"d\", shoot4.getY());\r\n\t\t\r\n\t\t// Juan se arrepiente. (si no hago esto no me deja desloguear)\r\n\t\t\r\n\t\tRetireOfWarResponse retireOfWarResponse = service.retireOfWar(respLoginJuan.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK, retireOfWarResponse.getState());\r\n\t\t\r\n\t\tLogoutResponse respLogoutPepe = service.logout(respLoginPepe.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK,respLogoutPepe.getState());\r\n\t\t\r\n\t\tLogoutResponse respLogoutJuan = service.logout(respLoginJuan.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK,respLogoutJuan.getState());\r\n\t\t\r\n\t}", "@Test\n public void testSend() throws Exception {\n System.out.println(\"send\");\n Sendable s = sendAMessage();\n }", "void reportHeartbeat();", "public void outcomePost(String patient, String outcomeType, String outcomeDate, String notes ){\n Callback<Outcome> callback = new Callback<Outcome>() {\n\n @Override\n public void success(Outcome serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceOutcomeServerResponse(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postOutcome(patient, outcomeType, outcomeDate, notes, callback);\n }", "@Test\n public void testCreatePatient() throws Exception {\n System.out.println(\"createPatient\");\n String wscaller = \"\";\n String nom = \"\";\n Integer num_secu = null;\n String adresse = \"\";\n String email = \"\";\n String telephone = \"\";\n String code_postal = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MonWebService instance = (MonWebService)container.getContext().lookup(\"java:global/classes/MonWebService\");\n String expResult = \"\";\n String result = instance.createPatient(wscaller, nom, num_secu, adresse, email, telephone, code_postal);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void reportPost(String title, String reportType, String patient, String notes){\n Callback<MedicalRecord> callback = new Callback<MedicalRecord>() {\n\n @Override\n public void success(MedicalRecord serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceMRecordServerEvent(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postMedicalReport(title, reportType, patient, notes, callback);\n }", "public void patientPost(String firstName, String lastName, String facility, String dob, String sex){\n\n Callback<Users> callback = new Callback<Users>() {\n\n @Override\n public void success(Users serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceServerEvent(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postData(firstName, lastName, dob, facility, sex, callback);\n }", "public void postHealthCheckResponse(Event event) {\n Event<Health> healthCheckEvent = new Event<>(event);\n healthCheckEvent.setStatus(Status.TEMP_UPSTREAM_QUEUE);\n\n if (healthCheck()) {\n healthCheckEvent.addData(new Health(\"adapter\", HealthStatus.APPLICATION_HEALTHY.name()));\n } else {\n healthCheckEvent.addData(new Health(\"adapter\", HealthStatus.APPLICATION_UNHEALTHY));\n healthCheckEvent.setMessage(\"The adapter is unable to communicate with the application.\");\n }\n\n eventResponseService.postResponse(healthCheckEvent);\n }", "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "void reportHeartbeatRpcSuccess();", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "private void GenerateHealth(){\t\t\n\t\t\n\t\t//Update for the health powerup\n\t\tint randGen = rand.nextInt((int)((float)HEALTH_FREQUENCY * RANDOM_DEVIATION));\n\t\trandGen = (rand.nextBoolean()) ?-randGen :randGen;\n\t\t\n\t\t//D.BUG(\"RandGen is: \" + String.valueOf(randGen));\n\t\t\n\t\tif(timeSinceLastSpawns.get(CollectibleType.Health.ordinal()).intValue() > (HEALTH_FREQUENCY + randGen)){\n\t\t\t\n\t\t\t//D.BUG(\"We have Spawned another health collectible after \" + String.valueOf(randGen + HEALTH_FREQUENCY) + \" milliseconds!\");\n\t\t\ttimeSinceLastSpawns.set(CollectibleType.Health.ordinal(), 0);\n\t\t\t\n\t\t\t//SPAWN HEALTH COLLECTIBLE HERE\n\t\t}\n\t}", "@Override\n public void testPeriodic() {\n //Diagnostics.writeString(\"State\", \"TEST\");\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "@Then ( \"the prescription has been added to the patient\" )\r\n public void successAddPatient () {\r\n // assertTrue( driver.getPageSource().contains( \"Prescription created\r\n // successfully\" ) );\r\n }", "@Override\r\n\t\tpublic void action() {\n\t\t\tswitch (state) {\r\n\t\t\tcase REGISTER:\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" trying to register\");\r\n\t\t\t\t\r\n\t\t\t\t// searching for waiter agent\r\n\t\t\t\twhile(waiter == null) {\r\n\t\t\t\t\twaiter = searchWaiterAgent(\"waiter-service\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tACLMessage cfp = new ACLMessage(ACLMessage.CFP);\r\n\t\t\t\tcfp.addReceiver(waiter);\r\n\t\t\t\tcfp.setContent(\"philosopher-agent\");\r\n\t\t\t\tcfp.setConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tcfp.setReplyWith(\"cfp\"+System.currentTimeMillis());\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" send registration request \" + cfp);\r\n\t\t\t\tmyAgent.send(cfp);\r\n\t\t\t\t\r\n\t\t\t\t// Prepare template to get response\r\n\t\t\t\t//mt = MessageTemplate.and(MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\"),\r\n\t\t\t\t//\t\tMessageTemplate.MatchInReplyTo(request.getReplyWith()));\r\n\t\t\t\tmt = MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tstate = State.REGISTERED;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase REGISTERED:\r\n\t\t\t\tACLMessage response = myAgent.receive();\r\n\t\t\t\tif (response != null && response.getConversationId().equals(\"philosopher-waiter-fork\")) {\r\n\t\t\t\t\tif (response.getPerformative() == ACLMessage.SUBSCRIBE) {\r\n\t\t\t\t\t\t// behaviour can be finished\r\n\t\t\t\t\t\tregistered = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registered Successfully\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tregistered = false;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registration in progress\");\r\n\t\t\t\t\t\tstate = State.REGISTER;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(myAgent.getAID().getName() + \" blocked\");\r\n\t\t\t\t\tblock();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic void declarehealthy(Patient patient) {\n\t\tsf.getCurrentSession().evict(patient);\n\n\t\tpatient.setHealthy(true);\n\n\t\tsf.getCurrentSession().update(patient);\n\n\t}", "@Test\n\tpublic void lateHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfLateHires() == 1);\n\t}", "@Test\n public void enemySustainMassiveDamage() {\n }", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "@Test\n public void testSendInvite()\n {\n System.out.println(\"sendInvite\");\n Account invite = null;\n Account sender = null;\n Party instance = null;\n instance.sendInvite(invite, sender);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void sustainMassiveDamage() {\n }", "@Test\n void testHumanActionMakeSpeak(){\n Humans human = new Humans();\n human.setName(\"tuandung\");\n\n human.setCalm(100);\n assertEquals(human.getName() + \" \"+ \"wanna stop that war\", human.makeSpeakVote(),\"stop the war when calm\");\n human.setCalm(0);\n assertEquals(human.getName() + \" \"+ \"said what ever\", human.makeSpeakVote(),\"human make speak when calm < 0\");\n }", "public void sendInformation() throws IOException {\n\t\tURL url = new URL(\"http://localhost:8082/EmergencyWebService/addAlert/\" + this.localisation.x + \"/\" + this.localisation.y + \"/\" + this.range); \n\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection(); \n\t\tconnection.setRequestMethod(\"POST\"); \n\t\tconnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\"); \n\t\tconnection.setDoOutput(true); \n\t\t\n\t\tOutputStream os = connection.getOutputStream(); \n\t\tOutputStreamWriter osw = new OutputStreamWriter(os, \"UTF-8\"); \n\t\tosw.write(Tools.toJsonString(this.alerte)); \n\t\tosw.flush(); \n\t\tosw.close();\n\t\t\n\t\tconnection.getInputStream();\n\t\t\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader(connection.getInputStream()));\n\t\tString inputLine;\n\t\tStringBuffer response = new StringBuffer(); \n\t\twhile ((inputLine = in.readLine()) != null) { \n\t\t\tresponse.append(inputLine); \n\t\t} \n\t\tin .close();\n\t\t\n\n\n\t}", "@Test\n\tpublic void testCalHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(55);\n\t\tassertFalse(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.calHealth();\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t}", "HospitalSystem(Patient patient, Action action){\r\n\t\tthis.patient=patient;\r\n\t\treferredTo=action;\r\n\t\t\r\n\t\t//call the selection action method which will process the patient\r\n\t\tselectAction();\r\n\t\t\r\n\t}", "public void sendAlert(String notificationInfo, ILabMember personInCharge) {\n }", "@Test\n public void testHealthy() {\n checker.checkHealth();\n\n assertThat(checker.isHealthy(), is(true));\n }", "@Test\n public void lowHealthWarningTest() {\n }", "public void goHospital()\n\t{\n\t\tsynchronized (this) {\n\t\tworld.hospitalizedIndividual();\n\t\tcurrentState.goHospital();\n\t\t}\n\t}", "public void ping(long timeout) {\n //prepearing test message\n \n writeRoutingLabel(sltm, 0,0,link.sls,dpc,opc);\n sltm[0] = (byte) 0xC1; // 1100 0001\n sltm[5] = 0x11;\n sltm[6] = (byte) (SLTM_PATTERN.length << 4);\n System.arraycopy(SLTM_PATTERN, 0, sltm, 7, SLTM_PATTERN.length);\n \n //sending test message\n link.queue(sltm);\n \n //incremeting number of tries.\n tryCount++;\n \n //scheduling timeout\n testFuture = mtpTimer.schedule(this, timeout, TimeUnit.SECONDS);\n if (logger.isDebugEnabled()) {\n \tlogger.debug(String.format(\"(%s) Test request, try number = %d\", link.name, tryCount));\n }\n }", "@Given ( \"^There exists an obstetrics patient in the iTrust2 system$\" )\n public void patientExistsInSystem () {\n attemptLogout();\n DomainObject.deleteAll( LaborDeliveryReport.class );\n DomainObject.deleteAll( ObstetricsRecord.class );\n\n // Create the test User\n final User user = new User( patientString, \"$2a$10$EblZqNptyYvcLm/VwDCVAuBjzZOI7khzdyGPBr08PpIi0na624b8.\",\n Role.ROLE_PATIENT, 1 );\n user.save();\n\n // The User must also be created as a Patient\n // to show up in the list of Patients\n final Patient patient = new Patient( user.getUsername() );\n patient.setGender( Gender.Female );\n patient.setEthnicity( Ethnicity.Caucasian );\n patient.setAddress1( \"140 George Rd.\" );\n patient.setCity( \"Raleigh\" );\n patient.setState( State.NC );\n patient.setZip( \"27606\" );\n patient.setPhone( \"123-456-7891\" );\n patient.save();\n }", "public void sendHearBeat() {\n try {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"type\", WsMessage.MessageType.HEART_BEAT_REQ);\n this.wsManager.sendMessage(WsMessage.MessageType.HEART_BEAT_REQ, jsonObject.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "@Test\n public void testSend() throws Exception {\n//TODO: Test goes here...\n message.send(\"hello\", \"Bob\");\n }", "@Test\n public void testNotifySingleDeviceInterruption() {\n ControllerEntity controller = new ControllerEntity(1L, \"EUI\", \"KEY\", ControllerCommunicationChannel.LORA);\n\n DeviceEntity device = new DeviceEntity(1L, \"Device\", null, controller);\n\n InterruptionGroupEntity group = new InterruptionGroupEntity(\n 1L,\n OffsetDateTime.ofInstant(Instant.ofEpochSecond(0), ZoneOffset.UTC),\n OffsetDateTime.ofInstant(Instant.ofEpochSecond(100), ZoneOffset.UTC));\n\n InterruptionEntity interruption = new InterruptionEntity(1L, device, group, false, null);\n\n Mockito.when(deviceController.listByInterruption(Mockito.any()))\n .thenReturn(Arrays.asList(device));\n\n subject.notifyInterruption(interruption);\n\n String expectedPost = \"http://jouko.test/?DevEUI=EUI\"\n + \"&FPort=1\"\n + \"&Payload=7b43676f4b43416742454145594143426b7d\"\n + \"&AS_ID=as\"\n + \"&Time=1970-01-01T00:00:00Z\"\n + \"&Token=5b89dcabdeadcd07a523a6a26f94c951a4bc8b14947e30a048615010a4d3f034\";\n\n Assert.assertEquals(1, postResults.size());\n Assert.assertEquals(expectedPost, postResults.get(0));\n }", "void doCheckHealthy();", "@Test(groups = \"his.wardadmission.test\")\n\tpublic void addWardTestCase() throws IOException, JSONException {\n\n\t\tJSONObject jsonRequestObject = new JSONObject(RequestUtil\n\t\t\t\t.requestByID(TestCaseConstants.ADD_WARD_ADMISSION));\n\t\t\n\t\tArrayList<String> resArrayList = getHTTPResponse(\n\t\t\t\tproperties\n\t\t\t\t\t\t.getProperty(TestCaseConstants.URL_APPEND_ADD_WARD_ADMISSION),\n\t\t\t\tTestCaseConstants.HTTP_POST, jsonRequestObject.toString());\n\n\t\tSystem.out.println(\"message :\"+resArrayList.get(0));\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(resArrayList.get(0));\n\t\t\n\t\tBHT_No= jsonObject.getString(\"bhtNo\");\n\t\tPatient_ID = jsonObject.getJSONObject(\"patientID\").getString(\"patientID\");\n\t\tWard_No= jsonObject.getString(\"wardNo\");\n\n\t\tAssert.assertEquals(Integer.parseInt(resArrayList.get(1)),\n\t\t\t\tSUCCESS_STATUS_CODE);\n\t\tAssert.assertEquals(BHT_No,jsonRequestObject.getString(\"bhtNo\"));\n\t}", "private void sendDeviceStatus() {\n if (hasRecover && zWaveSubDevice != null) {\n ZWaveDeviceEvent zde = new ZWaveDeviceEvent();\n try {\n PropertyUtils.copyProperties(zde, zWaveSubDevice.getZwavedevice());\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n zde.setReport(zrb.getReport());\n zde.setEventtime(new Date());\n\n JMSUtil.sendmessage(IRemoteConstantDefine.WARNING_TYPE_DEVICE_STATUS, zde);\n }\n }", "void setHappiness(int happiness);", "private void stressTest() {\n\t\t\n\t\tTimerTask task = new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tint count = 1;\n\t\t\t\tint len = 100;\n\t\t\t\tint maxCount = 1000000;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Start stress test...\");\n\t\t\t\twhile (count <= maxCount) {\n\t\t\t\t\t\n\t\t\t\t\tif ((count % 1000) == 0) {\n\t\t\t\t\t\tSystem.out.println(\"Count: \" + count + \" of \" + maxCount);\n\t\t\t\t\t\tSystem.gc();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlong larray[] = new long[len];\n\t\t\t\t\t\n\t\t\t\t\tlarray[0] = count;\n\t\t\t\t\tlarray[len-1] = count;\n\t\t\t\t\t\n\t\t\t\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\t\t\t\tmessage.setPayload(larray);\n\t\t\t\t\tsend(message);\n\n\t\t\t\t\t\n//\t\t\t\t\ttry {\n//\t\t\t\t\t\tThread.sleep(25);\n//\t\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t}\n\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Done.\");\n\n\t\t\t}\n\n\t\t};\n\n\t\tTimer timer = new Timer();\n\t\t// one time schedule\n\t\ttimer.schedule(task, 2000L);\n\t}", "private void sendAlert(int billType) throws IOException{\n try (PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"alerts.txt\", true)))) {\n out.println(\"Please restock the cash machine with the following bill type: \" + billType);\n System.out.println(\"Alert has been sent out\");\n }\n }", "public void thankYouVet(){\n System.out.println(\"PetOwner says ... thank you Vet!\");\n }", "public Result healthz() {\n return ok(\"OK\");\n }", "@Test\n public void testRobustnessRegisterKyc(){\n for (int i = 0; i < 100; i++){\n UserRegisterKYC userRegisterKyc = new UserRegisterKYC(RandomInput.randomString(), RandomInput.randomString(), RandomInput.randomString(), RandomInput.randomString());\n int requestResponse = userRegisterKyc.sendRegisterRequest();\n assertFalse(requestResponse==200);\n }\n }", "@When(\"^clicks request$\")\n public void patient_clicks_request() throws Throwable {\n \t//appt request has been saved and is pending...\n \tAssert.assertTrue(appt.getApptType() != null);\n \tAssert.assertTrue(appt.getDate() != null);\n \tAssert.assertTrue(appt.getComment() != null);\n \t//check if the above items have been set correctly from the previous method\n }", "@Test\n public void testTegisterPatient(){\n register.registerPatient(\"Donald\", \"Trump\",\"16019112345\", \"Doctor Proctor\");\n assertEquals(1, register.getRegisterSize());\n }", "@Test\n\tpublic void testSayMessageOnRequest(){\n\t\tSystem.out.println(\"\\nMensajes aleatorios al aparecer el Meesek:\\n\");\n\t\tMrMe.sayMessageOnRequest();\n\t\tMrMe.sayMessageOnRequest();\n\t\tMrMe.sayMessageOnRequest();\n\t}", "private synchronized void sendDecreaceHealth(){\r\n\t\t\tfor(PrintWriter p : players){\r\n\t\t\t\tif(p != null){\r\n\t\t\t\t\tp.println(\"6\");\r\n\t\t\t\t\tp.println(Integer.toString(x));\r\n\t\t\t\t\tp.println(Integer.toString(y));\r\n\t\t\t\t\tp.flush();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}", "public void ektypwsiAstheni() {\n\t\t// Elegxw an yparxoun astheneis\n\t\tif(numOfPatient != 0)\n\t\t{\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"INFO FOR PATIENT No.\" + (i+1) + \":\");\n\t\t\t\tpatient[i].print();\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS PROS EMFANISH!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Test\n\tpublic void testTHealthIncrease1() {\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "public void sendTestFutureNotification() {\n\n }", "@When(\"Try to Attempt sending crafted records to DNS cache\")\npublic void tryattemptsendingcraftedrecordstodnscache(){\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRGas(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates meter read submission and Email to customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .overlay()\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "public void enrollmentPost(String patient, String comment, String program, String date){\n Callback<Enrollment> callback = new Callback<Enrollment>() {\n\n @Override\n public void success(Enrollment serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceEnrollmentServerEvent(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postEnrollments(patient, comment, program, date, callback);\n }", "@Test\r\n public void testSendWelcomeSignupMessageSMS_ExistingUser() {\n String mobile = \"9908599937\";//\"9887589396\";\r\n boolean smsSendEnabled= false;\r\n //Commuter commuter = commuterService.getCommuterById(commuter_id);\r\n Commuter commuter = commuterService.getCommuterByMobile(mobile);\r\n boolean userRegistrationExist = true;\r\n boolean status = commuterService.sendWelcomeSignupMessageSMS(commuter, -1, userRegistrationExist, smsSendEnabled);\r\n if (status) {\r\n System.out.println(\"status:\" + status);\r\n }\r\n }", "@Test(enabled = true, groups = {\"servicetest.p1\"})\n public void testGetHealthCheck(){\n\n RestResponse<HealthCheck> healthCheckRestResponse = new ServiceWorkflow().getHealthCheck();\n Assert.assertTrue(healthCheckRestResponse.getStatus() == 200, \"Invalid Status\");\n Assert.assertEquals(healthCheckRestResponse.getBody().getService(),serviceName, \"Incorrect Service Name\");\n Assert.assertEquals(healthCheckRestResponse.getBody().getVersion(),version, \"Incorrect version\");\n }", "@Test(groups = \"his.wardadmission.test\", dependsOnMethods = { \"addWardTestCase\" })\n\tpublic void getPatientInformationByBHTNoTestCase() throws IOException, JSONException {\n\n\t\tArrayList<String> resArrayList = getHTTPResponse(properties.getProperty(TestCaseConstants.URL_GET_PATIENT_INFORMATION_BY_BHT_NO)+BHT_No,\n\t\t\t\t TestCaseConstants.HTTP_GET, null);\n\n\t\t\n\t\tJSONArray jsonArray = new JSONArray(resArrayList.get(0));\n\t\tJSONObject jsonObject = ((JSONObject) jsonArray.get(jsonArray.length() - 1));\n\n\t\tAssert.assertEquals(Integer.parseInt(resArrayList.get(1)), SUCCESS_STATUS_CODE);\n\t\tAssert.assertEquals(jsonObject.getString(\"bhtNo\"), BHT_No);\n\t\t\n\n\t}", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "public void communicate() {\r\n System.out.println(\"This iPhone is making a phone call.\");\r\n }", "@Test\n\tpublic void test03_AcceptARequest(){\n\t\tinfo(\"Test03: Accept a Request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t/*Step Number: 1\n\t\t *Step Name: Accept a request\n\t\t *Step Description: \n\t\t\t- Login as John\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of mary\n\t\t\t- Click on Accept button\n\t\t *Input Data: \n\t\t/*Expected Outcome: \n\t\t\t- The invitation of root, mary is shown on the invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- John is connected to mary and the invitation fades out and is permanently removed from the list\n\t\t\t- Request of root are moving to the top of the gadget if needed*/ \n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_ACCEPT_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\n\tpublic void test02_CheckDisplayInvitationGadget(){\n\t\tinfo(\"prepare data\");\n\t\t/*Step Number: 1\n\t\t *Step Name: Check display gadget\n\t\t *Step Description: \n\t\t\t- Login as userA\n\t\t\t- Open intranet home\n\t\t\t- Check Invitation gadget\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- A maximum number of displayed requests is 4\n\t\t\t-The oldest request will appear at the bottom while the newest will appear on the top\n\t\t\t- For user request, the gadget displays the profile picture of the user, his name and if available, his title.\n\t\t\t- For Spaces request, the gadget displays the space icon, the name, privacy status which is private or public, and the number of members in the space.\n\t\t\t- The title of the gadget will show the total number of requests received which is 4*/ \n\t\tinfo(\"Create datatest\");\n\t\tString space1=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString space2=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString space3=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username3 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password3 = username3;\n\t\tString email3= username3 + mailSuffixData.getMailSuffixRandom();\n\n\t\t/*Create data test*/\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\t\taddUserPage.addUser(username3, password3, email3, username3, username3);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tinfo(\"Sign in with username1 account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space1,space1);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tinfo(\"Sign in with username2 account\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space2,space2);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tinfo(\"Sign in with username3 account\");\n\t\tmagAc.signIn(username3, password3);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space3,space3);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tinfo(\"Verify that the maximum number of displayed requests is 4\");\n\t\tinfo(\"Verify that for user request, the portlet will displayes the profile picture of the user, his name\");\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username3));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space3));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space2));\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space1));\n\n\t\tinfo(\"Verify that for space request, the gadget displays the space icon, the name, privacy status which is private or public, and the number of members in the space.\");\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_STATUS_MEMBERS.replace(\"${name}\",space3).replace(\"${statusMember}\",\"Private Space - 1 Members\"));\n\n\t\tinfo(\"Verify that The title of the gadget will show the total number of requests received which is 5\");\n\t\twaitForAndGetElement(By.xpath(hp.ELEMENT_INVITATIONS_NUMBER.replace(\"${number}\", \"6\")),2000,0);\n\n\t\tinfo(\"Delete DATA for the last test\");\n\t\tinfo(\"Signin with james account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space1, false);\n\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space2, false);\n\n\t\tmagAc.signIn(username3, password3);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space3, false);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t\tuserAndGroup.deleteUser(username3);\n\t}", "@Test\r\n\tpublic void testDischargePatient() {\r\n\t\tsessionController.login(testC1Doctor1, getCampus(0));\r\n\t\tdoctorController.consultPatientFile(testPatient4);\r\n\t\tdoctorController.dischargePatient(); // ontslaat geselecteerde patient in patient file controller\r\n\t\tassertEquals(testPatient4.isDischarged(), true);\r\n\t}", "public void consultDentist() {\n\t\tSystem.out.println(\"Patient \" + id + \" is consulting the dentist.\"); \n\t}", "private String heal(Human human) {\n human.healthLvl += this.healLvl;\n return \"Doctor \" + this.getName() + \" heals \" + human.getName() + \" to \" + human.getHealthLvl() + \" health lvl\";\n }", "public MonitorResult checkDhxSend() {\r\n MonitorResult result = new MonitorResult();\r\n result.setComponent(\"DHX_SEND\");\r\n\r\n logger.info(\"Testing DHX_SEND...\");\r\n\r\n double duration = 0;\r\n Date start = new Date();\r\n long startTime = start.getTime();\r\n\r\n /*\r\n * 1. Query ADIT database for all documents that are meant for sending\r\n * to DHX. If there are messages that are not sent to DHX in the\r\n * specified period, then the connection is broken.\r\n */\r\n\r\n // 1. Query ADIT database\r\n try {\r\n long comparisonDateMs = (new Date()).getTime();\r\n comparisonDateMs = comparisonDateMs - getMonitorConfiguration().getDocumentSendToDhxInterval();\r\n Date comparisonDate = new Date(comparisonDateMs);\r\n\r\n List<DocumentSharing> documentSharings = getDocumentSharingDAO().getDVKSharings(comparisonDate);\r\n\r\n if (documentSharings != null && documentSharings.size() > 0) {\r\n // DVK connection down - documents were found, that have not\r\n // been sent to DVK in time\r\n throw new AditInternalException(\"Number of documents not sent to DVK client in time: \"\r\n + documentSharings.size());\r\n } else {\r\n logger.debug(\"No document sharings found for DVK (with status 'missing' - 100)\");\r\n result.setSuccess(true);\r\n }\r\n\r\n Date end = new Date();\r\n long endTime = end.getTime();\r\n duration = (endTime - startTime) / 1000.0;\r\n result.setDuration(duration);\r\n\r\n } catch (Exception e) {\r\n logger.error(\"Error while testing DVK_SEND: \", e);\r\n result.setSuccess(false);\r\n List<String> exceptions = new ArrayList<String>();\r\n exceptions.add(e.getMessage());\r\n result.setExceptions(exceptions);\r\n }\r\n\r\n return result;\r\n }", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "String initiateHarvesting(String dsID, boolean isfull) throws RepoxException;", "@Test\n public void createComaPatients() {\n \n Assert.assertEquals(service.createComa().get(0).getBedNumber(), \"45\");\n }", "@Then(\"Assert the success of Attempt sending crafted records to DNS cache\")\npublic void assattemptsendingcraftedrecordstodnscache(){\n}", "@Override\n\tpublic SampleResult runTest(JavaSamplerContext arg0) {\n\t\thost=arg0.getParameter(\"host\");\n//\t\tSystem.out.println(\"host:\"+host);\n\t\tport=arg0.getParameter(\"port\");\n\t\tusername=arg0.getParameter(\"username\");\n\t\tpassword=arg0.getParameter(\"password\");\n\t\tphonehead=arg0.getParameter(\"phonehead\");\n\t\tpath=arg0.getParameter(\"path\");\n\t\tTemplateNo=arg0.getParameter(\"TemplateNo\");\n\t\tbatchname=arg0.getParameter(\"batchname\");\n\t\tbiztype=Integer.parseInt(arg0.getParameter(\"biztype\"));\n\t\tif (arg0.getParameter(\"distinctFlag\").toLowerCase().equals(\"true\")){\n\t\t\tdistinctFlag=true;\n\t\t}else{\n\t\t\tdistinctFlag=false;\n\t\t}\n\t\t\n\t\tSampleResult sr = new SampleResult();\n\t\tsr.setSampleLabel( \"Java请求发送sms\");\n\t\ttry {\n sr.sampleStart();// jmeter 开始统计响应时间标记\n DoSendSms_group test = new DoSendSms_group(host,port,username,password,phonehead,path,TemplateNo,batchname,biztype,distinctFlag);\n // 通过下面的操作就可以将被测方法的响应输出到Jmeter的察看结果树中的响应数据里面了。\n test.test();\n resultData = test.getResult();\n if (resultData != null && resultData.getStatus() == 200) {\n sr.setResponseData(\"响应结果:\\n\"+resultData.getResult(), null);\n sr.setResponseCode(resultData.getStatus()+\"\");\n sr.setDataType(SampleResult.TEXT);\n sr.setSuccessful(true);\n }else{\n \tsr.setResponseData(\"响应结果:\\n\"+resultData.getResult(), null);\n sr.setResponseCode(resultData.getStatus()+\"\");\n sr.setDataType(SampleResult.TEXT);\n \tsr.setSuccessful(false);\n }\n } catch (Throwable e) {\n \tsr.setResponseData(\"报错!报错信息如下:\\n\"+e.getMessage(), null);\n \tsr.setResponseCode(ResultState.SERVER_ERROR+\"\");\n sr.setSuccessful(false);\n e.printStackTrace();\n } finally {\n sr.sampleEnd();// jmeter 结束统计响应时间标记\n }\n return sr;\n\t}", "public final void send(int status, int d1) {\n send(status, d1, 0);\n }", "private void sendNotification() {\n }", "@Test\n\tpublic void bikesDamaged()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfBikesDamaged() == 1);\n\t}", "@GetMapping(\"test\")\n\t@Timed\n\t@ResponseStatus(HttpStatus.CREATED)\n\tpublic void saveTransaction() throws ClientProtocolException, IOException {\n\n\t\ttry {\n\t\t\tContext context = new Context();\n\t\t\tcontext.setVariable(\"order\", \"fsdf\");\n\t\t\tcontext.setVariable(\"email\", \"fsdf\");\n\t\t\tcontext.setVariable(\"hash\", \"https://\" + CAN_NETWORK + \"etherscan.io/tx/\");\n\t\t\tcontext.setVariable(\"can\", \"https://\" + CAN_NETWORK + \"etherscan.io/tx/\");\n\t\t\tcontext.setVariable(\"amount\", \"CAN\");\n\t\t\tcontext.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl());\n\t\t\tString content = templateEngine.process(\"mail/transactionConfirm\", context);\n\n\t\t\tsendEmail(\"my3d3d@gmail.com\", \"Transaction Successful\", content, false, true);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void doTask(Entity e) {\r\n\t\tif (getTask().equals(\"heal\")) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tint healing = rand.nextInt(50) + 1;\r\n\t\t\tif (getNumTasks() > 0) {\r\n\t\t\t\tuseTask();\r\n\t\t\t\tif (Jedi.class.isInstance(e)) {\r\n\t\t\t\t\tJedi healMe = (Jedi) e;\r\n\t\t\t\t\thealMe.heal(healing);\r\n\t\t\t\t} else if (Rebel.class.isInstance(e)) {\r\n\t\t\t\t\tRebel healMe = (Rebel) e;\r\n\t\t\t\t\thealMe.heal(healing);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Medical droid heals \" + e.getName()\r\n\t\t\t\t\t\t+ \" with \" + healing + \" hp.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out\r\n\t\t\t\t\t\t.println(\"Medical Droid \"\r\n\t\t\t\t\t\t\t\t+ getName()\r\n\t\t\t\t\t\t\t\t+ \" has run out of number of tasks available to perform.\");\r\n\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Medical Droid \" + getName()\r\n\t\t\t\t\t+ \" has no tasks upon which to perform.\");\r\n\t\t}\r\n\t}", "public void executeAction()\n\t{\t\t\n\t\tthis.getUser().setHealth(this.getUser().getHealth()+HEALTH);\n\t}", "@Test\n public void testTankSetHealth() {\n tank.setHealth(5);\n assertTrue(tank.getHealth() == 5);\n }", "@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}", "public void sendDiscrepancyEmail() throws Exception;", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "@Then(\"^registration should be successful$\")\npublic void registration_should_be_successful() throws Throwable {\n\tSystem.out.println(\"Successfuly completed the regitration process\");\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyThankYouSurveyInAnonymousSMR(){\t\t\t\t\t\t \n\t Report.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the anonymous SMR page for Gas customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRUser\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.verifyAnonymousSAPGasCustomer(smrProfile)\t\t\n\t//.verifySapIsu(smrProfile)\n\t.verifyMeterReadConfirmation(smrProfile);\n\t//.verifyThankYouSurveyPage(smrProfile);\n\t//.verifyAnonymousSAPGasCustomer(smrProfile);\n\n\n}", "public void notifyCreation() {\n Player targetPlayer = this.getTarget().getPlayerReference(Player.class),\n senderPlayer = this.getToTeleport().getPlayerReference(Player.class);\n\n if (targetPlayer == null || senderPlayer == null) {\n return;\n }\n\n MainData.getIns().getMessageManager().getMessage(\"TPA_SENT\").sendTo(senderPlayer);\n\n if (this.type == TeleportType.TPA) {\n MainData.getIns().getMessageManager().getMessage(\"TPA_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n } else if (this.type == TeleportType.TPHERE) {\n MainData.getIns().getMessageManager().getMessage(\"TPHERE_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n }\n\n }", "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "@Test\n\tpublic void testPatient() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<String> entity = new HttpEntity<String>(null, headers);\n\t\tResponseEntity<String> response = restTemplate.exchange(getRootUrl() + \"/edit-patient?id=4\",HttpMethod.GET, entity, String.class);\n\t\tassertEquals(200,response.getStatusCodeValue());\n\t}", "@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}", "public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }", "public void setHealth(int health) {\n this.health = health;\n }", "@Test\n public void sendingGcm() throws Exception {\n\n\n }", "@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}", "public void act(Person hero)\r\n { \r\n // dead people can't act\r\n if (room != null)\r\n {\r\n if(Game.random(5)==0)\r\n {\r\n if (type == MONSTER) \r\n eat(hero);\r\n else \r\n attack(hero);\r\n }\r\n }\r\n }" ]
[ "0.57494694", "0.5656614", "0.560888", "0.5590696", "0.5498365", "0.5461072", "0.54107255", "0.540732", "0.5356648", "0.53532135", "0.5330773", "0.5317514", "0.5287804", "0.5280004", "0.5219135", "0.52165955", "0.52033514", "0.52026606", "0.519428", "0.5164429", "0.5163703", "0.5160806", "0.515759", "0.5155277", "0.5144675", "0.5121027", "0.5115451", "0.5099137", "0.5097095", "0.5096551", "0.5095716", "0.509543", "0.5082341", "0.50785434", "0.50695676", "0.5068865", "0.5068805", "0.506879", "0.50678784", "0.50646776", "0.50645006", "0.5061697", "0.5057757", "0.5053697", "0.5051772", "0.5051357", "0.504866", "0.50389796", "0.50353867", "0.5032092", "0.5028115", "0.50246465", "0.5023656", "0.5019685", "0.5017853", "0.501677", "0.50087506", "0.5004945", "0.50035036", "0.50008804", "0.5000168", "0.49910182", "0.4986225", "0.49852315", "0.4980665", "0.49792296", "0.49705327", "0.49688703", "0.49677396", "0.49650213", "0.49640316", "0.49580052", "0.49531987", "0.49511027", "0.49401656", "0.49389392", "0.49360955", "0.49357408", "0.49333447", "0.4931469", "0.49310607", "0.49195516", "0.49186265", "0.49177694", "0.49165586", "0.4914895", "0.49115855", "0.49075437", "0.49013644", "0.48996463", "0.48980278", "0.48974764", "0.48952463", "0.48947567", "0.48947397", "0.48913053", "0.48891577", "0.48882976", "0.48866266", "0.48851806" ]
0.507575
34
Visit patient at its house.
private void visitPatientAtHome(Patient patient) { patient.setHomeVisited(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "public void careForPatient(Patient patient);", "@Override\n\tpublic void visit(final GrandMa person) {\n\t\t\n\t}", "@Override\n\tpublic void visit(final GrandPa person) {\n\t\t\n\t}", "@Then ( \"I should see that I am a personal representative for (.+)\" )\n public void viewAmRepFor ( final String patient ) throws InterruptedException {\n driver.get( driver.getCurrentUrl() );\n Thread.sleep( PAGE_LOAD );\n wait.until( ExpectedConditions.visibilityOfElementLocated( By.name( \"representeeMidCell\" ) ) );\n final WebElement cell = driver.findElement( By.name( \"representeeMidCell\" ) );\n wait.until( ExpectedConditions.textToBePresentInElement( cell, patient ) );\n driver.findElement( By.id( \"logout\" ) ).click();\n }", "@Override\n\tpublic void visit(final Aunt person) {\n\t\t\n\t}", "@UiHandler(\"people\")\n\tvoid patientsClicked(ClickEvent event) {\n\t\tplaceController.goTo(new StandardizedPatientPlace(\"PatientPlace\"));\n\t}", "public void goHospital()\n\t{\n\t\tsynchronized (this) {\n\t\tworld.hospitalizedIndividual();\n\t\tcurrentState.goHospital();\n\t\t}\n\t}", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "public void visit(Personnes p) {\n pers = p;\n tpsAttentePerso = p.getTpsAttente();\n tpsAttentePerso2 = p.getTpsArrive();\n totalTime += tpsAttentePerso;\n\tnbVisited += 1;\n moyenne = totalTime/nbVisited; \n }", "public void visit() {\n\t\tvisited = true;\n\t}", "public void clickOnPatients() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_patients\");\n\t\twait.waitForElementToBeClickable(element(\"link_patients\"));\n\t\twait.waitForStableDom(250);\n\t\texecuteJavascript(\"document.getElementById('doctor-patients').click();\");\n\t\tlogMessage(\"user clicks on Patients\");\n\t}", "public void consultDentist() {\n\t\tSystem.out.println(\"Patient \" + id + \" is consulting the dentist.\"); \n\t}", "@Override\n\tpublic void visit(final Uncle person) {\n\t\t\n\t}", "@Override\r\n\tpublic void visit(Personality personality)\r\n\t{\n\t\t\r\n\t}", "public void callHouseOwner() {\n\t\tSystem.out.println(\"联系房东\");\n\t}", "public void visit() {\n visited = true;\n }", "public void findHouse() {\n\t\tSystem.out.println(\"找房子\");\n\t}", "void visit(Entitlement entitlement);", "public void LookupPatient(View v){\n\t\tEditText HealthCardNum = (EditText) findViewById(R.id.p_HID);\n\t\tString healthcard_ID = HealthCardNum.getText().toString();\n\t\n\t\t//check the empty case of edittext\n\t\tif (healthcard_ID.length() == 0){\n\t\t\tMissHCNBox(v);\n\t\t}else if(! physician.HavePatient(healthcard_ID)){\n\t\t\t//if the input health card number does not exist\n\t\t\tPatientNoExist(v);\n\t\t}else{\n\t\t\t\n\t\t\tpatient = physician.getByHealthCard(healthcard_ID);\n\t\t\t//item will be passed to alert box to display the successful work\n\t\t\titem = patient.getName() + \" \" + healthcard_ID;\n\t\t\t\n\t\t\t//show the layout and display the information for user\n\t\t\tprescriptionlayout.setVisibility(View.VISIBLE);\n\t\t\tpatientinfodisplay.setVisibility(View.VISIBLE);\n\t\t\t\n\t\t\t//get target patient's information and display\n\t\t\tString display = patient.showInfo();\n\t\t\tviewdisplay.setText(display);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Test\n\tpublic void testViewChildbirthVisits() throws Exception{\n\t\t// Log in as HCP3\n\t\tWebDriver wd = login(\"9000000012\",\"pw\");\n\t\tassertEquals(\"iTrust - HCP Home\", wd.getTitle());\n\t\t\n\t\twd.findElement(By.linkText(\"View Childbirth Office Visit\")).click();\n\t\tassertEquals(\"iTrust - Please Select a Patient\", wd.getTitle());\n\t\t\n\t\t// Select a patient and view the patient's childbirth visits records \n\t\twd.findElement(By.name(\"UID_PATIENTID\")).sendKeys(\"1\");\n\t\twd.findElement(By.id(\"mainForm\")).submit();\n\t\tassertEquals(\"iTrust - View Childbirth Office Visits\", wd.getTitle());\n\t\t\n\t\t// Get the childbirth visits table\n\t\tWebElement tableElem = wd.findElements(By.tagName(\"table\")).get(1);\n\t\tList<WebElement> tableData = tableElem.findElements(By.tagName(\"tr\"));\n\t\tIterator<WebElement> rowsOnTable = tableData.iterator();\n\t\t\n\t\t// Check the title and fields of the table\n\t\tWebElement row = rowsOnTable.next();\n\t\tassertTrue(row.getText().contains(\"Childbirth Office Visits\"));\n\t\trow = rowsOnTable.next();\n\t\tassertTrue(row.getText().contains(\"ID\"));\n\t\tassertTrue(row.getText().contains(\"Preferred Childbirth Method\"));\n\t\tassertTrue(row.getText().contains(\"Drugs\"));\n\t\tassertTrue(row.getText().contains(\"Scheduled Date\"));\n\t\tassertTrue(row.getText().contains(\"Prescheduled\"));\n\t\tassertTrue(row.getText().contains(\"Action\"));\t\t\n\t}", "public void findHouse() {\n System.out.println(\"-----Search House-----\");\n System.out.println(\"enter id: \");\n int findId = Utility.readInt();\n //call service search method\n House h = houseService.searchHouse(findId);\n if (h != null) {\n System.out.println(h);\n } else {\n System.out.println(\"no designate house found\");\n }\n }", "HospitalSystem(Patient patient, Action action){\r\n\t\tthis.patient=patient;\r\n\t\treferredTo=action;\r\n\t\t\r\n\t\t//call the selection action method which will process the patient\r\n\t\tselectAction();\r\n\t\t\r\n\t}", "void showPatients() {\n\t\t\t\n\t}", "private void onViewPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0)\n\t\t\t// No row has been selected\n\t\t\treturn;\n\n\t\t// Gets the patient ID\n\t\tbyte[] patientId = (byte[]) tablePatients.getValueAt(selectedRowIndex, PatientTable.ID);\n\n\t\t// Sets the patient ID as the current one\n\t\tPatientManager.setCurrentPatientId(patientId);\n\n\t\t// Opens the patient frame\n\t\tGuiManager.openFrame(GuiManager.FRAME_PATIENT);\n\t}", "public int serve(Person patient) {\n for (int i = 0; i < listOfRooms.size(); i++) {\n if (listOfRooms.get(i).isReadyToServe()) {\n listOfRooms.get(i).serve(patient);\n return i;\n }\n }\n return 0;\n }", "@PreAuthorize(\"hasRole('PATIENT')\")\n\t@PostMapping(path = \"/scheduleVisitByPatient\")\n\tpublic ResponseEntity<String> scheduleVisitByPatient(@RequestBody VisitData visitData) {\n\t\ttry {\n\t\t\tboolean checkVisitTerm = visitService.checkVisitTerm(visitData);\n\t\t\tif(checkVisitTerm) {\n\t\t\t\treturn ResponseEntity.ok(\"VISIT_TERM_TAKEN\");\n\t\t\t}\n\t\t\tvisitService.scheduleVisitByPatient(visitData);\n\t\t\tlogger.info(\"Scheduled visit by patient with date: {} {}, doctor username: {}, patient username: {}\", \n\t\t\t\t\tvisitData.getVisitDate(), visitData.getVisitTime(), visitData.getDoctorUsername(), visitData.getPatientUsername());\n\t\t\treturn ResponseEntity.ok(\"SCHEDULED_VISIT\");\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"ERROR schedule visit by patient\", e);\n\t\t\treturn new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}", "public boolean visit(MightyPacMan mp) {\n\t\treturn true;\n\t}", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "public abstract void visit();", "public void clickOnPatientHyperLink(){\n\t\tDynamicFramePage.dynamicFrameForPanchart();\n\t\tDynamicFramePage.switchtoFraFrame();\n\t\tsleep(10000);\n\t\tdriver.switchTo().frame(\"panProfile_Frame\");\n\t\tSeleniumUtil.getElementWithFluentWait(patientHyperLink).click();\n\t}", "void AddPatiant(Patient p) throws Exception;", "private void checkManualVisit() {\n // scroll to number of visits\n onView(withId(R.id.tv_num_visits)).perform(scrollTo());\n // check number of visits is 1\n onView(withId(R.id.tv_num_visits)).check(matches(withText(String.valueOf(1))));\n\n checkLastVisitLabelAndText(date, time);\n\n // scroll to expandable RecyclerView\n onView(withId(R.id.expanding_rv_visits))\n .perform(scrollTo());\n\n // scroll to visit group and click to expand\n onView(withId(R.id.expanding_rv_visits))\n .perform(RecyclerViewActions.scrollToPosition(POS_VISIT_GROUP))\n .perform(click());\n\n // check that the visit has updated date and time\n onView(withId(R.id.expanding_rv_visits))\n .perform(RecyclerViewActions.scrollToPosition(POS_NEW_VISIT))\n .check(matches(atPosition(POS_NEW_VISIT, hasDescendant(withText(date)))));\n onView(withId(R.id.expanding_rv_visits))\n .perform(RecyclerViewActions.scrollToPosition(POS_NEW_VISIT))\n .check(matches(atPosition(POS_NEW_VISIT, hasDescendant(withText(time)))));\n }", "public void createNew(PatientBO patient)\n {\n _dietTreatment = new DietTreatmentBO();\n _dietTreatment.setPatient(patient);\n setPatient(patient);\n }", "void visit(Circle circle);", "public void onePointVisitor(View view) {\r\n visitorScore += 1;\r\n displayVisitorScore(visitorScore);\r\n }", "private void visitToSearch() {\n if (search_Attendance==null) {\n search_Attendance=new Search_Attendance();\n search_Attendance.setVisible(true);\n } else {\n search_Attendance.setVisible(true);\n }\n }", "Reference getPatient();", "public void patientsCredentials() {\n\t\tutil.ClickElement(prop.getValue(\"locators.register.click\"));\n\t\tlogreport.info(\"Patient registration is clicked\");\n\t}", "@Test\n public void createVisitForToday_createsANewVisit_forTheCorrectPet() {\n\n // given:\n pikachu = dataManager.load(Pet.class)\n .query(\"e.name = ?1\", \"Pikachu\")\n .view(\"pet-with-owner-and-type\")\n .one();\n\n // given:\n assertThat(dataManager.loadValue(\n \"select count(e) from petclinic_Visit e where e.pet = :pet\", Long.class)\n .parameter(\"pet\", pikachu)\n .one())\n .isEqualTo(0);\n\n // when:\n visit = visitService.createVisitForToday(pikachu.getIdentificationNumber());\n\n // then:\n assertThat(dataManager.loadValue(\n \"select count(e) from petclinic_Visit e where e.pet = :pet\", Long.class)\n .parameter(\"pet\", pikachu)\n .one())\n .isEqualTo(1);\n\n testContainer.deleteRecord(visit);\n }", "void visit(User user);", "public int getVisit() {\n\t\treturn visit;\n\t}", "public boolean visit(RegularPacMan rp) {\n\t\treturn true;\n\t}", "private void addPatient(Patient patient) {\n Location location = mLocationTree.findByUuid(patient.locationUuid);\n if (location != null) { // shouldn't be null, but better to be safe\n if (!mPatientsByLocation.containsKey(location)) {\n mPatientsByLocation.put(location, new ArrayList<Patient>());\n }\n mPatientsByLocation.get(location).add(patient);\n }\n }", "@Override\n\t\tpublic void alive() {\n\t\t\tSystem.out.println(\"liverId is: \" + liverId); //liver id is a static variable of the Liver class, so we CAN access it directly. \n\t\t\tSystem.out.println(new Animal().age); //Just like a static method, the only way to access NON static vars here is to create an animal object, then access that age..\n\t\t}", "public void registerPatientMethod1(Patient p);", "public void goToLocation (Locator checkpoint) { //Patrolling Guard and Stationary Guard\r\n\t\tVector2i start = new Vector2i((int)(creature.getXlocation()/Tile.TILEWIDTH), (int)(creature.getYlocation()/Tile.TILEHEIGHT));\r\n\t\tint destx = (int)(checkpoint.getX()/Tile.TILEWIDTH);\r\n\t\tint desty = (int)(checkpoint.getY()/Tile.TILEHEIGHT);\r\n\t\tif (!checkCollision(destx, desty)) {\r\n\t\tVector2i destination = new Vector2i(destx, desty);\r\n\t\tpath = pf.findPath(start, destination);\r\n\t\tfollowPath(path);\r\n\t\t}\r\n\t\tarrive();\r\n\t}", "public boolean add(Patient p) {\n\t\tif (currentTimeOccupied.plus(p.timeToHealth()).toMillis() <= timeLeftInDay.toMillis()) {\n\t\t\tpatients.add(p);\n\t\t\t//currentTimeOccupied = currentTimeOccupied.plus(p.timeToHealth());\n\t\t\ttimeLeftInDay = timeLeftInDay.minus(p.timeToHealth());\n\t\t\t\n\t\t\tif (patients.size() < MAX_PATIENTS) {\n\t\t\t\tSystem.out.println(\"Patient added to list! \" + p.timeToHealth().toMinutes() + \" minutes!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"A patient has been booted to add this one!\");\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"This doctor can't take this patient due to time constraints.\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic void Visit(YellowShot shot) {\n\r\n\t}", "void onItemClick(Patient patient);", "public Visit() {\n\t\t//dateTime = LocalDateTime.now();\n\t}", "private void processEvent(Event e) {\n\t\t// adjust timer\n\t\ttime = e.getTime();\n\t\tprintTimer();\n\n\t\t// get related patient and doctor. Start them waiting. Get preferredDoctor\n\t\tPerson p = e.getPatient();\n\t\tp.startWaiting();\n\t\tPerson d = e.getDoctor();\n\t\tif (d != null) {\n\t\t\td.startWaiting();\n\t\t}\n\t\tPerson preferredDoctor = p.getPreferredDoctor();\n\n\t\t// switch on the event type\n\t\tswitch (e.getType()) {\n\t\t\tcase Event.NEW_PATIENT :\n\t\t\t\t// new patient entered ambulance. Add him to incoming waiters\n\t\t\t\t// and check if doctors are waiting\n\t\t\t\tprint(\n\t\t\t\t\t\"New patient: \" + p + \", add to examination-waiting-list\");\n\t\t\t\t_examinationWaiters.addLast(p);\n\t\t\t\tcheckExamination();\n\t\t\t\tbreak;\n\n\t\t\tcase Event.FIRST_EXAMINATION :\n\t\t\t\t// end of 1st examination\n\t\t\t\tprint(\"1st examination end: \" + p + \", \" + d);\n\t\t\t\tif (needXray()) {\n\t\t\t\t\t// if xray needed, add patient to the xray waiters\n\t\t\t\t\t// and check if xray-doctor is waiting\n\t\t\t\t\tprint(\"Xray needed. Add \" + p + \" to xray-waiting-list\");\n\t\t\t\t\tp.setPreferredDoctor(d);\n\t\t\t\t\t_xrayWaiters.addLast(p);\n\t\t\t\t\tcheckXRay();\n\t\t\t\t} else {\n\t\t\t\t\t// if no xray needed, then patient can go home.\n\t\t\t\t\tprint(\"No xray needed. Can go home now: \" + p);\n\t\t\t\t\t_gonePatients.add(p);\n\t\t\t\t}\n\t\t\t\t// check if incoming patients are waiting\n\t\t\t\tcheckExamination();\n\t\t\t\tbreak;\n\n\t\t\tcase Event.XRAY_SHOOTING :\n\t\t\t\t// end of xray-examination. Add Patient to waiters.\n\t\t\t\t// Check if any xray waiters and if doctors are waiting\n\t\t\t\tprint(\"Xray-shooting end: \" + p);\n\t\t\t\tif (_policy == XRAY_FIRST) {\n\t\t\t\t\tprint(\"Add to back-from-xray-waiters: \" + p);\n\t\t\t\t\t_backFromXrayWaiters.addLast(p);\n\t\t\t\t} else {\n\t\t\t\t\tprint(\"Add to examination-waiting-list: \" + p);\n\t\t\t\t\t_examinationWaiters.addLast(p);\n\t\t\t\t}\n\t\t\t\tcheckExamination();\n\t\t\t\tcheckXRay();\n\t\t\t\tbreak;\n\n\t\t\tcase Event.SECOND_EXAMINATION :\n\t\t\t\t// end of second examination. Patient can go home now.\n\t\t\t\t// check if incoming patients are waiting.\n\t\t\t\tprint(\"2nd examination end: \" + p + \", \" + d);\n\t\t\t\tprint(\"Can go home: \" + p);\n\t\t\t\t_gonePatients.add(p);\n\t\t\t\tcheckExamination();\n\t\t\t\tbreak;\n\t\t}\n\t}", "void breach();", "public void clickOnNotificationAtPatient() {\n\t\telement(\"link_patientNotifications\").click();\n\t\tlogMessage(\"User clicks on Notifications at Patient End\");\n\t}", "public void setPatientName(String patientName)\n {\n this.patientName = patientName;\n }", "@Override\r\n\tpublic void Visit(BlackShot shot) {\n\r\n\t}", "@Override\r\n\tpublic void Visit(BlueShot shot) {\n\r\n\t}", "public void ClickAgentContactInformationPage() {\r\n\t\tagentcontactinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Contact Information\\\" button on the Birthdays page\");\r\n\t}", "public void gotonewpatient(View view)\n {\n Intent i=new Intent(this,AddNewPatient.class);\n startActivity(i);\n }", "@Given(\"^That dante is in the flights page$\")\n\tpublic void thatDanteIsInTheFlightsPage() throws Exception {\n\t\tdante.wasAbleTo(OpenTheBrowser.on(viajesExitoHomePage));\n\t}", "public Long addPatient(long pid, String name, Date dob, int age) throws PatientExn;", "Point onPage();", "@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 void visit()\n\t{\n\t\t// Visit data element.\n\t\tcargo.visit();\n\t}", "public void visit(Have h);", "PatientInfo getPatientInfo(int patientId);", "public Patient (String patientID) {\n this.patientID = patientID;\n this.associatedDoctor = new ArrayList<>();\n }", "public List<Doctor> acceptingNewPatients(String specialty);", "@Override\n\tpublic void showPatientDetails() {\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"S.No Patient's name ID Mobile Age\");\n\t\tfor (int i = 1; i <= UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i - 1);\n\t\t\tSystem.out.print(\" \" + i + \" \" + jsnobj.get(\"Patient's name\") + \" \" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t+ \" \" + jsnobj.get(\"Mobile\") + \" \" + jsnobj.get(\"Age\") + \"\\n\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "void startVisit(Group group);", "@When(\"^select (.+), enter (.+), enter (.+), select (.+)$\")\n public void patient_enters_appointment_info (String apttype, String date, String comments, long hmid) throws Throwable {\n \tTimestamp date2 = Timestamp.valueOf(date);\n \tappt.setPatient(patientMID);\n \tappt.setHcp(hmid);\n \tappt.setApptType(apttype); \n \tappt.setDate(date2);\n \tappt.setComment(comments);\n \t//set the patient's info at this point\n \n }", "public void show( Agent agent, Percept percept );", "private void storePatient(final Patient patient) {\n\n\t\ttry {\n\t\t\tpatients.put(patient.getIdentifierFirstRep().getValue(), patient);\n\t\t\t// if storing is successful the notify the listeners that listens on\n\t\t\t// any patient => patient/*\n\n\t\t\tfinal String bundleToString = currentPatientsAsJsonString();\n\n\t\t\tbroadcaster\n\t\t\t\t\t.broadcast(new OutboundEvent.Builder().name(\"patients\").data(String.class, bundleToString).build());\n\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void identificarPersona() {\n try {\n //Obtiene todas las huellas de la bd\n ResultSet rsIdentificar = identificarhue.executeQuery();\n \n //Si se encuentra la huella en la base de datos\n while(rsIdentificar.next()){\n //Lee la plantilla de la base de datos\n byte templateBuffer[] = rsIdentificar.getBytes(\"huellap\");\n //Crea una nueva plantilla\n Template referenceTemplate = new Template(templateBuffer);\n \n //compara las plantilas (actual vs bd)\n boolean coinciden = fingerprintSDK.verify(template,referenceTemplate);\n \n //Si encuentra coincidencia entonces envia true y si no entonces envia false\n if (coinciden){ \n objpantprincipal.coincidehuella(true);\n return;\n }\n else{\n objpantprincipal.coincidehuella(false);\n }\n } \n \n } catch (SQLException e) { \n initDB();\n identificarPersona();\n } catch (GrFingerJavaException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public VetVisitUrgent(String theVisitID, String theDate, String theDoctor,\n String theLocation,\n String theDiagnosis, String theTreatment)\n {\n super(theVisitID, theDate, theDoctor, theLocation);\n this.setDiagnosis(theDiagnosis);\n this.setTreatment(theTreatment); \n \n }", "public void visit(Choke c);", "public void mostraPacient(int pat_number) throws SQLException {\n\n\t\t\n\t\tStatement st=conn.createStatement();\n\t\tResultSet rs=st.executeQuery(\"SELECT * FROM patient WHERE pat_number=\"+pat_number);\n\t\t\n\t\twhile(rs.next()){\n\t\t\t\n\t\t\tSystem.out.println(\"\\tNumero: \"+rs.getString(\"pat_number\")+\"\\n\\tNombre: \"+rs.getString(\"name\")+\"\\n\\tDirección: \"+rs.getString(\"address\")+\"\\n\\tCiudad: \"+rs.getString(\"city\")+\"\\n\\tDNI: \"+rs.getString(\"dni\"));\n\t\t\tSystem.out.println(\"\\t----------\");\n\t\t}\n\t\tst.close();\n\t\trs.close();\n\t}", "public void ClickIVANSInformationPage() {\r\n\t\tivansinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"IVANS Information\\\" button on the Birthdays page\");\r\n\t}", "@Override\r\n\tpublic void Visit(RedShot shot) {\n\r\n\t}", "private void Visitar(Vertice v, int p) {\n\t\t\n\t\tv.setVisited(true);\n\t\tv.setPredecessor(p);\n\t\t\n\t\tLinkedList<ListaAdjacencia> L = v.getAdjList();\n\t\t\n\t\tfor (ListaAdjacencia node : L) {\n\t\t\tint n = node.getverticeNumero();\n\t\t\tif (!vertices[n].getVisited()) {\n\t\t\t\tVisitar(vertices[n], v.getIndex());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public boolean addPaient(Patient patient) throws TooManyExceptions;", "@When ( \"I navigate to the personal representatives page\" )\n public void goToRepsPage () throws InterruptedException {\n driver.get( baseUrl + \"/patient/viewPersonalRepresentatives\" );\n Thread.sleep( PAGE_LOAD );\n }", "@Override\n public IPatient next() {\n if (patientID == 0) {\n lastTime = LocalDateTime.now();\n return new Patient(lastTime, new Urgency(urgencyLevel--), treat, ++patientID);\n }\n if (LocalDateTime.now().isAfter(lastTime.plus(pause))) {\n if (urgencyLevel < MIN_URGENCY_LEVEL) urgencyLevel = MAX_URGENCY_LEVEL;\n lastTime = LocalDateTime.now();\n return new Patient(lastTime, new Urgency(urgencyLevel--), treat, ++patientID);\n }\n return null;\n }", "@LogMethod\r\n private void publishDataToVisitBasedStudy()\r\n {\r\n log(\"Prepare visit map to check PTID counts in study navigator.\");\r\n\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_STUDY2);\r\n\r\n _studyHelper.goToManageVisits().goToImportVisitMap();\r\n setFormElement(Locator.name(\"content\"),\r\n \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\r\n \"<visitMap xmlns=\\\"http://labkey.org/study/xml\\\">\\n\" +\r\n \" <visit label=\\\"Test Visit1\\\" typeCode=\\\"X\\\" sequenceNum=\\\"6.0\\\" maxSequenceNum=\\\"13.0\\\"/>\\n\" +\r\n \" <visit label=\\\"Test Visit2\\\" typeCode=\\\"X\\\" sequenceNum=\\\"50.0\\\" maxSequenceNum=\\\"70.0\\\"/>\\n\" +\r\n \" <visit label=\\\"Test Visit3\\\" typeCode=\\\"X\\\" sequenceNum=\\\"302.0\\\" maxSequenceNum=\\\"303.0\\\"/>\\n\" +\r\n \"</visitMap>\"\r\n );\r\n clickButton(\"Import\");\r\n\r\n //select the Lab1 folder and view all the data for the test assay\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(\"view results\"));\r\n\r\n //select all the data rows and click publish\r\n DataRegionTable table = new DataRegionTable(\"Data\", getDriver());\r\n table.checkAll();\r\n table.clickHeaderButton(\"Copy to Study\");\r\n\r\n checkCheckbox(Locator.xpath(\"//input[@id='chooseStudy']\"));\r\n\r\n // Make sure the selected study is Study2\r\n selectOptionByText(Locator.xpath(\"//select[@name='targetStudy']\"), getTargetStudyOptionText(TEST_ASSAY_FLDR_STUDY2));\r\n\r\n clickButton(\"Next\");\r\n assertTextPresent(\"Copy to \" + TEST_ASSAY_FLDR_STUDY2 + \" Study: Verify Results\");\r\n\r\n //populate initial set of values and verify the timepoint preview column\r\n String[] visits = new String[]{\"302\", \"33\", \"4\", \"70\"};\r\n int idx = 1;\r\n for (String v : visits)\r\n {\r\n setFormElement(Locator.xpath(\"(//input[@name='visitId'])[\" + idx + \"]\"), v);\r\n idx++;\r\n }\r\n\r\n setFormElement(Locator.xpath(\"(//input[@name='participantId'])[1]\"), \"new1\");\r\n setFormElement(Locator.xpath(\"(//input[@name='participantId'])[2]\"), \"new2\");\r\n setFormElement(Locator.xpath(\"(//input[@name='participantId'])[3]\"), \"new3\");\r\n setFormElement(Locator.xpath(\"(//input[@name='participantId'])[4]\"), \"new4\");\r\n\r\n DataRegionTable copyStudy = new DataRegionTable(\"Data\", getDriver());\r\n copyStudy.clickHeaderButton(\"Re-Validate\");\r\n\r\n //validate timepoints:\r\n assertElementPresent(Locator.xpath(\"//td[text()='Test Visit3' and following-sibling::td/a[text()='AAA07XMC-02']]\"));\r\n assertElementPresent(Locator.xpath(\"//td[text()='33.0' and following-sibling::td/a[text()='AAA07XMC-04']]\"));\r\n assertElementPresent(Locator.xpath(\"//td[text()='4.0' and following-sibling::td/a[text()='AAA07XSF-02']]\"));\r\n\r\n assertElementPresent(Locator.xpath(\"//td[text()='Test Visit2' and following-sibling::td/a[text()='AssayTestControl1']]\"));\r\n assertElementPresent(Locator.xpath(\"//td[text()='Test Visit1' and following-sibling::td/a[text()='AssayTestControl2']]\"));\r\n assertElementPresent(Locator.xpath(\"//td[text()='Test Visit1' and following-sibling::td/a[text()='BAQ00051-09']]\"));\r\n assertElementPresent(Locator.xpath(\"//td[text()='Test Visit1' and following-sibling::td/a[text()='BAQ00051-08']]\"));\r\n assertElementPresent(Locator.xpath(\"//td[text()='Test Visit1' and following-sibling::td/a[text()='BAQ00051-11']]\"));\r\n\r\n copyStudy.clickHeaderButton(\"Copy to Study\");\r\n\r\n log(\"Verifying that the data was published\");\r\n assertTextPresent(\r\n TEST_RUN1_COMMENTS,\r\n \"2000-01-01\");\r\n clickTab(\"Overview\");\r\n clickAndWait(Locator.linkWithText(\"Study Navigator\"));\r\n\r\n log(\"Test participant counts and row counts in study overview\");\r\n String[] row2 = new String[]{TEST_ASSAY, \"9\", \" \", \" \", \" \", \"1\", \" \", \" \", \"1\", \" \", \" \", \"4\", \" \", \" \", \" \", \" \", \"1\", \"1\", \" \", \" \", \" \", \"1\", \" \", \" \", \" \", \" \", \" \"};\r\n assertTableRowsEqual(\"studyOverview\", 1, new String[][]{row2});\r\n // Manually click the checkbox -- normal checkCheckbox() method doesn't seem to work for checkbox that reloads using onchange event\r\n clickAndWait(Locator.checkboxByNameAndValue(\"visitStatistic\", \"RowCount\"));\r\n row2 = new String[]{TEST_ASSAY, \"9 / 9\", \" \", \" \", \" \", \"1 / 1\", \" \", \" \", \"1 / 1\", \" \", \" \", \"4 / 4\", \" \", \" \", \" \", \" \", \"1 / 1\", \"1 / 1\", \" \", \" \", \" \", \"1 / 1\", \" \", \" \", \" \", \" \", \" \"};\r\n assertTableRowsEqual(\"studyOverview\", 1, new String[][]{row2});\r\n\r\n log(\"Test that correct timepoints were created\");\r\n\r\n clickTab(\"Overview\");\r\n _studyHelper.goToManageVisits();\r\n assertTextPresent(\r\n \"Test Visit1\",\r\n \"6.0 - 13.0\",\r\n \"Test Visit2\",\r\n \"50.0 - 70.0\",\r\n \"Test Visit3\",\r\n \"302.0 - 303.0\");\r\n }", "@When ( \"I navigate to the HCP personal representatives page\" )\n public void goToRepsPageHCP () throws InterruptedException {\n driver.get( baseUrl + \"/hcp/viewPersonalRepresentatives\" );\n Thread.sleep( PAGE_LOAD );\n }", "public Visit(int id, Date date, String description, int petId){\n this.id = id;\n this.date = date;\n this.description = description;\n this.petId = petId;\n }", "public void viewDetailAllPlantCanHarvest() {\n\t\tint i = 1;\n\t\tint l = 0;//check Harvest\n\t\tfor(Plant p : getListofplant()){\n\t\t\tif(p.canHarvest()){\n\t\t\t\tl++;\n\t\t\t}\n\t\t}\n\t\t// TODO Auto-generated method stub\n\t\tif(!checkPlantCanHarvest()){\n\t\t\tSystem.out.println(\"No Plant\");\n\t\t}\n\t\telse{\n\t\tfor(Plant p : getListofplant()){\n\t\t\tif(p.canHarvest()){\n\t\t\tSystem.out.println( i + \" \" + p.viewDetail() + \" StatusWater : \" + p.getStatusWater()\n\t\t\t+ \" StatusHarvest : \" + p.getStatusHarvest());\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t}\n\t\t\n\t}", "public Suspects(final String disease, final int visit)\n\t{\n\t\tthis.disease = disease;\n\t\tthis.visit = visit;\n\t}", "void dischargePatient(int id);", "@PostMapping(\"/owners/{ownerId}/pets/{petId}/visits/new\")\n\tpublic String processNewVisitForm(@Valid Visit visit, BindingResult result) {\n\t\tif (result.hasErrors()) {\n\t\t\treturn \"pets/createOrUpdateVisitForm\";\n\t\t} else {\n\t\t\tthis.visitsRepo.save(visit);\n\t\t\treturn \"redirect:/owners/{ownerId}\";\n\t\t}\n\t}", "public abstract void visit(Circle circle);", "public void announce() {\n System.out.println();\n if(firstVisit){\n System.out.println(description != null && !description.isEmpty() ? description : Constants.ROOM_DESCRIPTION_NOT_FOUND);\n }else {\n System.out.println(shortDescription != null && !shortDescription.isEmpty()? shortDescription : Constants.ROOM_SHORT_DESCRIPTION_NOT_FOUND);\n }\n printAvailableItems();\n printConnectedPaths();\n firstVisit = false;\n }", "@Override\n public void visit(PublicArea s) {}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tintent = new Intent(SnaDetailsActivity.this,HostActivity.class);\r\n\t\t\t\tintent.putExtra(\"stoid\", stoid);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "private static void changePatient(){\r\n // opretter ny instans af tempPatinet som overskriver den gamle\r\n Patient p = new Patient(); // det her kan udskiftes med en nulstil funktion for at forsikre at der altid kun er en patient.\r\n Patient.setCprNumber((Long) null);\r\n }", "public void setPatientId(String patientId)\n {\n this.patientId = patientId;\n }", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "private void makeDiagnosis(Patient patient, String diagnosis) {\n patient.setDiagnosis(diagnosis);\n }", "public Patient newPatient(String name, int dob) {\n\n\t\tint thisYear = 2016;\n\t\tint ageLimit = 130;\n\n\t\tif (((thisYear - dob) > ageLimit) || (dob > thisYear)) {\n\t\t\tSystem.out.println(\"The age is not valid\");\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tage = thisYear - dob;\n\t\tid = size;\n\t\tsize++;\n\t\tPatient x = new Patient(size, name, age);\n\t\tSystem.out.println(\"The paitent is called \" + x.name + \" and ID is : \" + x.id + \" and age is: \" + x.age);\n\t\tpatients.add(x);\n\t\treturn x;\n\t}", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6684164", "0.61110246", "0.5897661", "0.58778256", "0.5827198", "0.5749169", "0.56805617", "0.5680053", "0.5631049", "0.56232226", "0.5498021", "0.5445321", "0.54352766", "0.53978366", "0.532124", "0.53135306", "0.52882606", "0.52755815", "0.5231097", "0.5214744", "0.5191278", "0.51720023", "0.5131089", "0.5120244", "0.5099525", "0.50754935", "0.5029503", "0.50218207", "0.50027496", "0.49922824", "0.49366456", "0.4930784", "0.4906005", "0.4894651", "0.4886216", "0.48741505", "0.4855225", "0.48523316", "0.48508888", "0.48471597", "0.4833147", "0.48151734", "0.4795993", "0.4787027", "0.47860268", "0.47771606", "0.4765054", "0.47648582", "0.47568607", "0.4747204", "0.47090092", "0.47046095", "0.46949825", "0.4674028", "0.46615532", "0.4658914", "0.4647771", "0.46393284", "0.46323997", "0.46309745", "0.4629235", "0.46286726", "0.46267632", "0.4624968", "0.46208048", "0.46176746", "0.46043277", "0.46037334", "0.46012425", "0.4593209", "0.4572422", "0.4562528", "0.4561872", "0.45613867", "0.45609617", "0.4560234", "0.45582175", "0.45573458", "0.4556505", "0.4552992", "0.4552072", "0.45494428", "0.45472318", "0.45463592", "0.4546329", "0.4543407", "0.4533859", "0.45336998", "0.45259175", "0.45185393", "0.45169687", "0.45162055", "0.45123044", "0.45058322", "0.4502847", "0.45015132", "0.4501237", "0.44991353", "0.4488292", "0.44862115" ]
0.65172434
1
Getter for hospital number.
public int getHospitalNumber() { return this.hospitalNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHospitalPhone() {\n return hospitalPhone;\n }", "public String getHospitalId() {\n return hospitalId;\n }", "public String getHospital() {\r\n return hospital;\r\n }", "public String getHospitalLevel() {\n return hospitalLevel;\n }", "public String getHospitalName() {\n return hospitalName;\n }", "public jkt.hms.masters.business.MasHospital getHospital () {\n\t\treturn hospital;\n\t}", "public jkt.hms.masters.business.MasHospital getHospital () {\n\t\treturn hospital;\n\t}", "public jkt.hms.masters.business.MasHospital getHospital () {\n\t\treturn hospital;\n\t}", "public static int getNoOfHospitals(){\n return noOfHospitals;\n }", "public int getEmployeeNumber() {\r\n return employeeNumber;\r\n }", "public String getEmployeeNumber() {\n return (String)getAttributeInternal(EMPLOYEENUMBER);\n }", "public int getHouse_number() {\n return house_number;\n }", "public Long getHome_phone();", "public void setHospitalNumber(int newHospitalNumber) {\n this.hospitalNumber = newHospitalNumber;\n }", "public String getHospitalAddress() {\n return hospitalAddress;\n }", "public String getHospitalLevelName() {\n return hospitalLevelName;\n }", "public int getPhoneNuber() {\r\n return phoneNuber;\r\n }", "@Override\n public int getNumber() {\n if(flightNumber == null)\n return 42;\n else\n return Integer.parseInt(flightNumber);\n }", "public String getEmployeeNum() {\n return employeeNum;\n }", "java.lang.String getPhonenumber();", "public String getHospitalCountry() {\n return hospitalCountry;\n }", "public int getWareHouseNumber()\n\t{\n\t\treturn getBigDecimal(WareHouse.WAREHOUSENUMBER).intValue();\n\t}", "public Integer getPhonenumber() {\n return phonenumber;\n }", "public String getNumber() {\n return (String) get(\"number\");\n }", "public EncounterHospitalization hospitalization() {\n return getObject(EncounterHospitalization.class, FhirPropertyNames.PROPERTY_HOSPITALIZATION);\n }", "public String getPhoneNo() {\n return (String)getAttributeInternal(PHONENO);\n }", "public String getHospitalCity() {\n return hospitalCity;\n }", "public Long getHospitalOrderCount() {\n return hospitalOrderCount;\n }", "java.lang.String getNumber();", "java.lang.String getNumber();", "java.lang.String getNumber();", "int getPhone();", "public String getEmpNum() {\n return empNum;\n }", "public int getIdentificationNumber() {\n return identificationNumber;\n }", "public PersonalNumber getPersonalNum() {\n\t\treturn personalNumber;\n\t}", "public String getIdentificationNumber() {\n return this.identificationNumber;\n }", "public void setHospital(String hospital) {\r\n this.hospital = hospital;\r\n }", "public int getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "public java.lang.String getNumber() {\n return number;\n }", "public String getNumberInParty() {\n return numberInParty;\n }", "public String getHouseNumber() {\n\t\treturn houseNumber;\n\t}", "public String getNumber() \n\t{\n\t\treturn this.number;\n\t}", "public String getNumber() {\n return number;\n }", "public String getNumber() {\n return number;\n }", "public String getNumber() {\n return number;\n }", "public String getNumber() {\n return number;\n }", "@Override\r\n\tpublic String getParty_no() {\n\t\treturn super.getParty_no();\r\n\t}", "public String number() {\n return number;\n }", "public String getPhonenumber() {\n return phonenumber;\n }", "public String getInumber()\n\t{\n\t\treturn getInumber( getSession().getSessionContext() );\n\t}", "public java.lang.String getInternalphone() {\n\treturn internalphone;\n}", "public int getNumber() {\n return field.getNumber();\n }", "public String getId_number() {\n return id_number;\n }", "public String getPhone_number() {\n return phone_number;\n }", "public String getPhonenumber() {\n\t\treturn phonenumber;\n\t}", "public int getRoomNumber() {\n\t\treturn number; // Replace with your code\n\t}", "public String getHomeNumber() {\r\n return homeNumber;\r\n }", "public String getPersonNum(){\n return personNum;\n }", "public int getHunger() {\n\t\treturn this.hunger;\n\t}", "public String getNumber(){\r\n return number;\r\n }", "public String getPhoneNum()\r\n {\r\n return phoneNum;\r\n }", "public int getNumber() {\n\t\treturn 666;\n\t}", "public String getNumber() {\n\t\treturn getValue(\"number\");\n\t}", "public Integer getHostelOrderDetailNo() {\n return hostelOrderDetailNo;\n }", "public String getNumberConfident() {\n return numberConfident;\n }", "public String getNumber() {\n return this.mNumber;\n }", "public PhoneNumber getNumber(Person key) {\n\t\tBookEntry entry = getEntry(key);\n\t\tif (entry != null) {\n\t\t\treturn entry.getNumber(); //Returns the phoneNumber from the entry\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public int getNumber()\n {\n return this.number;\n }", "public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}", "@JsonIgnore public Identifier getFlightNumber() {\n return (Identifier) getValue(\"flightNumber\");\n }", "public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}", "public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}", "public String getHomeNum() {\n return homeNum;\n }", "@Override\n public String getPhoneNumber() {\n\n if(this.phoneNumber == null){\n\n this.phoneNumber = TestDatabase.getInstance().getClientField(token, id, \"phoneNumber\");\n }\n\n return phoneNumber;\n }", "public Long getMobile_phone();", "public java.lang.Integer getDepartmentcode() {\n\treturn departmentcode;\n}", "private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }", "public int getNumber() {\r\n return number;\r\n }", "public String getNumber() {\r\n\t\treturn number;\r\n\t}", "private void setHospital(String p_hospital){\n\t\tthis.nombreHospital = p_hospital;\n\t}", "@Override\r\n\tpublic int getEnterNo() {\n\t\treturn session.selectOne(\"enter.getEnterNo\");\r\n\t}", "public int getNumber()\n\t{\n\t\treturn myNumber;\n\t}", "public String getUsernumber() {\n return usernumber;\n }", "public int getNumber() {\n return number;\n }", "public String getAccountNo();", "public State getInHospital() {\n\t\treturn inHospital;\n\t}", "public String getPhoneNum()\r\n {\r\n\treturn phoneNum;\r\n }", "public int getNumber() {\n return this.number;\n }", "@Override\n\tpublic SeckillPhoneInfo getPhoneInfo(int hour) {\n\t\treturn seck.getPhoneInfo(hour);\n\t}", "public java.lang.String getPhone_number() {\n return phone_number;\n }", "public String getPatientPhone() {\n return patientPhone;\n }", "public java.lang.String getChallanNo () {\n\t\treturn challanNo;\n\t}", "@Override\n\tpublic String getMobileNum() {\n\t\treturn get.getMobileNum();\n\t}", "public String getIdNo() {\n return idNo;\n }", "public String getIdNo() {\n return idNo;\n }", "public int getNumber(){\n\t\treturn number;\n\t}", "public java.lang.String getHOUSE_NUM1()\n {\n \n return __HOUSE_NUM1;\n }", "public String getTelNo()\r\n\t{\r\n\t\treturn this.telNo;\r\n\t}", "public Integer getRoomnumber() {\n return roomnumber;\n }", "public Number getChallanNo() {\n return (Number) getAttributeInternal(CHALLANNO);\n }" ]
[ "0.76383585", "0.7530738", "0.7129818", "0.6913819", "0.6867322", "0.6482236", "0.6482236", "0.6482236", "0.6458814", "0.64577466", "0.63899374", "0.6387454", "0.6386213", "0.6372253", "0.6361908", "0.63549316", "0.6350678", "0.63447714", "0.633338", "0.63091844", "0.62689495", "0.6205884", "0.61921895", "0.6116524", "0.60900325", "0.60747397", "0.6072998", "0.60538346", "0.6014213", "0.6014213", "0.6014213", "0.60076153", "0.5997304", "0.59479964", "0.59378576", "0.5933153", "0.5932087", "0.5918184", "0.5894111", "0.5881616", "0.58740455", "0.5871672", "0.58603543", "0.58603543", "0.58603543", "0.58603543", "0.58548373", "0.5853332", "0.58460045", "0.58439577", "0.5843335", "0.58383965", "0.58302635", "0.58198327", "0.5804026", "0.580265", "0.57931054", "0.5781787", "0.57794094", "0.576818", "0.57534266", "0.5753244", "0.5750443", "0.5749191", "0.57481104", "0.57455057", "0.5735978", "0.5727601", "0.5722274", "0.57151026", "0.5714785", "0.5714785", "0.5714368", "0.5714164", "0.57123446", "0.5709014", "0.5708763", "0.57083565", "0.5706466", "0.5705296", "0.57034075", "0.5699849", "0.56973803", "0.5685977", "0.5682496", "0.56775314", "0.5673248", "0.5669788", "0.5666137", "0.5661392", "0.56579936", "0.5657462", "0.5656529", "0.5654577", "0.5654577", "0.5646979", "0.5644836", "0.56381565", "0.5635824", "0.563405" ]
0.87298
0
Setter for hospital number.
public void setHospitalNumber(int newHospitalNumber) { this.hospitalNumber = newHospitalNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHospitalNumber() {\n return this.hospitalNumber;\n }", "private void setHospital(String p_hospital){\n\t\tthis.nombreHospital = p_hospital;\n\t}", "public void setHospital(String hospital) {\r\n this.hospital = hospital;\r\n }", "public void setHospitalPhone(String hospitalPhone) {\n this.hospitalPhone = hospitalPhone == null ? null : hospitalPhone.trim();\n }", "public void setHospital (jkt.hms.masters.business.MasHospital hospital) {\n\t\tthis.hospital = hospital;\n\t}", "public void setHospital (jkt.hms.masters.business.MasHospital hospital) {\n\t\tthis.hospital = hospital;\n\t}", "public void setHospital (jkt.hms.masters.business.MasHospital hospital) {\n\t\tthis.hospital = hospital;\n\t}", "public String getHospitalPhone() {\n return hospitalPhone;\n }", "public String getHospitalId() {\n return hospitalId;\n }", "public void setWareHouseNumber(int arg)\n\t{\n\t\tsetValue(WAREHOUSENUMBER, new Integer(arg));\n\t}", "public void setHome_phone(Long home_phone);", "public void setHospitalAddress(String hospitalAddress) {\n this.hospitalAddress = hospitalAddress == null ? null : hospitalAddress.trim();\n }", "public void setPhoneNuber(int value) {\r\n this.phoneNuber = value;\r\n }", "public void setHospitalId(String hospitalId) {\n this.hospitalId = hospitalId == null ? null : hospitalId.trim();\n }", "public void setHospitalLevel(String hospitalLevel) {\n this.hospitalLevel = hospitalLevel == null ? null : hospitalLevel.trim();\n }", "public void setChallanNo(Number value) {\n setAttributeInternal(CHALLANNO, value);\n }", "public Hospital(String p_hospital, String p_director){\n\t\tthis.setHospital(p_hospital);\n\t\tthis.setDirector(p_director);\n\t}", "void setPhone(int phone);", "public void setHouse_number(int house_number) {\n this.house_number = house_number;\n }", "public Hospital() {\n noOfHospitals++; //increase static var by one each time\n // a constructor is called because you add an object\n this.name = \"Hospital X\";\n this.mainUse = \"unknown\";\n this.qualifiedStaff = 0;\n this.otherStaff = 0;\n this.spaces = 0;\n this.stateFunded = false;\n }", "public void setEmployeeNumber(String value) {\n setAttributeInternal(EMPLOYEENUMBER, value);\n }", "public void setHORAOPRCN(int value) {\n this.horaoprcn = value;\n }", "public String getHospital() {\r\n return hospital;\r\n }", "@Override\n\tpublic void setHumanNum(int humanNum) {\n\t\tthis.humanNum=humanNum;\n\t}", "public void setHospitalOrderCount(Long hospitalOrderCount) {\n this.hospitalOrderCount = hospitalOrderCount;\n }", "void nhap(String tenHinh) {\n this.tenHinh = tenHinh;\n }", "@Override\n\tpublic void setOccupant(HousePerson h) {\n\t\thouseperson = h;\n\t}", "public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }", "public void setHOUSE_NUM1(java.lang.String value)\n {\n if ((__HOUSE_NUM1 == null) != (value == null) || (value != null && ! value.equals(__HOUSE_NUM1)))\n {\n _isDirty = true;\n }\n __HOUSE_NUM1 = value;\n }", "void setPhone(String ph){ // SETTER METHOD\n\t\tif(ph.length()>10 && ph.length()<=13){\n\t\t\tphone = ph; // writing the data based on some rules\n\t\t}else{\n\t\t\tphone = \"NA\";\n\t\t\tSystem.out.println(\"Please Enter Correct Phone Number\");\n\t\t}\n\t}", "public String getHospitalName() {\n return hospitalName;\n }", "public void setInumber(final String value)\n\t{\n\t\tsetInumber( getSession().getSessionContext(), value );\n\t}", "public void setPersonalNumber(String personalNumber) {\n\n PersonalNumber personalNumberEntered = new PersonalNumber(personalNumber);\n /*if(!personalNumberEntered.validID(personalNumber)) {\n throw new IllegalArgumentException(\"Personal number should be a 10 digit number\\n\");\n }*/\n this.personalNumber = personalNumberEntered;\n }", "public void setNumber(int number)\n {\n this.number = number;\n }", "public void setHospitalName(String hospitalName) {\n this.hospitalName = hospitalName == null ? null : hospitalName.trim();\n }", "public void setNumber(int number) {\r\n\t\tthis.number = number;\r\n\t}", "void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}", "public void setNumber(int number) {\r\n\t\tthis.num = number;\r\n\t}", "public void setHP(int h)\n\t{\n\t\tiHP = h;\n\t\t\n\t}", "public void setNumber(int number) {\n this.number = number;\n }", "public void setMobile(int number) {\n\t\t\tthis.Mobile = number;\r\n\t\t}", "@Override\n\tpublic void setEmpno(Integer empno) {\n\t\tsuper.setEmpno(empno);\n\t}", "public void setCardNo(int cardNumber);", "public void setNumber(int number)\n {\n Number = number;\n }", "public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);", "public void setPhonenumber(Integer phonenumber) {\n this.phonenumber = phonenumber;\n }", "private void setHomeNum(String homeNum) {\n this.homeNum = StringExtension.nullFilter(homeNum);\n }", "public void setEmployeeID(int employeeID)\n {\n if(employeeID<=9999&&employeeID>=1000)\n {\n this.employeeID = employeeID;\n }else\n {\n System.out.println(\"The Employee ID should be of 4 digits only.\");\n \n }\n }", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setMobile_phone(Long mobile_phone);", "@Test\r\n\tpublic void testSetGetNhsNumberInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setNhsNumber(nhsNumberInvalid);\r\n\t\tassertEquals(nhsNumberInvalid, doctor.getNhsNumber());\r\n\t}", "void setIdNumber(String idNumber);", "public void setNumber(String newValue);", "public void setId_number(String id_number) {\n this.id_number = id_number;\n }", "public synchronized void setAmendmentNumber(final InternationalString newValue) {\n checkWritePermission();\n amendmentNumber = newValue;\n }", "@Override\n\tpublic void setPhieumuonId(long phieumuonId) {\n\t\t_phieugiahan.setPhieumuonId(phieumuonId);\n\t}", "public void setAccountNo(int number){\n\t\taccountNo = number;\n\t}", "public void setPhoneNo(String value) {\n setAttributeInternal(PHONENO, value);\n }", "public void setNumber(String number) {\n this.number = number;\n }", "public void setStreetNo(int value) {\n this.streetNo = value;\n }", "public void setH(int h) {\n this.H = h;\n\n }", "public String getHospitalAddress() {\n return hospitalAddress;\n }", "protected void setStudentNumber(Integer studentNum)\n {\n studentNumber = studentNum;\n }", "public void setPhone(String phone);", "public void setID(int number) {\n this.clientNumber = number;\n }", "public void setHrNum(Double hrNum) {\n\t\tthis.hrNum = hrNum;\n\t\tvalidateParameter();\n\t\t//return this;\n\t}", "public void setNumber(String number) {\r\n\t\tthis.number = number;\r\n\t}", "public void setHigh(int H)\t\n\t{\t//start of setHigh method\n\t\tHIGH_NUM = H;\n\t}", "public void setPhone(String phone)\r\n/* 46: */ {\r\n/* 47:58 */ this.phone = phone;\r\n/* 48: */ }", "public void setNumber(Integer number) {\r\n this.number = number;\r\n }", "public void setPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setter method initialized\r\n System.out.println(\"Phone Number : \"+phoneNumber);}", "private void setBuildingNumber(String number) {\n buildingNumber = number;\n }", "public void setNummer(int n) {\n\t\tint alteNummer = this.nummer; //this-Ref nicht unbedingt nötig!\n\t\tthis.nummer = n;\n\t\tif (!validateNummer()) { // wenn neue Nummer ist nicht gueltig\n\t\t\tthis.nummer = alteNummer;\n\t\t}\n\t}", "public final void setNum_emp(String val) {\n setString(getNum_empAttribute(getMtDatabase()), val);\n }", "public String getHospitalLevel() {\n return hospitalLevel;\n }", "public void setEmployeePersonId(Number value) {\n setAttributeInternal(EMPLOYEEPERSONID, value);\n }", "public void setNumber(Integer number) {\n this.number = number;\n }", "public void setidnumber(int id) {\r\n idnumber = id;\r\n }", "public Value.Builder setThn(java.lang.Integer value) {\n validate(fields()[13], value);\n this.thn = value;\n fieldSetFlags()[13] = true;\n return this;\n }", "public void setHall(int h) {\n hall = h;\n System.out.println(\"Singleton hall: \" + hall);\n }", "public void setEmpNumber(String empNumber)\r\n\t{\r\n\t\tthis.empNumber = empNumber;\r\n\t}", "public void setBuildingNumber(String buildingNumber);", "public void setWHStationNumber(String arg) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.WHSTATIONNUMBER.toString(), arg);\n\t}", "public void setJiaoshibianhao(Integer jiaoshibianhao) {\n this.jiaoshibianhao = jiaoshibianhao;\n }", "public void setH(int h) {\n\t\tthis.H = h;\n\t}", "public void setPhone_number(String phone_number) {\n this.phone_number = phone_number;\n }", "public void setIdNumber(String idNumber) {\n this.idNumber = idNumber;\n }", "public void setHOUSE_NUM2(java.lang.String value)\n {\n if ((__HOUSE_NUM2 == null) != (value == null) || (value != null && ! value.equals(__HOUSE_NUM2)))\n {\n _isDirty = true;\n }\n __HOUSE_NUM2 = value;\n }", "public void setID(Number numID);", "public void setPhoneno(String phoneno) {\n\tthis.phoneno = phoneno;\n}", "@Override\n public void setHp(int hp){\n this.hp = hp;\n }", "public void setH_(double h_) {\n\t\tthis.h_ = h_;\n\t}", "public void set_phone(String Phone)\n {\n phone =Phone;\n }", "public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}", "public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }", "public void setHomeNumber(String homeNumber) {\r\n this.homeNumber = homeNumber;\r\n }", "public void setUsernumber(String usernumber) {\n this.usernumber = usernumber;\n }" ]
[ "0.73482054", "0.7266527", "0.71376526", "0.6826685", "0.67554003", "0.67554003", "0.67554003", "0.655087", "0.6467126", "0.6358378", "0.63441926", "0.6114865", "0.60589665", "0.60444576", "0.6020202", "0.6015775", "0.6013356", "0.5988519", "0.597605", "0.5951426", "0.5947826", "0.5934473", "0.59095097", "0.581456", "0.58014095", "0.5786119", "0.5778845", "0.57659346", "0.5764307", "0.5763263", "0.5760862", "0.57608587", "0.57143444", "0.57013535", "0.57007104", "0.56941545", "0.56937504", "0.5687627", "0.56864893", "0.56819993", "0.5665602", "0.56547964", "0.5651387", "0.56435865", "0.5638783", "0.5634801", "0.56336075", "0.562408", "0.5619453", "0.5619453", "0.5619453", "0.5618247", "0.5607071", "0.56058455", "0.560553", "0.5604792", "0.55938965", "0.5590511", "0.55897415", "0.558574", "0.5575119", "0.5573497", "0.55712837", "0.55664366", "0.55662817", "0.5558516", "0.5558363", "0.5549521", "0.55469316", "0.5544226", "0.5537969", "0.55375624", "0.55265933", "0.55243796", "0.5515533", "0.5511229", "0.5506044", "0.54967874", "0.5494902", "0.5477894", "0.5471481", "0.5468016", "0.5457465", "0.5452455", "0.54502565", "0.54500747", "0.54429173", "0.54416573", "0.5432281", "0.5428964", "0.54161274", "0.5389904", "0.5381933", "0.53781676", "0.5371747", "0.5367459", "0.5367459", "0.53669065", "0.5366375", "0.5365145" ]
0.80455464
0
Setter for this class
public void setAnimals(ArrayList<Animal> animals) { this.animals = animals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "public void setX(int x) { this.x=x; }", "@Override\n public void setX(int x) {\n this.x=x;\n }", "public void setValue(Object value) { this.value = value; }", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "private SetProperty(Builder builder) {\n super(builder);\n }", "@Override\n\tpublic void setValue(Object object) {\n\n\t}", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "public void set(String name, Object value) {\n }", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "@Override\n public void setValue(Object val)\n {\n value = val;\n }", "public void setProperty(String name,Object value)\n {\n ClassAnalyzer.setProperty(m_Source,name,value);\n }", "String setValue();", "public void setAge(int age) { this.age = age; }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public void setClass_(String newValue);", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public abstract void set(M newValue);", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "public void setValue(Object value);", "public void setValue(final Object value) { _value = value; }", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "public void setValue(Object value) {\n this.value = value;\n }", "public void setValue(A value) {this.value = value; }", "public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public void setdat()\n {\n }", "@Override\npublic void setAttributes() {\n\t\n}", "@Override\n\tpublic void setData() {\n\n\t}", "public void setValue(T value) {\n this.value = value;\n }", "@Override\n public void set(T value) throws Exception {\n _curator.setData().forPath(_zkPath, toZkBytes(value));\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setValue(Object val);", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "void setValue(Object value);", "public void setX(int x)\r\n {\r\n this.x = x;\r\n }", "public abstract void setValue(T value);", "public void setX(int x){\n this.x = x;\n }", "public void setX(int x){\n this.x = x;\n }", "public void setX(int x){\n this.x = x;\n }", "public void setX(int x){\n this.x = x;\n }", "public void setValue(Object o){\n \tthis.value = o;\n }", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "@Override\n public void set(C content) {\n this.content = content;\n }", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}", "private void set(){\n resetBuffer();\n }", "@Override\n\t\tpublic void setAttribute(String name, Object value) {\n\t\t\t\n\t\t}", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "@Override\n\tprotected void setValue(String name, TipiValue tv) {\n\t}", "@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}", "@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}", "public void setValue(int value) {\r\n this.value = value;\r\n }", "public void setData(T val) {\r\n\t\tthis.val = val;\r\n\t}", "public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}", "public void setValue(Object value)\r\n\t{\r\n\t\tm_value = value;\r\n\t}", "public void setX(int x)\n {\n this.x = x;\n }", "public void setValue(S s) { value = s; }", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "public void set(T pValue) {\n mValue = pValue;\n }", "@Override\n\tpublic void setX(int x) {\n\n\t}", "public void setX(int x) {\n this.x = x;\r\n }", "public void setValue(Value value) {\n this.value = value;\n }", "public abstract void setValue(Context c, Object v) throws PropertyException;", "protected abstract Set method_1559();", "@Override\n\tpublic void setX(int x) {\n\t\t\n\t}", "public void setValue(Object value)\r\n {\r\n m_value = value;\r\n }", "protected abstract void setValue(V value);", "public abstract void setValue(int value);", "public void setProperty(Integer t) {\n\n\t\t}", "private void setData() {\n\n }", "@Override\n\tpublic void setClassValue(final String value) {\n\n\t}", "public void set(E obj) {\r\n throw new UnsupportedOperationException();\r\n }", "public void setValue(Integer value) {\n _value = value ;\n }", "public void set (String Value)\n\t\t{\n\t\tthis.Value = Value;\t\t\n\t\t}", "@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}", "public void setLongitud(Integer longitud)\n/* 42: */ {\n/* 43:62 */ this.longitud = longitud;\n/* 44: */ }", "@JsProperty void setValue(String value);", "public void setValue (String Value);", "public void setValue(Object value) {\n setValue(value.toString());\n }", "void setIntValue(int value)\n {\n this.value = value;\n }", "public void setProperty(String name,Object value);", "public void setX(int x);", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "public void setNumero(int numero)\r\n/* 195: */ {\r\n/* 196:206 */ this.numero = numero;\r\n/* 197: */ }", "public void setValue(T r) {\n\t\tthis.r = r;\n\t\t// needToNotify = false;\n\t\tmController.onRecordModified(this);\n\t}", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "@Override\n public void setValue (int newValue){\n super.setValue(newValue);\n updateChildesValues(newValue);\n\n }", "public void setAge(int age);", "@Override\n\tpublic void setProperty(String propertyName, Object value) {\n\t\t\n\t}", "public void setValue(int value)\n {\n this.value = value;\n }", "public final void set () {\t\n\t\tsymbol = null;\t\n\t\tmksa = underScore; factor = 1;\n\t\tvalue = 0./0.;\t\t\t// NaN\n\t\toffset = 0.;\n\t}", "public void setValue(E value)\n {\n }" ]
[ "0.6519724", "0.6434125", "0.6402108", "0.6358036", "0.63557583", "0.63199854", "0.631696", "0.6314754", "0.6303906", "0.62921053", "0.6252601", "0.6200338", "0.619954", "0.61947596", "0.61528105", "0.61379766", "0.61357087", "0.61336243", "0.60929406", "0.60749066", "0.60462433", "0.6044248", "0.6039596", "0.6038104", "0.60376906", "0.6030048", "0.60258216", "0.6020866", "0.6017253", "0.60014266", "0.60013485", "0.5999528", "0.5999502", "0.5968887", "0.59637624", "0.5962087", "0.5962087", "0.5955109", "0.59483767", "0.59355813", "0.592741", "0.59233266", "0.5908522", "0.5908522", "0.5908522", "0.5908522", "0.5907968", "0.59072334", "0.58811945", "0.5878192", "0.5863955", "0.58556855", "0.5854333", "0.58516246", "0.58508587", "0.5847421", "0.58426", "0.58389264", "0.5830978", "0.58112514", "0.58065087", "0.58022094", "0.5792217", "0.5789445", "0.578815", "0.5788057", "0.5784897", "0.5783217", "0.5782593", "0.5779148", "0.5777929", "0.5774968", "0.5772005", "0.57696503", "0.57652336", "0.57640785", "0.5756217", "0.575406", "0.5747076", "0.5745312", "0.57449186", "0.5740136", "0.5736513", "0.5735681", "0.5730526", "0.5728533", "0.5724777", "0.5717411", "0.5714161", "0.5698705", "0.569851", "0.569731", "0.5692882", "0.5690058", "0.5690058", "0.56882817", "0.56878865", "0.56850564", "0.5682147", "0.56787944", "0.5665744" ]
0.0
-1
Getters for this class
public String getFILE_NAME() { return FILE_NAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n String get();", "@Override\n public void get() {}", "public Method getGetter() {\n return this.getter;\n }", "public int getAge() {return age;}", "public Set<ObjectLabel> getGetters() {\n if (getters == null)\n return Collections.emptySet();\n if (Options.get().isDebugOrTestEnabled())\n return Collections.unmodifiableSet(getters);\n return getters;\n }", "public java.lang.String getGet() {\n return instance.getGet();\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@FameProperty(name = \"accessors\", derived = true)\n public Collection<TWithAccesses> getAccessors() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "@Override\n Derived get();", "public Age getAge() {\n return age;\n }", "public String getGetter() {\n return \"get\" + getCapName();\n }", "public String getter() {\n\t\treturn name;\n\t}", "@Override\n protected void getExras() {\n }", "public int getAge(){\n return age;\n }", "public Properties getProperties()\n {\n return this.properties;\n }", "public int getAge()\n {\n return age;\n }", "public String get();", "public int getAge()\r\n {\r\n return age;\r\n }", "public Object getProperties() {\n return this.properties;\n }", "public int getAge() {\n return this.age;\n }", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "@Override\n\t/**\n\t * returns the visibility modifiers for the specific class\n\t * \n\t * @return visibility modifiers \n\t */\n\tpublic String getVisability() {\n\t\treturn visability;\n\t}", "@java.lang.Override\n public int getAge() {\n return age_;\n }", "protected List getProperties() {\n return null;\n }", "public int getAge() {\r\n return age;\r\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "protected java.util.Map getProperties() {\n return properties;\n }", "public Attributes getAttributes() { return this.attributes; }", "private Get() {}", "private Get() {}", "public abstract String get();", "public void get() {\n }", "String getName(){return this.name;}", "protected String getName(){\r\n return this.name;\r\n }", "public int getAge() {\n return mAge;\n }", "@Test\n\tpublic static void testGetters() {\n\t\tCompoundMadeOfElementDTO idk = new CompoundMadeOfElementDTO(1, 3, 20);\n\t\tassertEquals(1, idk.getCompoundID());\n\t\tassertEquals(3, idk.getElementID());\n\t\tassertEquals(20, idk.getElementQuantity());\n\t}", "@Override\r\n\tpublic int getAge() \r\n\t{\r\n\t\treturn this._age;\r\n\t}", "@java.lang.Override\n public int getAge() {\n return age_;\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}", "public Properties getProperties() {\n return properties;\n }", "public Properties getProperties() {\n return properties;\n }", "public String getSex(){ //\"public\" access allows other classes to retrieve the value of \"sex\", but since there\n // is no setter it cannot be changed from outside the class = Encapsulation/Inkapsling\n return this.sex;\n }", "public Properties getProperties() { return props; }", "public Object get()\n {\n return m_internalValue;\n }", "public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "public int getAge() {\n\t \t return age; \n\t}", "public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }", "public THING get() {\n return directlyGet();\n }", "public Map<String, String> properties() {\n return this.properties;\n }", "public T get() {\n return value;\n }", "public Properties getProperties() {\n\t\treturn this.properties;\n\t}", "public String get()\n {\n return this.string;\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n public ConfigurablePropertyMap getProperties() {\n return properties;\n }", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "@Override\n\tpublic int getAge() {\n\t\treturn age;\n\t}", "public org.LexGrid.commonTypes.Properties getProperties() {\n return properties;\n }", "@Override\r\n public String getDescripcion() {\r\n return this.descripcion;\r\n }", "@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }", "public String getName(){return this.name;}", "public abstract AbstractProperties getProperties();", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public String getNombre(){\n return nombre;\n }", "public Integer getAge() {\r\n return age;\r\n }", "int getBlue(){\n\n return this.blue;\n }", "private ConfigProperties getProperties() {\n return properties;\n }", "@Override\n public int get()\n { \n return this.pr;\n }", "Properties getProps()\n {\n return props;\n }", "public Student getStudent() { return student; }", "public Hashtable getProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getProperties();\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}", "public String getName () { return this.name; }", "public int getAge();", "public int getAge();", "public String description(){\n return this.DESCRIPTION;\n }", "public String getNombre(){\n\treturn this.nombre;\n }", "protected abstract MethodDescription accessorMethod();", "public int get () { return rating; }", "@Kroll.getProperty(name = \"properties\")\n public KrollDict getRevisionProperties() {\n return super.getRevisionProperties();\n }", "public String getNombre(){\r\n return nombre;\r\n }", "String getName() {\n return this.name;\n }", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "public String getNombre(){\n return nombre;\n }", "public String getNombre(){\n return nombre;\n }", "@Override\n public Iterator<T> getHojas(){\n return (super.getHojas());\n }" ]
[ "0.66014546", "0.65650696", "0.6443942", "0.6436526", "0.64277047", "0.6395635", "0.63567156", "0.62935877", "0.6250907", "0.6249754", "0.6248908", "0.6225938", "0.6224623", "0.62198997", "0.6219757", "0.6211309", "0.6205373", "0.61891997", "0.6176155", "0.6173546", "0.61699706", "0.61361814", "0.61297876", "0.6124333", "0.6111187", "0.609891", "0.609891", "0.609891", "0.609891", "0.609891", "0.609891", "0.609891", "0.609891", "0.609235", "0.6083193", "0.6061681", "0.6061681", "0.6041978", "0.6037292", "0.60207796", "0.6019527", "0.6011509", "0.6011436", "0.5984176", "0.59721315", "0.59635264", "0.59455585", "0.5938478", "0.59359914", "0.59114444", "0.59024966", "0.5886789", "0.58790267", "0.5877441", "0.58748317", "0.58682996", "0.5865742", "0.5864623", "0.5849501", "0.58438253", "0.5836653", "0.5832122", "0.5831226", "0.58274907", "0.58232266", "0.58208495", "0.5795705", "0.57912034", "0.57900494", "0.5787894", "0.57833755", "0.57833755", "0.5778651", "0.57734114", "0.5770423", "0.576721", "0.5762921", "0.5760351", "0.5755691", "0.57508856", "0.5750055", "0.5750055", "0.5750055", "0.5750055", "0.5750055", "0.5748773", "0.57454854", "0.5743082", "0.5738056", "0.5738056", "0.57370114", "0.573567", "0.5734032", "0.57324547", "0.5728978", "0.57258594", "0.5721763", "0.57201403", "0.5718838", "0.5718838", "0.57184505" ]
0.0
-1
Fetching animals data from csv file
public void createAnimalsCollection() { ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals(); setAnimals(new ArrayList<>()); for (DataSetAnimal animal: animalsFetched) { String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(" ") + 1); switch (tmpBreed) { case "dolphin": getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; case "duck": getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; case "cat": getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; case "chicken": getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; case "horse": getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; case "shark": getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; case "parakeet": getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; default: getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth())); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public void read()\r\n\t{\r\n\t\tScanner input = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\r\n\t\t\tinput = new Scanner(new File(\"netflix.csv\")).useDelimiter(\"[,\\r\\n]\");\r\n\r\n\t\t\twhile (input.hasNext())\r\n\t\t\t{\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tString title = input.next();\r\n\r\n\t\t\t\tString rating = input.next();\r\n\r\n\t\t\t\tint year = Integer.parseInt(input.next());\r\n\r\n\t\t\t\tint score = Integer.parseInt(input.next());\r\n\t\t\t\tMovie a = new Movie(title, rating, year, score);\r\n\t\t\t\tdata[i] = a;\r\n\t\t\t\ti++;\r\n\t\t\t\tactualSize++;\r\n\r\n\t\t\t}\r\n\t\t\tinput.close();\r\n\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "private static ArrayList<Glootie> loadAliensFromFile(String pathToCSV) throws Exception{\r\n\t\tArrayList<Glootie> alienArray = new ArrayList<>();\r\n\t\tBufferedReader csvReader = new BufferedReader(new FileReader(pathToCSV));\r\n\t\t//Read and ignore header row:\r\n\t\tString row = csvReader.readLine();\r\n\t\t//Read remain data from CSV file\r\n\t\twhile ((row = csvReader.readLine()) != null) {\r\n\t\t\tString[] data = row.split(\",\");\r\n\t\t\t// Add new Glootie to array\r\n\t\t\talienArray.add(new Glootie(data));\r\n\t\t}\r\n\t\tcsvReader.close();\r\n\r\n\t\treturn alienArray;\r\n\t}", "public void loadListFromCsv() {\n List<Publication> list = new ArrayList<>();\n String line;\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(\"saves/data.csv\"))){\n while ((line = bufferedReader.readLine()) != null){\n String[] attributes = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n String[] formattedAttributes = formatAttributes(attributes);\n Publication book = createPublicationFromAttributes(formattedAttributes);\n list.add(book);\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n\n this.library = list;\n }", "public Films getFilmData(String csvPath){\n Films films = new Films();\n String[] line;\n \n try(CSVReader csv = new CSVReader(new FileReader(csvPath));){\n String[] headers = csv.readNext(); //read first line for header strings\n \n while((line = csv.readNext()) != null){\n films = storeLine(line, films); //store each line as film data in films\n }\n }catch(IOException ex){\n ex.printStackTrace();\n }\n \n return films;\n }", "public void LoadFromCSV(){\n InputStream inputStream = getResources().openRawResource(R.raw.movielist);\n CSVinput csVinput = new CSVinput(inputStream);\n final List<String[]> movList = csVinput.read();\n\n for(String[] data : movList) {\n itemArrAdapt.add(data);\n }\n }", "@SuppressWarnings(\"resource\")\r\n\tpublic static ArrayList<UserInfo> getUserDataFromCsvFile()\r\n\t{\r\n\t\t\r\n\t\tArrayList<UserInfo> unfList=null;\r\n\t\ttry{\r\n\t\t\tFile myObj= new File(\"E:\\\\Selenium Setup\\\\datadriven.csv\");\r\n\t\t\tunfList = new ArrayList<UserInfo>();\r\n\t\t\tScanner myReader= new Scanner(myObj);\r\n\t\t\tint count=0;\r\n\t\t\twhile (myReader.hasNextLine()) \r\n\t\t\t{\r\n\t\t\t\tString data= myReader.nextLine();\r\n\t\t\t\tif (count !=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] info =data.split(\"\\\\,\");\r\n\t\t\t\t\tunfList.add(new UserInfo(info[0],info[1]));\r\n\t\t\t\t\t//unfList.add(new UserInfo(info[0], info[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t++count;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n\t\t\treturn unfList;\r\n\t}", "public DataProcessor(String filename) throws FileNotFoundException{\n\tlst = new ArrayList();\n\tScanner input = new Scanner(new FileReader(filename));\n //skip the first line of the csv file\n\tString escapedLine = input.nextLine();\n \twhile(input.hasNextLine()){\n\t recordCount++;\n\t String line = input.nextLine();\n\t //CORRECTION BLOC to skip quoted commas\n\t if (line.contains(\"\\\"\")){\n\t\tint first= line.indexOf(\"\\\"\");\n\t\twhile(first >0 ){\n\t\t String problem = line.substring(first,line.indexOf(\"\\\"\",first+1)+1);\n\t\t \tint second = line.indexOf(\"\\\"\",first+1);\n\t\t\t//look for comma between quoted\n\t\t\tif(problem.contains(\",\")){\n\t\t\t //replace comma by space not to change string indices\n\t\t\t problem=problem.replace(\",\",\" \");\n\t\t\t line=line.replace(line.substring(first,line.indexOf(\"\\\"\",first+1)+1),problem);\n\t\t\t}\n\t\t\t//look for another quote symbol\n\t\t\tfirst = line.indexOf(\"\\\"\",second+1);\n\t\t}\n\t }\n\t String[] fields = line.split(\",\");\n\t //create Person object to store the suspect's data\n\t Person suspect = new Person(fields[SEX].charAt(0),fields[RACE].charAt(0),Integer.parseInt(fields[DOB]),Integer.parseInt(fields[HEIGHTFT]),fields[EYECOLOR],fields[BUILD].charAt(0));\n\t lst.add(suspect);\n\t}\n\t//close scanner\n\tinput.close();\n }", "public void openPlayerDataFromCSV() throws FileNotFoundException {\n csvReader = new BufferedReader(new FileReader(PATH_TO_CSV));\n }", "public Instances openCSV(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tCSVLoader loader = new CSVLoader();\n\t\t\tloader.setSource(new File(path));\n\t\t\tdataset = loader.getDataSet();\n\t\t\t\n\t\t\t//VERIFICA QUE HAYA UNA CLASE, SI NO LO HAY LO ESTABLECE\n\t\t\tif (dataset.classIndex() == -1)\n\t\t\t\tdataset.setClassIndex(dataset.numAttributes() - 1);\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\t\n\t\treturn this.dataset;\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 List<Country> readCountriesFromCSV(String fileName){\n try {\n Scanner scanner = new Scanner(new File(fileName));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n while(scanner.hasNextLine()){\n lsta.add(createCountry(scanner.nextLine().split(\",\")));\n// System.out.println(pyr.get_pharaoh()+\"|\"+pyr.get_modern_name()+\"|\"+pyr.get_site()+\"|\"+pyr.get_height()+\"|\");\n }\n scanner.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(CityCSVDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return lsta;\n }", "public List<Utilisateur> generateData() throws FileNotFoundException, IOException {\n Reader reader = new FileReader(\"F:\\\\Bibliothèques\\\\Documents\\\\MIAGE M1\\\\WEB\\\\TPWeb\\\\src\\\\main\\\\webapp\\\\data.csv\");\n\n CSVReader<Utilisateur> csvPersonReader = new CSVReaderBuilder<Utilisateur>(reader).entryParser(new UtilisateurEntryParser()).build();\n\n List<Utilisateur> persons = csvPersonReader.readAll();\n\n return persons;\n\n }", "public static void loadcars() {\n Cars xx = new Cars();\n System.out.println(\"Load cars\");\n listcars.clear();\n try {\n File fileload = new File(\"cars.csv\");\n BufferedReader in = new BufferedReader(new FileReader(fileload));\n String st;\n while((st = in.readLine()) != null) {\n String[] strs = st.split(\"[,//;]\");\n addcar(strs[0], strs[1], strs[2],Integer.parseInt(strs[3]));\n }\n in.close();\n System.out.println(\"cars data restored from cars.csv\");\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n\n }", "public void readInOrganizations() {\n // read CSV file for Organizations\n allOrganizations = new ArrayList<Organization>();\n InputStream inputStream = getResources().openRawResource(R.raw.organizations);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] organizationInfo = (String[]) scoreList.get(i);\n\n // inputs to Organization constructor:\n // String name, int logoPhotoID, int photo1ID, int photo2ID, int photo3ID\n\n // group together description\n String description = getDescription(5, organizationInfo);\n\n // get all image IDs according to the names\n int logoPhotoID = context.getResources().getIdentifier(organizationInfo[1], \"drawable\", context.getPackageName());\n int photo1ID = context.getResources().getIdentifier(organizationInfo[2], \"drawable\", context.getPackageName());\n int photo2ID = context.getResources().getIdentifier(organizationInfo[3], \"drawable\", context.getPackageName());\n int photo3ID = context.getResources().getIdentifier(organizationInfo[4], \"drawable\", context.getPackageName());\n allOrganizations.add(new Organization(organizationInfo[0], logoPhotoID, photo1ID, photo2ID, photo3ID, description));\n\n //System.out.println(\"organizationInfo: \" + organizationInfo[0] + \" \" + organizationInfo[1] + \" \" + organizationInfo[2] + \" \" + organizationInfo[3] + \" \" + organizationInfo[4]);\n }\n }", "public void readToCsv() {\r\n\r\n String seperator = \";\";\r\n\r\n try (BufferedReader reader = new BufferedReader(\r\n new FileReader(\"Products.csv\"))){\r\n\r\n String line = null;\r\n for(int i=1; (line = reader.readLine()) != null; i++) {\r\n String[] fields = line.split(seperator, -1);\r\n\r\n // For nutrients objects to read\r\n if(fields.length ==5){\r\n Nutrient object= new Nutrient();\r\n object.name = fields[0];\r\n object.price = Double.parseDouble(fields[1]);\r\n object.tag=fields[2];\r\n object.content = fields[3];\r\n object.numOfProduct = Integer.parseInt(fields[4]);\r\n //object.addFeatures(object.name,object.price,object.size,object.gender,object.tag,object.content,object.numOfProduct);\r\n NutrientList.add(object);\r\n allProducts.add(object);\r\n }\r\n // For Cosmetics objects to read\r\n if (fields.length==6){\r\n Cosmetics object2=new Cosmetics();\r\n object2.name = fields[0];\r\n object2.price = Double.parseDouble(fields[1]);\r\n object2.gender = fields[2];\r\n object2.tag=fields[3];\r\n object2.content = fields[4];\r\n object2.numOfProduct = Integer.parseInt(fields[5]);\r\n //object2.addFeatures(object2.name,object2.price,object2.size,object2.gender,object2.tag,object2.content,object2.numOfProduct);\r\n CosmeticsList.add(object2);\r\n allProducts.add(object2);\r\n }\r\n // For clothes objects to read\r\n if(fields.length ==7){\r\n\r\n Clothes object3=new Clothes();\r\n object3.name = fields[0];\r\n object3.price = Double.parseDouble(fields[1]);\r\n object3.size= fields[2];\r\n object3.tag=fields[4];\r\n object3.content = fields[5];\r\n object3.numOfProduct = Integer.parseInt(fields[6]);\r\n object3.addFeatures(object3.name,object3.price,object3.size,\"E\",object3.tag,object3.content,object3.numOfProduct);\r\n ClothesList.add(object3);\r\n allProducts.add(object3);\r\n }\r\n\r\n }}\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "protected static ArrayList<String> load() throws Exception {\r\n\t\tArrayList<String> list;\r\n\t\tFileReader fileRead = new FileReader(csv);\r\n\t\tBufferedReader buff = Files.newBufferedReader(Paths.get(\"story.csv\"));\r\n\t\tlist = buff.lines().map(line -> line.split(\",\")).flatMap(Arrays::stream)\r\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\r\n\t\tbuff.close();\r\n\t\tfileRead.close();\r\n\r\n\t\treturn list;\r\n\t}", "public static HashMap<String, String> processCSVVocabs(String path) throws FileNotFoundException {\n HashMap<String, String> ontoAndTest = new HashMap<>();\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n\n String currentLine;\n int lineN = 0;\n String ontology=\"\";\n String test=\"\";\n String name=\"\";\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n ontology = info[0];\n test = info[1];\n ontoAndTest.put(ontology,test);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return ontoAndTest;\n }", "static public List<Category> categoryReader() throws IOException {\n\n BufferedReader csvReader = new BufferedReader(new FileReader(CATEGORIES_REFERENCE_FILE));\n String row;\n List<Category> dataList = new ArrayList<>();\n\n row = csvReader.readLine();\n while ((row = csvReader.readLine()) != null){\n Category data = new Category();\n String[] datas = row.split(SEPARATOR_COMA);\n\n data.setCategory_id(Integer.parseInt(datas[0]));\n data.setName(datas[1]);\n dataList.add(data);\n\n }\n return dataList;\n }", "public static void main(String[] args){\n String path=\"C:/Users/SAMUEL/imag98908es.csv\";\n String linea=\" \";\n try{\n BufferedReader br= new BufferedReader(new FileReader(path));\n ArrayList<Integer> datos=new ArrayList<Integer>();\n while((linea=br.readLine())!=null){\n String[] valores=linea.split(\",\");\n List<String> list=Arrays.asList(valores);\n System.out.println(list);\n }\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }catch(IOException e){\n e.printStackTrace();\n }\n }", "public int loadData(Reader csv, KeywordFactory kwf) \n throws InterruptedException, IOException\n {\n return loadData(csv, kwf, false);\n }", "private String IMO_read_file() throws Exception {\n\t\t CSVReader reader = new CSVReader(new FileReader(System.getProperty(\"user.dir\") + \"\\\\src\\\\main\\\\resources\\\\FileUploadData\\\\test_IMO.csv\"));\n\t\t \n\t\t // this will load content into list\n\t\t List<String[]> li=reader.readAll();\n\t\t System.out.println(\"Total rows which we have is \"+li.size());\n\t\t \n\t\t // create Iterator reference\n\t\t Iterator<String[]>i1= li.iterator();\n\t\t \n\t\t // Iterate all values \n\t\t while(i1.hasNext()){\n\t\t \n\t\t String[] str=i1.next();\n\t\t \n\t\t \n\t\t for(int i=0;i<str.length;i++)\n\t\t{\n\t\t \n\t\t System.out.print(\" IMO \"+str[i]);\n\t\t \n\t\t}\n\t\t System.out.println(\" \");\n\t\t imo_from_spreadsheet = str[0]; \n\t\t\t System.out.println(\"IMO \" + imo_from_spreadsheet); \n\t\t \n\t\t}\n\t\n\t\treturn imo_from_spreadsheet;\n\t\t \n\t }", "@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public static ArrayList<Actor> getActors() {\n File file = new File(\"./data/names.csv\");\n FileReader nameFileReader;\n Scanner scan;\n try {\n nameFileReader = new FileReader(file);\n scan = new Scanner(nameFileReader);\n\n } catch (IOException e) {\n throw new Error(\"Could not open names file\");\n }\n scan.nextLine();\n\n // Read File to get Actors\n ArrayList<Actor> actors = new ArrayList<Actor>();\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n String[] ratingParts = line.split(\"\\t\");\n\n if (isActor(ratingParts[ratingParts.length - 1])) {\n Actor actor = new Actor(ratingParts[2], ratingParts[1]);\n actors.add(actor);\n }\n }\n\n // Close Scanner\n scan.close();\n\n // Return Actors\n return actors;\n }", "public void readEntityCSV(String line) {\n List<String> items = Arrays.asList(line.split(\",\"));\n this.setId(Long.valueOf(items.get(0)));\n this.noOfRounds = Integer.parseInt(items.get(1));\n this.caliber = Float.parseFloat(items.get(2));\n this.manufacturer = items.get(3);\n this.price = Float.parseFloat(items.get(4));\n }", "private Agent loadFromFile(String _login)\n {\n Agent agent = new Agent();\n File file = new File(_login + \".csv\");\n FileReader fr;\n BufferedReader br;\n String line;\n try {\n fr = new FileReader(file);\n br = new BufferedReader(fr);\n\n line = br.readLine();\n\n int numCients;\n { // to restrain the scope of csvData\n String[] csvData = line.split(\",\");\n agent.setID(Integer.parseInt(csvData[0]));\n agent.setName(csvData[1]);\n agent.setSalary(Double.parseDouble(csvData[2]));\n agent.setSalesBalance(Double.parseDouble(csvData[3]));\n\n numCients = Integer.parseInt(csvData[4]);\n }\n\n for(int i = 0; i<numCients; i++) {\n line = br.readLine();\n\n Client client = new Client();\n int numProp;\n\n {\n String[] csvData = line.split(\",\");\n client.setID(Integer.parseInt(csvData[0]));\n client.setName(csvData[1]);\n client.setIncome(Double.parseDouble(csvData[2]));\n\n numProp = Integer.parseInt(csvData[3]);\n }\n\n for(int j=0; j<numProp; j++)\n {\n line = br.readLine();\n\n String[] csvData = line.split(\",\");\n\n if(csvData[0].equals(\"house\")) {\n House property = new House();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasGarden(Boolean.parseBoolean(csvData[6]));\n property.setHasPool(Boolean.parseBoolean(csvData[7]));\n\n client.addProperty(property);\n }\n else if(csvData[0].equals(\"apt\"))\n {\n Apartment property = new Apartment();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasTerrace(Boolean.parseBoolean(csvData[6]));\n property.setHasElevator(Boolean.parseBoolean(csvData[7]));\n property.setFloor(Integer.parseInt(csvData[8]));\n property.setNumber(Integer.parseInt(csvData[9]));\n\n client.addProperty(property);\n }\n }\n\n agent.addClient(client);\n }\n fr.close();\n br.close();\n return agent;\n }\n catch (NumberFormatException nfEx) {\n JOptionPane.showMessageDialog(null, \"There was a problem when retrieving \" +\n \"the agent's data.\\n Please try again\");\n return null;\n }\n catch (IOException ioEx) {\n JOptionPane.showMessageDialog(null, \"This user doesn't exist....\");\n return null;\n }\n }", "public void readCsvFile(String path) {\n\n // make sure the ArrayList is empty before you start recording the data\n if (!Records.isEmpty()) {\n Records.clear();\n }\n try {\n // read data from the .csv file\n System.out.println(\"Reading array list....\");\n BufferedReader br = new BufferedReader(new FileReader(path));\n // Skip the first line\n String line = br.readLine();\n while ((line = br.readLine()) != null) {\n\n String[] fields = line.split(\",\");\n Record record = new Record( // the fields in .csv are jumbled\n Integer.parseInt(fields[2]), // skierID\n Integer.parseInt(fields[3]), // liftID\n Integer.parseInt(fields[1]), // dayNum\n Integer.parseInt(fields[4])); // time\n Records.add(record);\n }\n\n br.close();\n System.out.println(\"!!Reading completed!!\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@PostConstruct\n public void loaddata() throws IOException {\n File file = ResourceUtils.getFile(configProvider.getFilePath());\n Reader in = new FileReader(file.getPath());\n Iterable<CSVRecord> records = CSVFormat.RFC4180.withHeader(\n \"locationid\", \"Applicant\", \"FacilityType\", \"cnn\", \"LocationDescription\", \"Address\", \"blocklot\", \"block\", \"lot\",\n \"permit\", \"Status\", \"FoodItems\", \"X\", \"Y\", \"Latitude\", \"Longitude\", \"Schedule\",\n \"dayshours\", \"NOISent\", \"Approved\", \"Received\", \"PriorPermit\", \"ExpirationDate\",\n \"Location\", \"Fire Prevention Districts\", \"Police Districts\",\n \"Supervisor Districts\", \"Zip Codes\", \"Neighborhoods (old)\"\n ).parse(in);\n\n Iterator<CSVRecord> iterator = records.iterator();\n iterator.next();\n // use our own ids because of how atomic integers work, we can't have a 0 for an id, so can't rely on outside sources.\n int i = 0;\n while (iterator.hasNext()) {\n CSVRecord record = iterator.next();\n FoodTruck truck = new FoodTruck(Float.parseFloat(record.get(\"Latitude\")), Float.parseFloat(record.get(\"Longitude\")),\n record.get(\"Address\"), record.get(\"FoodItems\"), ++i);\n //add food truck to datastore\n truckDataStore.addTruck(truck.getId(), truck);\n\n final Rectangle rect = new Rectangle(truck.getLat(), truck.getLon(),\n truck.getLat(), truck.getLon());\n //add food truck location + id to location data store.\n locationDataStore.getSpatialIndex().add(rect, truck.getId());\n }\n }", "public List<Lender> readCSVFile(String path){\r\n\r\n List<Lender> inputList = new ArrayList<>();\r\n try{\r\n File inputF = new File(path);\r\n InputStream inputFS = new FileInputStream(inputF);\r\n BufferedReader br = new BufferedReader(new InputStreamReader(inputFS));\r\n // skip the header of the csv\r\n inputList = br.lines().skip(1).map(mapToItem).collect(Collectors.toList());\r\n br.close();\r\n } catch (IOException e) {\r\n throw new QuoteException(\"Error reading the csv file\", e);\r\n }\r\n\r\n return inputList ;\r\n }", "void loadCrimeList(InputStream inputStream) {\n // Define a scanner\n try (Scanner scanner = new Scanner(inputStream)) {\n\n // While the scanner has another line to read\n while (scanner.hasNextLine()) {\n\n // Get the next link and split it into parts\n String line = scanner.nextLine();\n String parts[] = line.split(\",\");\n\n //Assign each part to a local var\n String id = parts[0];\n String title = parts[1];\n String dateString = parts[2];\n String solvedString = parts[3];\n\n UUID uuid = UUID.fromString(id);\n Date date = new SimpleDateFormat(\n \"yyyy-MM-dd\",\n Locale.getDefault()\n ).parse(dateString);\n boolean isSolved = (solvedString.equals(\"1\"));\n\n // Add the Crime to the Crime list\n mCrimes.add(\n new Crime(\n uuid,\n title,\n date,\n isSolved\n )\n );\n }\n\n // Date read in, so set the dataLoadedOnce flag to true.\n mDataLoadedOnce = true;\n\n } catch (Exception e) {\n Log.e(\"Read CSV\", e.toString());\n }\n }", "private static void readInputDataFromCSV(String pathToCSVfile) throws IOException {\n\n // open the file\n BufferedReader reader = new BufferedReader(new FileReader(pathToCSVfile));\n // read line by line\n String line = null;\n Scanner scanner = null;\n int index = 0;\n inputPlayersList = new ArrayList<>();\n\n while ((line = reader.readLine()) != null) {\n Player pl = new Player();\n scanner = new Scanner(line);\n scanner.useDelimiter(\",\");\n while (scanner.hasNext()) {\n String data = scanner.next();\n if (index == 0)\n pl.setLastName(data);\n else if (index == 1)\n pl.setFirstName(data);\n else if (index == 2)\n pl.setCountry(data);\n else if (index == 3)\n pl.setTicketNumber(data);\n else\n System.out.println(\"Incorrect data: \" + data);\n index++;\n }\n index = 0;\n inputPlayersList.add(pl);\n\n }\n //close reader\n reader.close();\n }", "static public List<Product> productReader() throws IOException {\n BufferedReader csvReader = new BufferedReader(new FileReader(PRODUCTS_REFERENCE_FILE));\n String row;\n List<Product> dataList = new ArrayList<>();\n\n row = csvReader.readLine();\n while ((row = csvReader.readLine()) != null){\n\n Product data = new Product();\n //I separate the row data by a separator, a coma in this case and add all the data in the class\n String[] datas = row.split(SEPARATOR_COLON);\n\n data.setProduct_id(Integer.parseInt(datas[0]));\n data.setName(datas[1]);\n data.setDescription(datas[2]);\n data.setCategory_id(Integer.parseInt(datas[3]));\n\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"MM/dd/yyyy\");\n\n //Since some dates had just one number for the month, I had to use this to add a 0\n //to make all the dates the same length after getting rid of the 0:01 that was not necessary\n String[] creationDate = datas[4].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setCreation_date(LocalDate.parse(creationDate[0], formatter));\n\n creationDate = datas[5].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setUpdate_date(LocalDate.parse(creationDate[0], formatter));\n\n creationDate = datas[6].split(\" \");\n if(creationDate[0].length() == 9){\n creationDate[0] = \"0\"+ creationDate[0];\n }\n data.setLast_purchased_date(LocalDate.parse(creationDate[0], formatter));\n\n dataList.add(data);\n\n }\n return dataList;\n\n }", "private static List<String> readData(String path) throws IOException{\n ArrayList<String> data = new ArrayList<>();\n try (\n Reader reader = Files.newBufferedReader(Paths.get(path), StandardCharsets.UTF_8);\n CSVReader csvReader = new CSVReader(reader)\n ){\n String[] nextRecord;\n while ((nextRecord = csvReader.readNext()) != null) {\n if (nextRecord[0].contains(\"name\")){\n System.out.println(\"Skipping column headers...\");\n }else {\n data.add(nextRecord[0]);\n// System.out.println(nextRecord[0]);\n }\n }\n }\n return data;\n }", "@Test\n\tpublic void testReadCsvFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readCsvFile(\"movies.csv\");\n\t\tassertEquals(\"toy story\", parsedLines.get(0));\n\t}", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public TreeSet<Product> readCSV() throws IOException, NumberFormatException {\n\r\n TreeSet<Product> products = new TreeSet<>();\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(\"src/Collection/file.csv_2.txt\"));) {\r\n while ((line = reader.readLine()) != null) {\r\n String[] row = line.split(\",\");\r\n\r\n Location location = new Location(\r\n Double.parseDouble(row[14]),\r\n Integer.parseInt(row[15]),\r\n Float.parseFloat(row[16]),\r\n row[17]);\r\n Address address = new Address(\r\n row[12],\r\n row[13],\r\n location\r\n );\r\n Organization organization = new Organization(\r\n Integer.parseInt(row[8]),\r\n row[9],\r\n row[10],\r\n OrganizationType.valueOf(row[11]),\r\n address\r\n );\r\n Coordinates coordinates = new Coordinates(\r\n Float.parseFloat(row[3]),\r\n Double.parseDouble(row[4])\r\n );\r\n try {\r\n\r\n\r\n Product product = new Product (\r\n Integer.parseInt(row[0]),\r\n row[1],\r\n LocalDate.parse(row[2].replace(\"/\", \"-\")),\r\n coordinates,\r\n Integer.parseInt(row[5]),\r\n row[6],\r\n UnitOfMeasure.valueOf(row[7]),\r\n organization\r\n );\r\n products.add(product);}\r\n catch (NumberFormatException e){\r\n System.out.println(\"wrong format\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n products.forEach(System.out::println);\r\n return products;\r\n }", "private void loadAllCountData(){\n // load from csv\n try{\n FileReader file = new FileReader(\"/home/ubuntu/user_counts_small.csv\");\n //FileReader file = new FileReader(\"/Users/YHWH/Desktop/cloud computing/team project/user_counts.csv\");\n BufferedReader buff = new BufferedReader(file);\n String line = \"\";\n boolean eof = false;\n\n while(!eof){\n line = buff.readLine();\n if(line == null){\n eof = true;\n }\n else{\n String[] data = line.split(\"\\t\"); //0->id, 1->selfCount, 2->prevCount\n wholeCountData.put(data[0], Integer.parseInt(data[2]));\n }\n }\n buff.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public static List<Pokemon> addData(String csvFile, List<Pokemon> pokemons) throws IOException {\n BufferedReader buff = new BufferedReader(new FileReader(new File(csvFile)));\n String line = buff.readLine();\n String[] headers = line.split(\",\");\n\n int count = 1;\n while ((line = buff.readLine()) != null) {\n String[] pok = line.split(\",\");\n Pokemon pokemonToAlter = null;\n count++;\n\n // match the pokemons from the new dataset with the ones from the old dataset\n // TODO SH: Kunne dette gøres med en binary search eller en anden hurtig måde :)?\n for(Pokemon p : pokemons) {\n if (p.getName().startsWith(pok[pok.length - 11]) || pok[pok.length - 11].startsWith(p.getName())) {\n pokemonToAlter = p;\n break;\n }\n }\n // to avoid null pointer\n if (pokemonToAlter == null) pokemonToAlter = new Pokemon();\n\n // a map of types to the pokemons efficiency against them\n Map<Type1, Double> typeMatchingMap = new HashMap<>();\n int index = 1;\n for (int i = 0; i < pok.length; i++) {\n // jumping over the abilities to get to the right data\n while (!pok[i].matches(\"[0-9].*\") && i < 6) i++;\n\n // limiting the search to 18, which is the number of types\n if (index < 19) {\n // retrieving the types from the headers and converting them to Type enums\n String typeHeader = headers[index];\n String typeString = typeHeader.split(\"_\")[1];\n Type1 type = getType1(typeString);\n typeMatchingMap.put(type, Double.parseDouble(pok[i]));\n index++;\n }\n // add the map to the pokemons info\n pokemonToAlter.addTypeMap(typeMatchingMap);\n }\n }\n for(Pokemon p : pokemons) {\n if(p.getTypeMap().size() == 0) {\n for(Pokemon q : pokemons) {\n if(p.getType1().equals(q.getType1())) {\n p.addTypeMap(q.getTypeMap());\n break;\n }\n }\n }\n }\n return pokemons;\n }", "@Override\n\tpublic void parseCSV(String csv) {\n\t\t\n\t}", "public static List<Pokemon> addEvolution(String csvFile, List<Pokemon> pokemons) throws IOException {\n BufferedReader buff = new BufferedReader(new FileReader(new File(csvFile)));\n String line = buff.readLine();\n String[] headers = line.split(\",\");\n\n // a map of pokemons to their ID's in current dataset\n Map<Integer, Pokemon> tempPoke = new HashMap<>();\n\n // a map of evolutionchainID to the members of the chain\n Map<Integer, List<Pokemon>> evolutionChain = new HashMap<>();\n\n while ((line = buff.readLine()) != null) {\n String[] pokemon = line.split(\",\");\n int pokelength = pokemon.length;\n int pokeIndex = Integer.parseInt(pokemon[0]);\n // locate the pokemons in the already loaded data\n for (Pokemon p : pokemons) {\n if (p.getName().toLowerCase().equals(pokemon[1])) {\n // place them in the map with their temporary ID\n tempPoke.put(pokeIndex, p);\n break;\n }\n }\n\n // if this is a pokemon that appears in both datasets\n if (tempPoke.containsKey(pokeIndex)) {\n // if it is a member of an evolution chain, add it to the map\n if (!pokemon[pokelength - 3].equals(\"\")) {\n int chainID = Integer.parseInt(pokemon[pokelength - 3]);\n tempPoke.get(pokeIndex).setEvolutionChain(chainID);\n if (evolutionChain.containsKey(chainID)) {\n evolutionChain.get(chainID).add(tempPoke.get(pokeIndex));\n } else {\n List<Pokemon> evolution = new ArrayList<>();\n evolution.add(tempPoke.get(pokeIndex));\n evolutionChain.put(chainID, evolution);\n }\n }\n // if it has a parent, set the parent ID\n if (!pokemon[pokelength - 4].equals(\"\")) {\n int parentID = Integer.parseInt(pokemon[pokelength - 4]);\n tempPoke.get(pokeIndex).setParentID(parentID);\n }\n }\n }\n // for each \"family\" of pokemons\n for (Map.Entry<Integer, List<Pokemon>> chain : evolutionChain.entrySet()) {\n int stagesToSet = chain.getValue().size();\n List<Pokemon> family = chain.getValue();\n // for each pokemon in the family\n for (Pokemon p : family) {\n // count the length of the evolution chain\n int count = 1;\n if (p.getParentID() == 0) {\n p.setStage(count);\n } else {\n Pokemon pokemonToExamine = p;\n int lastInLine = pokemonToExamine.getParentID();\n while (pokemonToExamine.getParentID() != 0) {\n lastInLine = pokemonToExamine.getParentID();\n pokemonToExamine = tempPoke.get(lastInLine);\n count++;\n }\n // set the evolution stage to be the length of the evolution chain from the pokemon and back\n p.setStage(count);\n }\n }\n }\n return pokemons;\n }", "private ArrayList<String> getFileData(InputStream is) {\n ArrayList<String> restaurantData = new ArrayList<>();\n\n // Initialize the reader for the csv file\n BufferedReader reader = new BufferedReader(new InputStreamReader(is,\n Charset.forName(\"UTF-8\")));\n\n // Read each line into the ArrayList\n try {\n // Read the file\n String row;\n while ((row = reader.readLine()) != null) {\n restaurantData.add(row);\n }\n } catch (IOException ex) {\n Log.i(TAG, \"Error reading line\", ex);\n } finally {\n try {\n // Close the file\n reader.close();\n } catch (IOException ex) {\n Log.i(TAG, \"Error closing file\", ex);\n }\n }\n\n // Return data\n return restaurantData;\n }", "public static void printResultsFromCSV() {\n try (CSVReader reader = new CSVReader(new FileReader(\"results.csv\"), ',', '\"', 0)) {\n Map<String, Integer> results = new HashMap<>();\n String[] nextLine;\n while ((nextLine = reader.readNext()) != null) {\n if (nextLine[0].contains(\"http\")) {\n results.put(nextLine[0], Integer.valueOf(nextLine[1]));\n }\n }\n results.\n entrySet().\n stream().\n sorted(Map.Entry.<String, Integer>comparingByValue().reversed()).\n forEach(entry -> System.out.println(entry.getKey() + \", \" + entry.getValue()));\n } catch (IOException e) {\n System.err.println(\"Can't find results.csv\");\n }\n }", "static public void readCSVData(String csvFile, String imagePath)\n\t{\t\n String line = \"\";\n String cvsSplitBy = \"\\t\";\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(csvFile), \"UTF8\"))) {\n\n while ((line = br.readLine()) != null) {\n String[] dataMovie = line.split(cvsSplitBy);\n //System.out.println(\"Nom: \" + dataMovie[0] + \"\\nDate de sortie: \" + dataMovie[1] + \"\\nRealisateur: \" + dataMovie[2] + \"\\nDescription: \" + dataMovie[3] + \"\\nLien de la BA: \" + dataMovie[4] + \"\\nLiens sceances: \" + dataMovie[5] + \"\\nNom fichier image: \" + dataMovie[6] + \"\\n\");\n\t\t\t\tmoviesDataTab.add(dataMovie[0] + \"\\t\" + dataMovie[1] + \"\\t\" + dataMovie[2] + \"\\t\" + dataMovie[3] + \"\\t\" + dataMovie[4] + \"\\t\" + dataMovie[5]);\n\t\t\t\timageTab.add(imagePath +\"/images/\" +dataMovie[6]);\n\t\t\t}\n } catch (IOException e) {\n e.printStackTrace();\n }\t\n\t}", "public void readFile(){\r\n\t\tFileInputStream inputStream = null;\r\n\t\tScanner scan = null;\r\n\t\tString path = \"C:/Users/spandya/workspace/LatestPrice.csv\";\r\n\t\ttry {\r\n\t\t\tinputStream = new FileInputStream(path);\r\n\t\t\tscan = new Scanner(inputStream, \"UTF-8\");\r\n\t\t\twhile(scan.hasNext()){\r\n\t\t\t\tString line = scan.nextLine();\r\n\t\t\t\tString firstWord = line.split(\",\")[0];\r\n\t\t\t\tString latestPrice = line.substring(line.lastIndexOf(\",\")+1);\r\n\t\t\t\tSystem.out.println(firstWord+\":\"+latestPrice);\r\n\t\t\t}\r\n\t\t\tif(scan.ioException() != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthrow scan.ioException();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tif(inputStream != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinputStream.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(scan != null){\r\n\t\t\t\tscan.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tPyramidCSVDAO pDAO = new PyramidCSVDAO() ;\n\t\t\n\t\tArrayList<Pyramid> pyramids = pDAO.readPyramidsFromCSV(\"pyramids.csv\") ;\n\t\t\n\t\tint i = 0 ;\n\t\tfor(Pyramid p:pyramids) {\n\t\t\tSystem.out.println(p) ;\n\t\t}\n\t\t\n\t}", "public void readRestaurantDetail (BufferedReader reader) {\n\n\n try {\n // Each line of CSV will be stored in this String\n String line = \"\";\n reader.readLine();\n int id = 0;\n while ((line = reader.readLine()) != null) {\n// count++;\n\n // line will be split by \",\", into an array of String\n String[] eachDetailsOfRestaurant = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n\n // Restaurant object created with the tracking number and name.\n Restaurant restaurant = new Restaurant(eachDetailsOfRestaurant[0], eachDetailsOfRestaurant[1], id);\n\n// Log.e(\"checking..............\", count.toString() + \" \" + restaurant.getName());\n\n // Converting coordinates to double and creating Location object\n for (int i = 0; i < eachDetailsOfRestaurant.length; i++) {\n Log.e(TAG, \"\" + i + \":\" + eachDetailsOfRestaurant[i]);\n }\n Double latitude = Double.parseDouble(eachDetailsOfRestaurant[5]);\n Double longitude = Double.parseDouble(eachDetailsOfRestaurant[6]);\n Location location = new Location(eachDetailsOfRestaurant[2], eachDetailsOfRestaurant[3], latitude, longitude);\n\n // Setting Location of the restaurant and adding to the Arraylist\n restaurant.setLocation(location);\n restaurants.add(restaurant);\n id++;\n }\n Collections.sort(restaurants);\n } catch (IOException e) {\n// e.printStackTrace();\n }\n }", "List<String[]> readCsv(String inputFilePath)throws IOException;", "public void Read_Csv() {\n\t\t\n\t\tFile file = new File(\"Faucets.csv\");\n\t\tif(file.exists() == false) {\n\t\t\ttry {\n\t\t\t\t if (file.createNewFile()) {\n\t\t\t\t System.out.println(\"File created: \" + file.getName());\n\t\t\t\t } else {\n\t\t\t\t System.out.println(\"File already exists... Error\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\tFileWriter myWriter = new FileWriter(\"Faucets.csv\");\n\t\t\t\tmyWriter.write(\"Freebitco.in,3600,228,\");\n\t\t\t\tmyWriter.close();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Reading the file\n\t\tString line = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"Faucets.csv\");\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\tint x = 0;\n\t\t\tint commacounter = 0;\n\t\t\tint commaposition[] = new int[3];\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\twhile(x < line.length()) {\n\t\t\t\t\t\n\t\t\t\t\tif(line.charAt(x) == ',') {\n\t\t\t\t\t\tcommaposition[commacounter] = x;\n\t\t\t\t\t\tcommacounter +=1;\n\t\t\t\t\t}\n\t\t\t\t\tif(commacounter == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFaucets.site[amount_counter] = line.substring(0, commaposition[0]);\n\t\t\t\t\t\tFaucets.time[amount_counter] = Integer.parseInt(line.substring(commaposition[0]+1, commaposition[1]));\n\t\t\t\t\t\tFaucets.amount[amount_counter] = Integer.parseInt(line.substring(commaposition[1]+1, commaposition[2]));\n\t\t\t\t\t\tamount_counter += 1;\n\t\t\t\t\t\tcommacounter=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tx+=1;\n\t\t\t\t}\n\t\t\t\tx=0;\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\n\t\t\t\n\t}", "public static ArrayList<Glootie> getAliens(){\r\n\t\tLogger logger = Logger.getLogger(Ship.class.getName());\r\n\t\tArrayList<Glootie> aliens = null;\r\n\t\ttry {\r\n\t\t\taliens = loadAliensFromFile(pathToCSV);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.log(Level.SEVERE, \"There was Error while loading the AlienLoveBook.csv\"\r\n\t\t\t\t\t+\"\\n Check to see that you added it to your package.\"\r\n\t\t\t\t\t+\"Don't just Link you must copy it in.\");\t\t}\r\n\t\treturn aliens;\r\n\t}", "private static ArrayList<Ms3Person> readCSV(String fileName) {\r\n\t\tArrayList<Ms3Person> personsList = new ArrayList<>();\r\n\t\ttry (Scanner sc = new Scanner(new File(fileName))) {\r\n\t\t\t// skip the first line which is having column headers name\r\n\t\t\tsc.nextLine();\r\n\t\t\tint index = 1;\r\n\t\t\t// loop will go till end of file is reached ie.\r\n\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t// read single line at a time\r\n\t\t\t\tString personData = sc.nextLine();\r\n\t\t\t\tif(index >=5999)\r\n\t\t\t\t\tSystem.out.println(index+\" index\"+personData);\r\n\t\t\t\t//System.out.println(personData);\r\n\t\t\t\t//split the string by delimiter ,\r\n\t\t\t\tif(personData.length()>2) {\r\n\t\t\t\t\tString singlePersonRecord[] = personData.split(\",\");\r\n\t\t\t\t\t//the data we get is in form of sTring we need to convert\r\n\t\t\t\t\t//it to required data type for usage\r\n\t\t\t\t\tMs3Person person = convertDataToRequiredDataType(singlePersonRecord,index);\r\n\t\t\t\t\tif (person != null) {\r\n\t\t\t\t\t\t// add the person object in ArrayList\r\n\t\t\t\t\t\tpersonsList.add(person);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// bad data so create new file & write data\r\n // writing to the logfile\r\n \r\n \r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"index: \" + index);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tif(personData.length()<1) {//if no more line is there or only empty lines left\r\n\t\t\t\t\t\tSystem.out.println(\"finished reading the file...\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// if any exception arises while reading the file data that exception\r\n\t\t\t// will be caught in this block\r\n\t\t\tSystem.out.println(\"EXCEPTION: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn personsList;\r\n\t}", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "private void readingFiles() {\r\n\r\n File sdCard = Environment.getExternalStorageDirectory();\r\n File directory = new File(sdCard.getAbsoluteFile() + \"/MyApplication\");\r\n\r\n //List of names\r\n File name = new File(directory, \"nameList.csv\");\r\n FileInputStream fIn = null;\r\n try {\r\n fIn = new FileInputStream(name);\r\n InputStreamReader isr = new InputStreamReader(fIn);\r\n char[] inputBuffer = new char[READ_BLOCK_SIZE];\r\n String s = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer, 0, charRead);\r\n s += readString;\r\n inputBuffer = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s.split(\",\");\r\n nameList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n nameList = new ArrayList<String>();\r\n }\r\n\r\n //List of latitudes\r\n File lat = new File(directory, \"latList.csv\");\r\n FileInputStream fIn1 = null;\r\n try {\r\n fIn1 = new FileInputStream(lat);\r\n InputStreamReader isr = new InputStreamReader(fIn1);\r\n char[] inputBuffer1 = new char[READ_BLOCK_SIZE];\r\n String s1 = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer1)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer1, 0, charRead);\r\n s1 += readString;\r\n inputBuffer1 = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s1.split(\",\");\r\n latList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n latList = new ArrayList<String>();\r\n }\r\n\r\n //List of longitudes\r\n File lng = new File(directory, \"lngList.csv\");\r\n FileInputStream fIn2 = null;\r\n try {\r\n fIn2 = new FileInputStream(lng);\r\n InputStreamReader isr = new InputStreamReader(fIn2);\r\n char[] inputBuffer2 = new char[READ_BLOCK_SIZE];\r\n String s2 = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer2)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer2, 0, charRead);\r\n s2 += readString;\r\n inputBuffer2 = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s2.split(\",\");\r\n lngList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n lngList = new ArrayList<String>();\r\n }\r\n if (lngList.get(0) == \"\") {\r\n lngList.remove(0);\r\n }\r\n if (latList.get(0) == \"\") {\r\n latList.remove(0);\r\n }\r\n if (nameList.get(0) == \"\") {\r\n nameList.remove(0);\r\n }\r\n }", "public static String ReadCSV() {\n File file = new File(\"Words.csv\");\n System.out.println(\"*****Program Started***** \" + Time.valueOf(LocalTime.now()));\n\n try {\n FileReader fRead = new FileReader(file);\n BufferedReader bfr = new BufferedReader(fRead);\n String line;\n line = bfr.readLine();\n line = line.replace(\"\\\"\", \"\");\n\n\n words = line.split(\",\");\n int count = 0;\n\n/** Next, read each line of numbers and put them into an Integer array.\n *\t\t\t Finally, store them in a hashmap (genre and related int array)and return\n */\n\n while ((line = bfr.readLine()) != null) {\n String[] temp = line.split(\",\");\n int[] wordCount = new int[words.length];\n for (int i = 0; i < temp.length; i++) {\n\n wordCount[i] = Integer.parseInt(temp[i]);\n }\n\n /**\n * Other than taking the count, we normalize them to improve the accuracy\n * */\n\n double[] temp2 = new double[wordCount.length];\n double total = 0;\n for (int i = 0; i < temp2.length; i++) {\n for (int j = 0; j < temp2.length; j++) {\n total = total + wordCount[j];\n }\n temp2[i] = 100.0 * wordCount[i] / total;\n\n }\n\n hMap.put(genres[count], temp2);\n count++;\n\n }\n System.out.println(\"*****Matrix Created successfully.***** \" + Time.valueOf(LocalTime.now()));\n return \"OK\";\n\n } catch (IOException e) {\n System.out.println(\"*****Creating matrix failed*****\");\n return \"END\";\n }\n }", "public void loadData() {\n String[] animalsListRaw = loadStrings(\"data/animalList.csv\");\n //String[] animalsListRaw = loadStrings(\"data/mythical.creatures.csv\");\n String[] animalList = getList(animalsListRaw);\n SearchQuery newSearch = new SearchQuery(animalList); \n allMaps = newSearch.getMap();\n \n map = new UnfoldingMap(this);\n map.setBackgroundColor(color(179, 223, 222, 255));\n map.zoomAndPanTo(width/2, height/2, 2);\n //MapUtils.createDefaultEventDispatcher(this, map);\n countries = GeoJSONReader.loadData(this, \"countries.geo.json\");\n marks = new MarkerMaker(allMaps, countries);\n map.draw();\n}", "public void loadData()\n\t{\n\t\tString fileName = \"YouthTobaccoUse.csv\"; //file to be read and loaded in\n\t\tScanner input = FileUtils.openToRead(fileName).useDelimiter(\",\");\n\t\tint count = 0;\n\t\tboolean isNewState = false;\n\t\tString state = \"\", measure = \"\", stateAbbr = \"\";\n\t\tdouble percent = 0.0;\n\t\tint stateDate = 0;\n\t\twhile(input.hasNext())\n\t\t{\n\t\t\tString line = input.nextLine();\n\t\t\tint tokenCount = 0;\n\t\t\ttokens[tokenCount] = \"\";\n\t\t\t//each line tokenized\n\t\t\tfor(int i = 0; i < line.length(); i++)\n\t\t\t{\n\t\t\t\tif(line.charAt(i) == ',')\n\t\t\t\t{\n\t\t\t\t\ttokenCount++;\n\t\t\t\t\ttokens[tokenCount] = \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ttokens[tokenCount] += line.charAt(i);\n\t\t\t}\n\t\t\t//loads values into variables, converts String into integers and doubles\n\t\t\tString abbr = tokens[1];\n\t\t\tString name = tokens[2];\n\t\t\tString measureDesc = tokens[5];\n\t\t\tint date = convertInteger(tokens[0]);\n\t\t\tdouble percentage = 0.0;\n\t\t\tif(tokens[10].equals(\"\") == false)\n\t\t\t\tpercentage = convertDouble();\n\t\t\tif(abbr.equals(stateAbbr))\n\t\t\t{\n\t\t\t\tif(measureDesc.equals(\"Smoking Status\") \n\t\t\t\t\t\t\t\t\t|| measureDesc.equals(\"User Status\"))\n\t\t\t\t\tpercent += percentage;\n\t\t\t}\n\t\t\telse\n\t\t\t\tisNewState = true;\n\t\t\tif(isNewState)\n\t\t\t{\n\t\t\t\t//calculates the average values for each state, then adds to \n\t\t\t\t//array list, stored as fields\n\t\t\t\tpercent = (double)(percent/count);\n\t\t\t\tif(state.equals(\"Arizona\") && stateDate == 2017)\n\t\t\t\t\ttobacco.add(new StateTobacco(state, stateAbbr, 3.75, 2017));\n\t\t\t\telse if(state.equals(\"Guam\") == false && count != 0 && count != 1\n\t\t\t\t&& stateAbbr.equals(\"US\") == false)\n\t\t\t\t\ttobacco.add(new StateTobacco(state, stateAbbr, percent, stateDate));\n\t\t\t\tstate = name;\n\t\t\t\tstateAbbr = abbr; \n\t\t\t\tstateDate = date;\n\t\t\t\tisNewState = false;\n\t\t\t\tpercent = 0.0;\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t}", "@Test\r\n public void readCsvFile() throws FileNotFoundException, IOException { \r\n CsvReader csvr = new CsvReader(CSV_FILE);\r\n \r\n List<NetworkElement> nes = csvr.getNetworkElements();\r\n assertEquals(55,nes.size()); \r\n }", "public static void loadEnergyGoalData(MakahikiSNA processor) {\n List<String[]> eventLines; \n try { \n File dir = new File(processor.dataPath(\"\"));\n CSVReader csvFile = new CSVReader(new FileReader(new File(dir, \"energygoals.csv\")));\n eventLines = csvFile.readAll();\n eventLines.remove(0); // get rid of the header line.\n csvFile.close();\n } \n catch (Exception e) {\n System.out.println(\"Failure in loadEnergyGoalData: \" + e);\n throw new RuntimeException();\n } \n \n // [2] Process each line and create a list of EnergyGoals. \n // timestamp,loungeString,energy-goals\n for (String[] eventLine : eventLines) {\n String timestamp = eventLine[0];\n String loungeString = eventLine[1];\n String numGoals = eventLine[2];\n EnergyGoal energyGoal = new EnergyGoal(timestamp, loungeString, numGoals);\n \n // Build the data structure.\n for (Team team : energyGoal.getTeams()) {\n if (!energyGoals.containsKey(team)) {\n energyGoals.put(team, new HashMap<Integer, Integer>());\n }\n Map<Integer, Integer> timestamp2goal = energyGoals.get(team);\n int timestep = timeStepDefinition.timeStamp2TimeStep(energyGoal.getTimestamp());\n timestamp2goal.put(timestep, energyGoal.getGoals());\n }\n }\n }", "public void loadDemonPiece(HashMap<Integer, DemonPiece> DemonPiece_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"DemonPiece.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(DemonPiece_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n DemonPiece demonPiece = new DemonPiece(-1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n demonPiece.setId(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n demonPiece.setAreaNumber(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n DemonPiece_HASH.put(demonPiece.getId(), demonPiece);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadDemonPiece\");\r\n }\r\n \r\n }", "public Set<Airport> loadFile(final String csvFile) throws CoreException;", "private void readNodes() throws FileNotFoundException{\n\t\tScanner sc = new Scanner(new File(\"Resources\\\\ListOfNodes.csv\"));\n\t\tsc.nextLine(); //Skip first line of headers\n\t\twhile(sc.hasNext()) { \n\t\t\tCSVdata = sc.nextLine().split(\",\"); // Add contents of each row to String[]\n\t\t\tnodes.add(new GraphNode<String>(CSVdata[0], CSVdata[1])); // Add new node to object list\n\t\t}\n\t\tsc.close();\n\t}", "public static List<Sample> readCSV(String Location){\n\t\tList<Sample> SampleList= new ArrayList<Sample>();\n\n\t\tFileReader fileReader = null;\n\n\t\tCSVParser csvFileParser = null;\n\n\t\tCSVFormat csvFileFormat = CSVFormat.DEFAULT.withSkipHeaderRecord();\n\t\ttry {\n\n\t\t\t//initialize FileReader object\n\t\t\tfileReader = new FileReader(Location);\n\n\t\t\t//initialize CSVParser object\n\t\t\tcsvFileParser = new CSVParser(fileReader, csvFileFormat);\n\n\t\t\t//Get a list of CSV file records\n\t\t\tList<CSVRecord> csvRecords = csvFileParser.getRecords(); \n\n\t\t\tint start=0;\n\t\t\tString check = csvRecords.get(0).get(0);\n\t\t\tif(check.equals(\"Time\")){\n\t\t\t\tstart=1;\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstart=0;\n\t\t\t}\n\n\t\t\t//Read the CSV file records \n\t\t\tfor (int j = start; j < csvRecords.size(); j++) {\n\n\t\t\t\tCSVRecord record = csvRecords.get(j);\n\t\t\t\tList<wifi> listOfWifi= new ArrayList<wifi>();\n\n\n\t\t\t\tboolean end=true;\n\t\t\t\tfor( int i=6; i<record.size()&&end; ){\n\t\t\t\t\tif(record.get(i).trim().equals(\"\") && record.get(i+1).trim().equals(\"\")){\n\t\t\t\t\t\tend=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(i+3<record.size()){\n\t\t\t\t\t\tlistOfWifi.add(new wifi(record.get(i), record.get(i+1), record.get(i+3), record.get(i+2)));\n\t\t\t\t\t}\n\t\t\t\t\ti+=4;\n\t\t\t\t}\t\t\n\t\t\t\tString recordlat;\n\t\t\t\tString recordlon;\n\t\t\t\tString recordAlt;\n\n\t\t\t\tif (record.get(2).equals(\"?\")){\n\t\t\t\t\trecordlat=\"-200\";\n\t\t\t\t\trecordlon=\"-200\";\n\t\t\t\t\trecordAlt=\"-200\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\trecordlat=record.get(2); \n\t\t\t\t\trecordlon=record.get(3);\n\t\t\t\t\trecordAlt=record.get(4);\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t\t\tSample sample= new Sample(record.get(0), record.get(1),recordlat,recordlon,recordAlt,\n\t\t\t\t\t\t\trecord.get(5), listOfWifi);\n\t\t\t\t\tSampleList.add(sample);\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tSystem.out.println(\"not in format 46 CSV file\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} \n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Error in CsvFileReader !!!\");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileReader.close();\n\t\t\t\tcsvFileParser.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error while closing fileReader/csvFileParser !!!\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn SampleList;\n\t}", "public void printNumberOfAnswerTypes(String csvName, String trajFileName, String questionLocationsName, double meters, double speedThreshold, double timeThreshold) {\n Scanner csv = null;\n Scanner ql = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n ql = new Scanner(new File(questionLocationsName));\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n ArrayList<Point2D.Double> questionLocations = new ArrayList<Point2D.Double>();\n\n while (ql.hasNextLine()) {\n questionLocations.add(new Point2D.Double(ql.nextDouble(), ql.nextDouble()));\n }\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n\n HashMap<Integer, ArrayList<AnswerTrajectory>> teams = new HashMap<Integer, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n\n for (String s : Ids) {\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n\n if (anstj == null)\n System.out.println(\"Could not find data for deviceId: \" + s);\n\n else {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort answer list data by time\n double startTime = (anstj.get(0).getTimeStamp() - 1377334800000.0) / 1000.0;//converts the time stamp to time after the event started\n double speed = determineAverageSpeed(trajectories, anstj.get(0).getId());\n //System.out.println(speed+\" \"+startTime);\n if (speed != -1) // ensure the trajectory data exists for this ID\n {\n //classify the team type\n int teamType = 0;\n\n if (startTime < timeThreshold) {\n if (speed > speedThreshold) // serious\n teamType = 1;\n else\n teamType = 2;// get it over with\n } else {\n if (speed > speedThreshold) // hurried\n teamType = 3;\n else\n teamType = 4; //lazy\n }\n if (teams.get(teamType) == null) {\n System.out.println(\"first team type for: \" + teamType);\n teams.put(teamType, new ArrayList<AnswerTrajectory>(anstj));\n } else {\n teams.get(teamType).addAll(anstj);\n }\n }\n }\n }\n int totalcc = 0;\n int totalcd = 0;\n int totalic = 0;\n int totalid = 0;\n for (int i = 1; i < 5; i++) {\n ArrayList<AnswerTrajectory> trajs = teams.get(i);\n int cc = 0;\n int cd = 0;\n int ic = 0;\n int id = 0;\n\n for (AnswerTrajectory at : trajs) {\n int question = at.getQuestion();\n double qX = questionLocations.get(question - 1).getX(); //question location x and y\n double qY = questionLocations.get(question - 1).getY();\n\n double aX = at.getX(); //location when question was answered\n double aY = at.getY();\n\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int correct = 0;\n if (at.getAnswer() == 1 || at.getAnswer() == 2)\n correct = 1;\n\n if (distToAnswer <= meters) {\n if (correct == 1)\n cc++;\n\n if (correct == 0)\n ic++;\n } else {\n if (correct == 1)\n cd++;\n\n if (correct == 0)\n id++;\n }\n\n }\n totalcc += cc;\n totalcd += cd;\n totalic += ic;\n totalid += id;\n\n }\n System.out.println(\"Answer Type Totals\\n\" + \"CC: \" + totalcc + \"\\nCD: \" + totalcd + \"\\nIC: \" + totalic + \"\\nID: \" + totalid);\n\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n if (ql != null)\n ql.close();\n\n }\n }", "public static ArrayList<ArrayList<String>> getAllDataFromFile(String csvInputPath, char sep) {\n ArrayList<ArrayList<String>> allData = new ArrayList<>();\r\n try (CSVReader reader = new CSVReader(new InputStreamReader(new FileInputStream(csvInputPath)), sep, '\"', '|');) {\r\n String[] nextLine;\r\n int numRow = 0;\r\n while ((nextLine = reader.readNext()) != null && numRow < MAX_ROW_NUMBER) {\r\n ArrayList<String> allRow = new ArrayList<>();\r\n allRow.addAll(Arrays.asList(nextLine));\r\n allData.add(allRow);\r\n numRow += 1;\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageExcel.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n\r\n } catch (IOException ex) {\r\n Logger.getLogger(ManageExcel.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return allData;\r\n }", "public void readData(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\r\n String line = \"\";\r\n try {\r\n while ((line = reader.readLine()) != null) {\r\n //Split line by \",\"\r\n String[] fields = line.split(\",\");\r\n //Log.d(\"csvParseFieldLength\", String.valueOf(fields.length));\r\n ArrayList<Race> races = new ArrayList<>();\r\n if (fields[9].equals(\"\"))\r\n break;\r\n else {\r\n Swimmer s = new Swimmer(fields[0],fields[10], fields[9], Integer.parseInt(fields[8]), fields[7], races);\r\n swimmers.add(s);\r\n s.addRace(new Race(Integer.parseInt(fields[2]), Integer.parseInt(fields[3]), 0, null, (fields[4] + \" \" + fields[5])));\r\n \r\n EventID e = new EventID(eventId);\r\n String b = fields[12];\r\n \r\n \r\n if (!b.equals(\" \")) \r\n \te.addNames(b);\r\n \r\n \r\n \r\n }\r\n }\r\n } catch (IOException ex) {\r\n //Log.d(\"csvParseSwim\", \"Error reading data from file on line \" + line);\r\n }\r\n }", "public Result getFile() {\n File file = new File(\"/home/yongmu/MIDBatch.csv\");\n Scanner scanner = null;\n try {\n scanner = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while(scanner.hasNext()) {\n System.out.println(scanner.next());\n }\n return ok(file);\n }", "private Map<String, Float> loadLifeExpectancyFromCSV(String fileName){\n lifeExpMap = new HashMap<String, Float>();\n \n String[] rows = loadStrings(fileName);\n \n for(String row: rows) {\n String[] columns = row.split(\",\");\n System.out.println(columns[5]);\n if(columns.length > 0 && columns[5].matches(\"[0-9]+(.[0-9]*)?\")) {\n System.out.println(columns[4]);\n float value = Float.parseFloat(columns[5]);\n lifeExpMap.put(columns[4], value); \n }\n }\n \n return lifeExpMap;\n }", "@Override\r\n\tpublic void loadAircraftData(Path p) throws DataLoadingException {\t\r\n\t\ttry {\r\n\t\t\t//open the file\r\n\t\t\tBufferedReader reader = Files.newBufferedReader(p);\r\n\t\t\t\r\n\t\t\t//read the file line by line\r\n\t\t\tString line = \"\";\r\n\t\t\t\r\n\t\t\t//skip the first line of the file - headers\r\n\t\t\treader.readLine();\r\n\t\t\t\r\n\t\t\twhile( (line = reader.readLine()) != null) {\r\n\t\t\t\t//each line has fields separated by commas, split into an array of fields\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Creating an Aircraft object\r\n\t\t\t\tAircraft loadingIn = new Aircraft();\r\n\t\t\t\t\r\n\t\t\t\t//put some of the fields into variables: check which fields are where atop the CSV file itself\r\n\t\t\t\tloadingIn.setTailCode(fields[0]);\r\n\t\t\t\tloadingIn.setTypeCode(fields[1]);\r\n\t\t\t\t//Checking the manufacturer and setting it\r\n\t\t\t\tManufacturer manufacturer = null;\r\n\t\t\t\tString mString = fields[2];\r\n\t\t\t\tif(mString.equals(\"Boeing\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOEING;\r\n\t\t\t\telse if(mString.equals(\"Airbus\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.AIRBUS;\r\n\t\t\t\telse if(mString.equals(\"Bombardier\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOMBARDIER;\r\n\t\t\t\telse if(mString.equals(\"Embraer\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.EMBRAER;\r\n\t\t\t\telse if(mString.equals(\"Fokker\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.FOKKER;\r\n\t\t\t\telse\r\n\t\t\t\t\tmanufacturer = Manufacturer.ATR;\r\n loadingIn.setManufacturer(manufacturer);\r\n\t\t\t\tloadingIn.setModel(fields[3]);\r\n\t\t\t\tloadingIn.setSeats(Integer.parseInt(fields[4]));\r\n\t\t\t\tloadingIn.setCabinCrewRequired(Integer.parseInt(fields[5]));\r\n\t\t\t\tloadingIn.setStartingPosition(fields[6]);\r\n\t\t\t\tairCrafts.add(loadingIn);\r\n\t\t\t\t\r\n\t\t\t\t//print a line explaining what we've found\r\n\t\t\t\t/*System.out.println(\"Tail Code: \" + loadingIn.getTailCode() + \" TypeCode: \" + loadingIn.getTailCode() +\r\n\t\t\t\t\t\t\" Manufacturer: \" + loadingIn.getManufacturer() + \" Model: \" + loadingIn.getModel() +\r\n\t\t\t\t\t\t\" Seats and CabinCrew : \" + loadingIn.getSeats() + \" \" + loadingIn.getCabinCrewRequired()\r\n\t\t\t\t\t\t+ \" Starting Pos. \" + loadingIn.getStartingPosition());*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcatch (IOException ioe) {\r\n\t\t\t//There was a problem reading the file\r\n\t\t\tthrow new DataLoadingException(ioe);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error loading aircraft data\");\r\n\t\t\tDataLoadingException dle = new DataLoadingException();\r\n\t\t\tthrow dle;\r\n\t\t}\r\n\r\n\t}", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "@Override\r\n public void init() throws HarvesterException {\r\n JsonSimple options = new JsonSimple(getJsonConfig().getObject(\"harvester\", \"csv\"));\r\n \r\n String filePath = options.getString(null, \"fileLocation\");\r\n if (filePath == null) {\r\n throw new HarvesterException(\"No data file provided!\");\r\n }\r\n File csvDataFile = new File(filePath);\r\n if (csvDataFile == null || !csvDataFile.exists()) {\r\n throw new HarvesterException(\"Could not find CSV file '\" + filePath + \"'\");\r\n }\r\n filename = csvDataFile.getName();\r\n \r\n idPrefix = options.getString(\"\", \"recordIDPrefix\");\r\n maxRows = options.getInteger(-1, \"maxRows\");\r\n ignoredFields = getStringList(options, \"ignoreFields\");\r\n includedFields = getStringList(options, \"includedFields\");\r\n payloadId = options.getString(DEFAULT_PAYLOAD_ID, \"payloadId\");\r\n batchSize = options.getInteger(DEFAULT_BATCH_SIZE, \"batchSize\");\r\n hasMore = true;\r\n \r\n try {\r\n // open the CSV file for reading\r\n Reader fileReader = new InputStreamReader(new FileInputStream(csvDataFile), \"UTF-8\");\r\n char delimiter = options.getString(String.valueOf(DEFAULT_DELIMITER), \"delimiter\").charAt(0);\r\n csvReader = new CSVReader(fileReader, delimiter);\r\n \r\n // configure the data fields\r\n if (options.getBoolean(true, \"headerRow\")) {\r\n dataFields = Arrays.asList(csvReader.readNext());\r\n } else {\r\n dataFields = getStringList(options, \"headerList\");\r\n }\r\n \r\n // check that the specified id column is valid\r\n idColumn = options.getString(null, \"idColumn\");\r\n if (idColumn != null && !dataFields.contains(idColumn)) {\r\n throw new HarvesterException(\"'\" + idColumn + \"' is invalid!\");\r\n }\r\n } catch (IOException ioe) {\r\n throw new HarvesterException(ioe);\r\n }\r\n }", "public HashMap<Node, int[]> importCsv(String name) throws Exception {\n\t\t\n\t\tString path = \"./\" + name + \".csv\";\n\t\tCsvReader reader = new CsvReader(path, ';');\n\t\t\n\t\tboolean end = false;\n\t\tString[] headers;\n\t\tGraph graph = null;\n\t\tHashMap<Node, int[]> nodeDraws = new HashMap<Node, int[]>();\n\t\twhile(!end) {\n\t\t\treader.readHeaders();\n\t\t\theaders = reader.getHeaders();\n\t\t\tif(headers[0].equals(\"Graph\")) {\n\t\t\t\treader.readRecord();\n\t\t\t\tgraph = new Graph(reader.get(\"Graph\"));\n\t\t\t\tManagerMatlab.getInstance().createGraph(reader.get(\"Graph\"));\n\t\t\t\treader.skipRecord();\n\t\t\t} else if(headers[0].equals(\"Nodes\")) {\n\t\t\t\treader.readHeaders();\n\t\t\t\twhile(reader.readRecord() && reader.getColumnCount() > 1 && !reader.get(\"ID\").equals(\"\")) {\n\t\t\t\t\t//Possible problem with the encoding, so we replace  if we find it\n\t\t\t\t\tString nom = reader.get(\"Name\").replace(\"Â\", \"\");\n\t\t\t\t\tNode node = new Node(Integer.valueOf(reader.get(\"ID\")),nom);\n\t\t\t\t\tgraph.addNode(node);\n\t\t\t\t\tnodeDraws.put(node, new int[]{Integer.valueOf(reader.get(\"X\")),Integer.valueOf(reader.get(\"Y\"))});\n\t\t\t\t}\n\t\t\t }else if(headers[0].equals(\"Arcs\")) {\n\t\t\t\treader.readHeaders();\n\t\t\t\twhile(reader.readRecord() && reader.getColumnCount() > 1) {\n\t\t\t\t\tArc arc = new Arc(Integer.valueOf(reader.get(\"ID\")),\n\t\t\t\t\t\t\tgraph.getNode(Integer.valueOf(reader.get(\"headId\"))),graph.getNode(Integer.valueOf(reader.get(\"tailId\"))),\n\t\t\t\t\t\t\tBoolean.valueOf(reader.get(\"directed\")),Integer.valueOf(reader.get(\"color\")));\n\t\t\t\t\tgraph.addArc(arc);\n\t\t\t\t}\n\t\t\t\tif (reader.readRecord() == false) {\n\t\t\t\t\tend = true;\n\t\t\t\t} else {\n\t\t\t\t\treader.readHeaders();\n\t\t\t\t\twhile(reader.readRecord() && reader.getColumnCount() > 1) {\n\t\t\t\t\t\tint ID = Integer.valueOf(reader.get(\"ID\"));\n\t\t\t\t\t\tColor color = new Color(Integer.valueOf(reader.get(\"red\")),\n\t\t\t\t\t\t\t\tInteger.valueOf(reader.get(\"green\")), \n\t\t\t\t\t\t\t\tInteger.valueOf(reader.get(\"blue\")));\n\t\t\t\t\t\tManagerGraph.getInstance().addColor(ID, color);\n\t\t\t\t\t}\n\t\t\t\t\tend = true;\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t\tManagerGraph.getInstance().setGraph(graph);\n\t\treturn nodeDraws;\n\t}", "public void printData(String path , boolean isEmployee) {\n try {\n\n FileReader fileReader = new FileReader(path);\n BufferedReader buffReader = new BufferedReader(fileReader);\n String line ;\n boolean firstLine = true;\n\n // reading csv file and setting to person proto\n while((line = buffReader.readLine()) != null)\n {\n if ( firstLine) {\n firstLine = false;\n continue;\n }\n String [] data = line.split(\",\");\n\n if (isEmployee)\n readEmployeeData(data);\n else\n readBuildingData(data);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "private Iterable<CSVRecord> obtainCsvIterable()\n throws FileNotFoundException, IOException {\n return CSVFormat.RFC4180\n .withFirstRecordAsHeader()\n .parse(this.fileReader);\n\n }", "public Set<Airport> loadFile(final File csvFile) throws CoreException;", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "public static void main(String[] args) throws Exception\n\t{\n\n\n\t\tSystem.out.println(\"hi\");\n\t\tString imdb_movies = \"IMDB/IMDb movies.csv\";\n\t\tString imdb_ratings = \"IMDB/IMDb ratings.csv\";\n\n\t\tBufferedReader alReader = new BufferedReader(new FileReader(imdb_movies));\n\t\tArrayList<String[]> movies = new ArrayList<String[]>();\n\t\tString line;\n\t\tString[] alTuple;\n\t\tMap<String, Integer> actor_pop = new HashMap<>();\n\n\t\tString regex = \",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\";\n\n\t\talReader.readLine();\n\t\t//alReader.readLine();\n\t\twhile ((line = alReader.readLine()) != null) {\n\t\t\talTuple = line.split(regex, -1);\n\t\t\tif(alTuple[3].equals(\"1894\")){\n\t\t\t\talTuple[4] = \"10/9/94\";\n\t\t\t}\n\n\t\t\tif(alTuple[0].equals(\"tt0002199\")){\n\t\t\t\talTuple[4] = \"1/1/13\";\n\t\t\t}\n\n\t\t\talTuple[5] = alTuple[5].replaceAll(\"\\\"\", \"\");\n\t\t\talTuple[7] = alTuple[7].replaceAll(\"\\\"\", \"\");\n\t\t\talTuple[9] = alTuple[9].replaceAll(\"\\\"\", \"\");\n\t\t\talTuple[10] = alTuple[10].replaceAll(\"\\\"\", \"\");\n\t\t\tmovies.add(alTuple);\n\t\t\tString actors = alTuple[12];\n\t\t\tactors = actors.replaceAll(\"\\\"\", \"\");\n\t\t\tString[] actor_list = actors.split(\",\");\n\t\t\tfor (String actor : actor_list) {\n\t\t\t\tif(!actor.equals(\"\")){\n\t\t\t\tif(actor_pop.containsKey(actor)) {\n\t\t\t\t\tactor_pop.replace(actor, actor_pop.get(actor) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tactor_pop.put(actor, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t//create data for movie --> number of popular actors\n\t\tList<Integer> movieActorPop = new ArrayList<>();\n\t\tfor (String[] movie: movies) {\n\n\t\t\tint countPopActors = 0;\n\n\t\t\tString actors = movie[12];\n\t\t\tactors = actors.replaceAll(\"\\\"\", \"\");\n\t\t\tString[] actor_list = actors.split(\",\");\n\n\t\t\tif(actor_list.length > 0){\n\t\t\t\tfor(String actor: actor_list) {\n\t\t\t\t\tif(!actor.equals(\"\")){\n\t\t\t\t\tif(actor_pop.get(actor) >= POP_THRESHOLD){\n\t\t\t\t\t\tcountPopActors += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\tmovieActorPop.add(countPopActors);\n\t\t}\n\n\n\t\tBufferedReader apReader = new BufferedReader(new FileReader(imdb_ratings));\n\n\t\tapReader.readLine();\n\t\tArrayList<String[]> ratings = new ArrayList<String[]>();\n\t\tString[] tempTuple; // temporary tuple to receive information from csv\n\t\twhile ((line = apReader.readLine()) != null) {\n\t\t\ttempTuple = line.split(regex, -1);\n\t\t\tratings.add(tempTuple);\n\t\t}\n\n\t\t// initialize the connection to the database\n\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\tString DB_FILE = \"movies.db\";\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:\" + DB_FILE);\n\n\t\t// enable FOREIGN KEY constraint checking\n\t\tStatement stat = conn.createStatement();\n\t\tstat.executeUpdate(\"PRAGMA foreign_keys = OFF;\");\n\n\t\t// speed up INSERTs\n\t\tstat.executeUpdate(\"PRAGMA synchronous = OFF;\");\n\t\tstat.executeUpdate(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t// DELETE statement to overwrite any existing data in the database\n\t\tstat.executeUpdate(\"DROP TABLE IF EXISTS movies;\");\n\t\tstat.executeUpdate(\"DROP TABLE IF EXISTS ratings;\");\n\t\tstat.executeUpdate(\"DROP TABLE IF EXISTS actors;\");\n\n\t\tstat.executeUpdate(\"PRAGMA foreign_keys = ON;\");\n\n\t\t// CREATE the mvoies table with the schema:\n\t\tstat.executeUpdate(\"CREATE TABLE movies \"\n\t\t\t\t+ \"(id CHAR(9) NOT NULL PRIMARY KEY,\"\n\t\t\t\t+ \"title VARCHAR(150) NOT NULL,\"\n\t\t\t\t+ \"original_title VARCHAR NOT NULL,\"\n\t\t\t\t+ \"year INTEGER NOT NULL,\"\n\t\t\t\t+ \"month_published INTEGER NOT NULL,\"\n\t\t\t + \"genre VARCHAR(150) NOT NULL,\"\n\t\t\t + \"duration INTEGER NOT NULL,\"\n\t\t\t\t+ \"country VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"language VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"director VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"writer VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"production_company VARCHAR(200) NOT NULL, \"\n\t\t\t\t+ \"popular_actors INTEGER NOT NULL);\");\n\n\t\t// CREATE the actors table with the schema:\n\t\tstat.executeUpdate(\"CREATE TABLE actors \"\n\t\t\t\t+ \"(actor_name VARCHAR(150) PRIMARY KEY NOT NULL, \"\n\t\t\t\t+ \"num_movies INTEGER NOT NULL);\");\n\n\t\t// CREATE the ratings table with the schema\n\t\tstat.executeUpdate(\"CREATE TABLE ratings \"\n\t\t\t\t+ \"(id CHAR(9) NOT NULL,\"\n\t\t\t\t+ \"weighted_avg_vote REAL NOT NULL, \"\n\t\t\t\t+ \"total_votes INTEGER NOT NULL, \"\n\t\t\t + \"mean_vote REAL NOT NULL, \"\n\t\t\t\t+ \"median_vote INTEGER NOT NULL, \"\n\t\t\t\t+ \"votes_10 INTEGER NOT NULL, \"\n\t\t\t + \"votes_9 INTEGER NOT NULL, \"\n\t\t\t + \"votes_8 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_7 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_6 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_5 INTEGER NOT NULL, \"\n\t\t\t + \"votes_4 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_3 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_2 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_1 INTEGER NOT NULL, \"\n\t\t \t+ \"us_voter_rating REAL NOT NULL, \"\n\t\t \t+ \"us_voter_count INTEGER NOT NULL, \"\n\t\t\t\t+ \"foreign_voter_rating REAL NOT NULL, \"\n\t\t\t\t+ \"foreign_voter_count INTEGER NOT NULL, \"\n\t\t\t\t+ \"male_avg_vote REAL NOT NULL,\"\n\t\t\t\t+ \"male_votes INTEGER NOT NULL,\"\n\t\t\t\t+ \"female_avg_vote REAL NOT NULL,\"\n\t\t\t\t+ \"female_votes INTEGER NOT NULL,\"\n\t\t\t\t+ \"PRIMARY KEY (id),\"\n\t\t\t\t+ \"FOREIGN KEY (id) references movies(id) ON DELETE CASCADE);\");\n\n\t\tPreparedStatement prepAl = conn.prepareStatement(\"INSERT OR IGNORE INTO \"\n\t\t\t\t+ \"movies (id, title, original_title, year, month_published, genre, duration, country, language, \" +\n\t\t\t\"director, writer, production_company, popular_actors) VALUES (?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?)\");\n\n\t\tint count = 0;\n\t\tfor (String[] tuple : movies) {\n\t\t\t\tprepAl.setString(1, tuple[0]); //id\n\t\t\t\tprepAl.setString(2, tuple[1]); //title\n\t\t\t\tprepAl.setString(3, tuple[2]); //original_title\n\n\t\t\t\tprepAl.setInt(4, Integer.parseInt(tuple[3])); //year\n\n\t\t\t\t//month published\n\t\t\t\tPattern pattern = Pattern.compile(\".+?(?=/)\");\n\t\t\t\tMatcher matcher = pattern.matcher(tuple[4]);\n\t\t\t\tString month;\n\t\t\t\tif(matcher.find() == false) {\n\t\t\t\t\tmonth = \"0\";\n\t\t\t\t} else{\n\t\t\t\t\tmonth = matcher.group();\n\t\t\t\t}\n\n\t\t\t\tprepAl.setInt(5, Integer.parseInt(month)); //month\n\t\t\t\tprepAl.setString(6, tuple[5]); //genre\n\t\t\t\tprepAl.setInt(7, Integer.parseInt(tuple[6])); //duration\n\t\t\t\tprepAl.setString(8, tuple[7]); //country\n\t\t\t\tif(tuple[8].equals(\"\")){\n\t\t\t\t\ttuple[8] = \"None\";\n\t\t\t\t}\n\t\t\t\tprepAl.setString(9, tuple[8]); //language\n\t\t\t\tprepAl.setString(10, tuple[9]); //director\n\t\t\t\tprepAl.setString(11, tuple[10]); //writer\n\t\t\t\tprepAl.setString(12, tuple[11]);\n\t\t\t\tprepAl.setInt(13, movieActorPop.get(count));\n\t\t\t\tprepAl.addBatch();\n\t\t\t\tcount += 1;\n\t\t}\n\n\t\tconn.setAutoCommit(false);\n\t\tprepAl.executeBatch();\n\t\tconn.setAutoCommit(true);\n\n\t\tPreparedStatement prepAp = conn.prepareStatement(\"INSERT OR IGNORE INTO \"\n\t\t\t\t+ \"actors (actor_name, num_movies) VALUES (?,?)\");\n\t\tfor (String tuple : actor_pop.keySet()) {\n\n\t\t\t\tprepAp.setString(1, tuple);\n\t\t\t\tprepAp.setInt(2, actor_pop.get(tuple));\n\t\t\t\tprepAp.addBatch();\n\n\t\t}\n\n\t\tconn.setAutoCommit(false);\n\t\tprepAp.executeBatch();\n\t\tconn.setAutoCommit(true);\n\n\t\t// populate flights\n\t\tPreparedStatement prepFl = conn.prepareStatement(\"INSERT OR IGNORE INTO ratings (id, weighted_avg_vote, \" +\n\t\t\t\"total_votes, mean_vote, median_vote, votes_10, votes_9, votes_8, votes_7, votes_6, \"\n\t\t\t+ \"votes_5, votes_4, votes_3, votes_2, votes_1, male_avg_vote, male_votes, female_avg_vote, female_votes, us_voter_rating, us_voter_count, foreign_voter_rating,\" +\n\t\t\t\"foreign_voter_count) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n\t\tfor (String[] tuple : ratings) {\n\n\t\t\t// only after all constraints have been checked and passed: add the tuple's info\n\t\t\t// into the relation\n\t\t\tprepFl.setString(1, tuple[0]); // id\n\t\t\tprepFl.setDouble(2, Double.parseDouble(tuple[1])); //weighted ag\n\t\t\tprepFl.setInt(3, Integer.parseInt(tuple[2])); // total_votes\n\t\t\tprepFl.setDouble(4, Double.parseDouble(tuple[3])); // mean_vote\n\t\t\ttry {\n\t\t\t\tprepFl.setInt(5, Integer.parseInt(tuple[4])); // median vote\n\t\t\t} catch(Exception e) {\n\t\t\t\tprepFl.setInt(5, (int) Double.parseDouble(tuple[4])); // median vote\n\t\t\t}\n\n\t\t\tprepFl.setInt(6, Integer.parseInt(tuple[5]));\n\t\t\tprepFl.setInt(7, Integer.parseInt(tuple[6]));\n\t\t\tprepFl.setInt(8, Integer.parseInt(tuple[7]));\n\t\t\tprepFl.setInt(9, Integer.parseInt(tuple[8]));\n\t\t\tprepFl.setInt(10, Integer.parseInt(tuple[9]));\n\t\t\tprepFl.setInt(11, Integer.parseInt(tuple[10]));\n\t\t\tprepFl.setInt(12, Integer.parseInt(tuple[11]));\n\t\t\tprepFl.setInt(13, Integer.parseInt(tuple[12]));\n\t\t\tprepFl.setInt(14, Integer.parseInt(tuple[13]));\n\t\t\tprepFl.setInt(15, Integer.parseInt(tuple[14]));\n\n\n\t\t\t// avg male vote\n\t\t\ttry {\n\t\t\t\tprepFl.setDouble(16, Double.parseDouble(tuple[23]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[23].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else{\n\t\t\t\t\tprepFl.setDouble(16, (double)Integer.parseInt(tuple[23]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tprepFl.setInt(17, Integer.parseInt(tuple[24]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[24].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t// avg female vote\n\t\t\ttry{\n\t\t\t\tprepFl.setDouble(18, Double.parseDouble(tuple[33]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[33].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else{\n\t\t\t\t\tprepFl.setDouble(18, (double)Integer.parseInt(tuple[33]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tprepFl.setInt(19, Integer.parseInt(tuple[34]));\n\t\t\t} catch(Exception e){\n\t\t\t\tif (tuple[34].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// us/foreign\n\t\t\ttry {\n\t\t\t\tprepFl.setDouble(20, Double.parseDouble(tuple[45]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[45].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tprepFl.setDouble(20, (double)Integer.parseInt(tuple[45]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tprepFl.setInt(21, Integer.parseInt(tuple[46]));\n\t\t\t} catch (Exception e) {\n\t\t\t\tif(tuple[46].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else{\n\t\t\t\t\tprepFl.setInt(21, (int)Double.parseDouble(tuple[46]));\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprepFl.setDouble(22, Double.parseDouble(tuple[47]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[47].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tprepFl.setDouble(22, (double)Integer.parseInt(tuple[47]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tprepFl.setInt(23, Integer.parseInt(tuple[48]));\n\t\t\t} catch(Exception e){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// add the batch\n\t\t\tprepFl.addBatch();\n\n\t\t}\n\n\t\tconn.setAutoCommit(false);\n\t\tprepFl.executeBatch();\n\t\tconn.setAutoCommit(true);\n\n\t}", "public void loadCSVData() throws IOException, SQLException {\r\n //SQL statement to load csv information into data table\r\n String insertvaluesSQL = \"INSERT INTO data\"\r\n + \"(InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country)\"\r\n + \" VALUES (?,?,?,?,?,?,?,?);\";\r\n\r\n //code to read csv file taken from W03 practical\r\n BufferedReader br = new BufferedReader(new FileReader(filePath));\r\n String line = br.readLine();\r\n String[] informationArray;\r\n while (line != null) {\r\n informationArray = line.split(\",\");\r\n PreparedStatement preparedStatement = connection.prepareStatement(insertvaluesSQL);\r\n //the first '?' corresponds to the 0th term in the information array\r\n //the second '?' corresponds to the 1st term in the information array\r\n for (int i = 1; i < 9; i++) {\r\n preparedStatement.setString(i, informationArray[i - 1]);\r\n }\r\n preparedStatement.executeUpdate();\r\n line = br.readLine();\r\n }\r\n Statement statement = connection.createStatement();\r\n statement.executeUpdate(\"DELETE FROM data WHERE InvoiceNo = 'InvoiceNo';\");\r\n statement.close();\r\n }", "@Override\n public ToDoList readCSV(String csvPath) throws InvalidArgumentException {\n this.csvPath = csvPath;\n this.toDoList = new ToDoList();\n\n BufferedReader inputFile = null;\n try {\n inputFile = new BufferedReader(new FileReader(this.csvPath));\n\n String line = inputFile.readLine();\n if (line == null) {\n inputFile.close();\n return this.toDoList;\n } // Empty CSV file, no need for processing.\n this.processHeader(line);\n while ((line = inputFile.readLine()) != null) {\n this.processToDoItem(line);\n }\n inputFile.close();\n return this.toDoList;\n } catch (FileNotFoundException fnfe) {\n throw new InvalidArgumentException(\"OOPS! File not found!\");\n } catch (IOException ioe) {\n throw new InvalidArgumentException(\"There is somthing wrong!\");\n }\n }", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "void buddyMaker(String fileName) throws FileNotFoundException {\n\t\tfinal String DELIMITER = \",\";\n\t\tFile csv = new File(fileName);\n\t\tScanner csvReader = new Scanner(csv);\n\t\tcsvReader.useDelimiter(DELIMITER);\n\t\tbuddies = new ArrayList<Buddy>(); //initializes an arraylist to store all the new buddies\n\t\twhile (csvReader.hasNext()) {\n\t\t\tString name = csvReader.next();\n\t\t\tString about = csvReader.nextLine();\n\t\t\tbuddies.add(new Buddy(name, about));\n\t\t}\n\t\tcsvReader.close();\n\t}", "public static void main(String args[]) throws IOException\n {\n String path = \"user.csv\";\n Reader reader = Files.newBufferedReader(Paths.get(path));\n CSVReader csvReader = new CSVReader(reader);\n //Reading all records one by one\n String[] nextRecords;\n while ((nextRecords = csvReader.readNext()) != null) {\n System.out.println(\"Name:\" + nextRecords[0]);\n System.out.println(\"Email:\" + nextRecords[1]);\n System.out.println(\"Phone no:\" + nextRecords[2]);\n System.out.println(\"Country:\" + nextRecords[3]);\n System.out.println(\"=======================\");\n }\n //Reading all records at once\n List<String[]> records = csvReader.readAll();\n for (String[] record : records) {\n System.out.println(\"Name:\" + record[0]);\n System.out.println(\"Email:\" + record[1]);\n System.out.println(\"Phone No:\" + record[2]);\n System.out.println(\"Country:\" + record[3]);\n System.out.println(\"========================\");\n }\n }", "private ArrayList<CSVRecord> processCsvData(String csvFile) {\n ArrayList<CSVRecord> records = new ArrayList<>();\n\n File csvData = new File(\"src/main/resources/csv/\" + csvFile + \".csv\");\n\n try {\n CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), CSVFormat.EXCEL);\n records.addAll(parser.getRecords());\n } catch (IOException exception) {\n logger.error(\"Unable to parse CSV file: \" + exception.getMessage());\n }\n\n return records;\n }", "public List<Attending> getAttending(){\r\n \tList<Attending> aList = new ArrayList<Attending>();\r\n \ttry {\r\n \t\tString attendingPath = \"C:\\\\Users\\\\Tam Uduc\\\\Documents\\\\tempJavaData\\\\attending.csv\";\r\n \t\tFile attendingFile = new File(attendingPath);\r\n \t\tScanner sc = new Scanner(attendingFile);\r\n \t\t\r\n \t\twhile (sc.hasNextLine()) {\r\n \t\t\tString[] line = sc.nextLine().split(\",\");\r\n \t\taList.add(new Attending(line[0],line[1]));\r\n \t\t}\r\n \t\t\r\n \t} catch (Exception e){\r\n \t\tSystem.out.println(\"Something went wrong\");\r\n \t}\r\n \treturn aList; \r\n }", "public CityList() throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new File(\"Resources\\\\MapOfIreland.csv\"));\n\t\treadNodes(); // Call method to read in all nodes\n\t\tsc.nextLine(); //Skip first line of headers\n\t\twhile(sc.hasNext()) {\n\t\t\tCSVdata = sc.nextLine().split(\",\");\n\t\t\tint link1 = -1, link2 = -1; // Holds index of two nodes to be connected\n\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[2])) // If node data == first node to be connected\n\t\t\t\t\tlink1 = i;\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[3])) // If node data == second node to be connected\n\t\t\t\t\tlink2 = i;\n\t\t\t}\n\t\t\t// If one or both nodes weren't found\n\t\t\tif(link1 < 0 || link2 < 0) {\n\t\t\t\tSystem.out.println(\"ERROR: ONE OR BOTH NODES DO NOT EXIST\");\n\t\t\t\tSystem.out.println(CSVdata[2] + \"|\" + CSVdata[3]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Connect two links\n\t\t\telse\n\t\t\t\tnodes.get(link1).connectToNodeUndirected(nodes.get(link2), Double.parseDouble(CSVdata[1]), CSVdata[0]);\n\t\t}\n\t\tsc.close();\n\t}", "private void readVenueFile(String path)\n {\n FileIO fileIO = new FileIO();\n fileIO.setFileName(path);\n String fileData = fileIO.readFile();\n String[] data = fileData.split(\"\\\\n\"); // split data by new line character\n for(int i = 0 ; i < data.length ; i++)\n {\n String[] values = data[i].split(\",\"); //split each row by ,\n getVenues().addVenue(values[0], Integer.parseInt(values[1]),Integer.parseInt(values[2]), Double.parseDouble(values[3])); // add a venue to the collection\n } \n }", "private void processCSVFile( BufferedReader csvFile ) throws IOException {\r\n\t\t\r\n\t\tboolean headerRowRead = false;\r\n\t\tString[] headerArray = null;\r\n\t\t\r\n\t\t//loop through all rows and create contacts\r\n\t\tString row = csvFile.readLine();\r\n\t\t\r\n\t\twhile (row != null) {\r\n\t\t\t\r\n\t\t\tif (row.length()==0 || row.startsWith(\"#\") || row.startsWith(\";\") ) {\t\t\r\n\t\t\t\t\r\n\t\t\t\t//empty or comment row: skip\r\n\t\t\t\t\r\n\t\t\t} else if (!headerRowRead) {\r\n\t\t\t\t\r\n\t\t\t\t//header row is the first non-blank, not-comment row in the CSV file\r\n\t\t\t\t//the required header row contains the attribute names\r\n\t\t\t\t\r\n\t\t\t\theaderRowRead = true;\r\n\t\t\t\t\r\n\t\t\t\t//read header\r\n\t\t\t\theaderArray = parseCSVLine( row, true); \t\t\r\n\t\t\t\tLogger.debug(\"header: \" + row);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\r\n\t\t\t\tHashMap<String,String> contactObject = ContactsImport.getRowValues(headerArray, row);\r\n\t\t\t\tcreateContact(contactObject);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trow = csvFile.readLine(); //read next line form csv file\r\n\t\t}\r\n\t\t\r\n\t\tLogger.debug(\"finished\");\r\n\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tscanner = new Scanner(new File(\"digit_data/test.csv\"));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n // Transforms the values on the csv from strings to ints\n\t\tnew drawnum().go();\n\t}", "public void readDrugs() {\n\t\tBufferedReader br;\n\t\tString s;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"drugs.txt\"));\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\tString[] fields = s.split(\", \");\n\n\t\t\t\tString name = fields[0];\n\t\t\t\tString chemName = fields[1];\n\t\t\t\tString ingredients = fields[2];\n\t\t\t\tString manufComp = fields[3]; // manufacturing company\n\t\t\t\tString type = fields[4];\n\t\t\t\tString conditions = fields[5];\n\t\t\t\tString contra = fields[6]; // contraindications\n\t\t\t\tDrugs drug = new Drugs(name, chemName, ingredients, manufComp, type, conditions, contra);\n\t\t\t\tdrugs.add(drug);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "public List<String[]> readCSV() {\n\t\tCSVReader reader;\n\t\tList<String[]> myEntries = new ArrayList<String[]>();\n\t\ttry {\n\t\t\treader = new CSVReader(new FileReader(getCSVFolder() + File.separator + getFileName() + \".csv\"));\n\t\t\tmyEntries = reader.readAll();\n\t\t\treader.close();\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn myEntries;\n\t}", "public void getAllCompanyInfo() throws FileNotFoundException, IOException\r\n {\r\n \r\n String tickerFileLoc = \"companylist.csv\";\r\n CSVReader nameReader = new CSVReader(new FileReader(tickerFileLoc));\r\n \r\n String[] nextLine;\r\n String tempFileLoc;\r\n int x = 0;\r\n \r\n while ((nextLine = nameReader.readNext()) != null)\r\n {\r\n HashMap<String, SingleDayQuote> oneDay = new HashMap<>();\r\n if (x == 0){x++;continue;} //skips CSV category header\r\n if (x > 6){break;} //temporary, to prevent downloading more than 6 companys info\r\n \r\n String tempTicker = nextLine[0];\r\n tempFileLoc = \"StockFiles\\\\\" + tempTicker + \".csv\";\r\n \r\n //downloadFile(tempTicker);\r\n \r\n Company tempCompany = new Company(tempTicker, pullInfo(tempFileLoc));\r\n allCompanys.put(tempTicker, tempCompany);\r\n \r\n \r\n x++;\r\n }\r\n \r\n }", "@Override\n DBO consume(String csv) throws TransformerException;", "public void fillBoardFromCSV(String pathToCSV){\r\n \r\n BufferedReader br = null;\r\n String line = \" \";\r\n int index = 0;\r\n \r\n \r\n try{\r\n br = new BufferedReader(new FileReader(pathToCSV));\r\n while ((line = br.readLine()) != null) {\r\n String[] lines = line.split(\",\");\r\n System.out.println(lines.length);\r\n for(int i = 0; i < 11; i++){\r\n if(lines[i].equals(\"f\")){\r\n board[index][i] = new Flat(index,i);\r\n }\r\n if(lines[i].equals(\"s\")){\r\n board[index][i] = new Slot(index,i);\r\n }\r\n }\r\n index++; \r\n }\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n if (br != null) {\r\n try {\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n \r\n \r\n }", "public static List<String> extractData_CSV(String csvFile, String rowID) throws Exception {\n List<String> rows = new ArrayList<>();\n\n BufferedReader reader = new BufferedReader(new FileReader(csvFile));\n String line = \"\";\n\n while ( (line = reader.readLine()) != null) {\n if (line.startsWith(rowID)){\n rows.add(line);\n }\n }\n reader.close();\n return rows;\n }", "public ArrayList<Instance> read() throws IOException{\n ArrayList<Instance> instances;\n instances = new ArrayList<>();\n String s;\n String[] c;\n Instance i;\n while(reader.ready()){\n s = getInstanceFromFile();\n i = new Instance();\n c = s.split(\",\");\n for(int j = 0; j < c.length - 1; j++)\n i.addFeature(Double.parseDouble(c[j]));\n // The last part of a line is the class label\n // See dataset that is used\n i.setClassification(c[c.length - 1]);\n instances.add(i);\n }\n return instances;\n }", "public void readInEvents() {\n // read CSV file for events\n allEvents = new ArrayList<Event>();\n InputStream inputStream = getResources().openRawResource(R.raw.events);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] eventData = (String[]) scoreList.get(i);\n\n // group together description\n String description = getDescription(8, eventData);\n\n // inputs to Event constructor:\n // String name, String date, String startTime, String endTime, String location,\n // int photoID, String organizations, String categories, String description\n\n // get image ID according to its name\n int photoID = context.getResources().getIdentifier(eventData[5], \"drawable\", context.getPackageName());\n allEvents.add(new Event(eventData[0], eventData[1], eventData[2], eventData[3], eventData[4],\n photoID, eventData[6], eventData[7], description));\n\n\n //System.out.println(\"ADD Event: \" + eventData[0]);\n }\n\n }", "public static List<Person> loadTrainingSet(){\n List<Person> list_of_persons = new LinkedList<Person>();\n String[] names = getAllNames();\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n for(int i=0; i<names.length; i++){\n List<Histogram> histograms = new ArrayList<>();\n String query = \"SELECT h_json FROM \"+DATABASE_NAME+\".\"+names[i]+\";\";\n \n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n\n while (rs.next()) {\n Map<Integer, Integer> map = new HashMap<>();\n JSONObject obje = new JSONObject(rs.getString(1));\n for(int y=0; y<255; y++){\n map.put(y, (int)obje.get(\"\"+y));\n }\n histograms.add(new Histogram(map));\n }\n\n list_of_persons.add(new Person(names[i], histograms));\n }\n con.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return list_of_persons;\n }", "public static ArrayList<Director> getDirectors() {\n File file = new File(\"./data/names.csv\");\n Scanner scan;\n try {\n scan = new Scanner(file);\n\n } catch (IOException e) {\n throw new Error(\"Could not open names file\");\n }\n scan.nextLine();\n\n // Read File to get Directors\n ArrayList<Director> directors = new ArrayList<Director>();\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n String[] ratingParts = line.split(\"\\t\");\n\n if (isDirector(ratingParts[ratingParts.length - 1])) {\n Director director = new Director(ratingParts[2], ratingParts[1]);\n directors.add(director);\n }\n }\n\n // Close Scanner\n scan.close();\n\n // Return Directors\n return directors;\n }" ]
[ "0.6516986", "0.6439006", "0.63742757", "0.6210861", "0.60985214", "0.59988886", "0.59413284", "0.5940211", "0.5878879", "0.58661294", "0.5844267", "0.58371216", "0.583465", "0.5831855", "0.5820985", "0.57553834", "0.57498527", "0.5715513", "0.56867146", "0.56597614", "0.5634791", "0.56321955", "0.562071", "0.56199056", "0.56196433", "0.5615572", "0.5615431", "0.55990297", "0.55926806", "0.55747116", "0.5567675", "0.5558671", "0.5548056", "0.5545536", "0.5538596", "0.55290264", "0.5526508", "0.5524919", "0.55095106", "0.55065614", "0.55025005", "0.54995954", "0.54977965", "0.547886", "0.5478765", "0.5477811", "0.5460838", "0.5440241", "0.542519", "0.5422424", "0.54168886", "0.54102427", "0.54029465", "0.53956205", "0.53875494", "0.5384554", "0.5371292", "0.5366254", "0.5352428", "0.5337678", "0.5336022", "0.53322476", "0.53211933", "0.5298542", "0.5283686", "0.5274389", "0.5267985", "0.5265261", "0.52650493", "0.52625704", "0.52585196", "0.5253567", "0.5250294", "0.5248405", "0.5245873", "0.52444625", "0.52287644", "0.52257925", "0.5221759", "0.5216998", "0.52032244", "0.51983833", "0.5197912", "0.519028", "0.5188941", "0.51879233", "0.51698613", "0.5168688", "0.5144247", "0.51426387", "0.5139619", "0.5132277", "0.51279706", "0.51207894", "0.51180303", "0.51113504", "0.51067996", "0.5104803", "0.51039094", "0.50987726" ]
0.56578565
20
Printing collection of animals to the console, sorted alphabetically
public void printAlphabetically() { if (getAnimals().size() > 0) { System.out.println("======== Animals sorted alphabetically ========"); getAnimals().stream() .sorted(Comparator.comparing(Animal::getName)).collect(Collectors.toList()) .forEach(animal -> System.out.println(printDetails(animal))); System.out.println("================================== =-_-= ======"); } else { System.out.println("Nothing to print"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String printAlbumsAlphabetical() throws IOException\r\n {\r\n\t// Sort the albums alphabetically. Iterate over the list and\r\n\t// print details of each album\r\n\tCollections.sort(albumCollection);\r\n\r\n\t// Print each of the sorted albums\r\n\tString outputString = \"Printing Albums ordered by artist and title:\\r\\n\";\r\n\tSystem.out.println(outputString);\r\n\r\n\tfor (Album album : albumCollection)\r\n\t{\r\n\t System.out.println(album);\r\n\t}\r\n\treturn outputString;\r\n }", "public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}", "public void printName()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar);//sort by names\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(i+\". \"+it.next().getName());\n\t\t\ti++;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }", "public static void main(String[] args) {\n Animal x=new Animal(\"X\",7);\n Animal hund=new Animal(\"R\",7);\n Animal katze=new Animal(\"D\",2);\n Animal b=new Animal(\"B\",7);\n Animal kuh=new Animal(\"A\",7);\n\n SortedLinkedList<Animal>list=new SortedLinkedList<Animal>();\n list.insert(x);\n list.insert(b);\n list.insert(hund);\n list.insert(katze);\n list.insert(kuh);\n\n list.printList();\n }", "public void printAlbumsAlphabetical(BufferedWriter bw) throws IOException\r\n {\r\n\tString outputString = printAlbumsAlphabetical();\r\n\t// Write output to bufferedWriter\r\n\tbw.write(outputString);\r\n\tfor (Album album : albumCollection)\r\n\t{\r\n\t // Write output to bufferedWriter\r\n\t bw.write(album.toString());\r\n\t bw.newLine();\r\n\t}\r\n }", "private void print() {\n\t\tList<Entry<String, Double>> entries = sort();\n\t\tfor (Entry<String, Double> entry: entries) {\n\t\t\tSystem.out.println(entry);\n\t\t}\n\t}", "public void sortByBreed() {\n\t\tAnimalCompare animalCompare = new AnimalCompare();\n\t\tCollections.sort(animals, animalCompare);\n\t}", "private static void printSortActorMenu() {\n\t\tprintln(\"Actor Sorting Options:\");\n\t\tprintln(\"\\tAA: Alphabetically Ascending\");\n\t\tprintln(\"\\tAD: Alphabetically Descending\");\n\t\tprintln(\"\\tNA: By Number of Movies They Are In Ascending\");\n\t\tprintln(\"\\tND: By Number of Movies They Are In\");\n\t}", "public void listSortedByName(ArrayList<Pet> petList){\n System.out.println(\"Pets sorted by Name: \");\n for (Pet each: mySort.sortByName(petList)){\n System.out.println(each.getName());\n }\n System.out.println();\n }", "public static void main(String[] args) {\n ArrayList<String> movieArray = new ArrayList<String>();\n Scanner sc = new Scanner(System.in);\n // randomly choose a word from actionItems\n Random rnd = new Random();\n String movie = \"\";\n\n while (true) {\n System.out.println(\"Enter another movie.\");\n movie = sc.nextLine();\n movieArray.add(movie);\n\n System.out.println(\"Press (q) to quit or any other key to continue\");\n String cont = sc.nextLine();\n if (cont.equalsIgnoreCase(\"q\")) {\n break;\n }\n }\n System.out.println(\"Final Movie List: \" + movieArray);\n\n // Option 1: Print out in sorted order\n //movieArray.sort(? super String);\n /* Sort statement*/\n Collections.sort(movieArray);\n System.out.println(\"Final Sorted Movie List: \" + movieArray);\n\n int randomInt = rnd.nextInt(movieArray.size());\n System.out.println(\"You might want to watch: \" + movieArray.get(randomInt));\n }", "public void displayByAlbums()\n {\n Collections.sort(catalog);\n \n System.out.printf(\"%-39s %-30s %s %n\",\"ALBUM\", \"ARTIST\", \"TRACKS\"); \n for(Album a : catalog)\n System.out.println(a.toString(true)); //since true, albums are first. \n \n for(int i=0; i<30; i++)\n System.out.print(\"*\"); //line of asterisks\n System.out.print(\"\\n\\n\");\n }", "public void sortBySize() {\n\t\tCollections.sort(animals);\n\t}", "public void printDogs(){\n System.out.println(\"Here are the dogs in the shelter:\");\n for(Dog d : dogs){\n d.printInfo();\n }\n }", "public static void main(String[] args) {\n\t\tString[] array = {\"test\", \"miuton\", \"fact\"};\r\n\t\tArrays.sort(array, new AnagramComparator());\r\n\t\tfor(int i = 0; i < array.length; i ++){\r\n\t\t\tSystem.out.println(array[i] + \" \");\r\n\t\t}\r\n\t}", "private void sortClients()\n {\n System.out.println(\"clients items (alphabetically):\");\n Set<Client> clients = ctrl.sortClientsAlphabetically();\n clients.stream().forEach(System.out::println);\n }", "private void printList(ArrayList<String> allSongs) {\n int i=1;\n for(String s : allSongs){\n System.out.println((i++)+\". \"+s);\n }\n }", "public void printOrder() {\n int count = 0;\n for(Jumper skier : jumpers) {\n count += 1;\n System.out.println(\" \" + count + \". \" + skier); \n }\n System.out.println(\"\"); \n }", "private static void printSortMovieMenu() {\n\t\tprintln(\"Movie Sorting Options:\");\n\t\tprintln(\"\\tTA: Title Ascending (A-Z)\");\n\t\tprintln(\"\\tTD: Title Descending (Z-A)\");\n\t\tprintln(\"\\tYA: Year Ascending\");\n\t\tprintln(\"\\tYD: Year Descending\");\n\t}", "public static void main(String[] args) {\n\n Person person1 = new Person(\"Tom Brady\");\n Person person2 = new Person(\"David Letterman\");\n\n List<Person> personList = new ArrayList<Person>();\n personList.add(person1);\n personList.add(person2);\n\n // Sorting\n // Collections.sort(personList, new PersonComparer());\n // Collections.sort(personList, (o1, o2) -> o1.getName().compareTo(o2.getName()));\n personList.sort((o1, o2) -> o1.getName().compareTo(o2.getName()));\n\n // Print out the people!\n for (Person p : personList)\n {\n System.out.println(p.getName());\n }\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tActor actor1 = new Actor(\"Mischa\", \"Barton\");\n Actor actor2 = new Actor(\"Christian\", \"Bale\");\n Actor actor3 = new Actor(\"Joan\", \"Collins\");\n Actor actor4 = new Actor(\"Gemma\", \"Arterton\");\n Actor actor5 = new Actor(\"Daniel\", \"Craig\");\n \n List<Actor> actors=new ArrayList<Actor>();\n \n actors.add(actor1);\n actors.add(actor2);\n actors.add(actor3);\n actors.add(actor4);\n actors.add(actor5);\n \n Collections.sort(actors);\n \n for(Actor actor:actors){\n \tSystem.out.println(actor.getFirstName()+\" \"+actor.getLastName());\n }\n\t}", "public static void main(String[] args) {\n\r\n\t\tAlunoTreinar alunoTreinar = new AlunoTreinar();\r\n\t\t\r\n\t\talunoTreinar.setNome(\"Teste\");\r\n\t\talunoTreinar.setCpf(123);\r\n\t\talunoTreinar.setNome(\"Albert\");\r\n\t\talunoTreinar.setCpf(321)\r\n\t\t\r\n\t\tList<String> lista = new ArrayList<>();\r\n\t\tlista.add(alunoTreinar.toString());\r\n\t\t\r\n\t\tSystem.out.print(lista.get(0));\r\n\t\t\r\n\t\tCollections.sort(lista);\r\n\t\t\r\n\t\tfor (alunoTreinar AlunoTreinar : lista) {\r\n\t\t\t\t\t\t\r\n\t\t\tSystem.out.print(lista);\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tLinkedList list=new LinkedList();\n\t\tlist.insert(10);\n\t\tlist.insert(5);\n\t\tlist.insert(15);\n\t\tlist.insert(100);\n\t\tlist.insert(500);\n\t\tlist.insert(200);\n\t\tlist.show();\n\t\tlist.sort();\n\t\tSystem.out.println();\n\t\tlist.show();\n\t}", "static void AddAndDisplay()\n\t{\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toSet = new TreeSet<String>();\n\t\t\toSet.add(\"Apple\");\n\t\t\toSet.add(\"Boy\");\n\t\t\toSet.add(\"Cat\");\n\t\t\toSet.add(\"Apple\");\n\t\t\tSystem.out.println(oSet);\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tfor(String s:oSet)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"for each loop: \"+s);\n\t\t\t}\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tIterator<String> it = oSet.iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Iterator: \"+it.next());\n\t\t\t}\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tSpliterator<String> sp = oSet.spliterator();\n\t\t\tsp.forEachRemaining(System.out::println);\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\toSet.forEach((k)->System.out.println(\"for each method: \"+k));\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "public void printAll() {\n // Sort them by parent for ease of analysis\n // copy it so that we don't mess with the actual pop\n ArrayList<Bacteria> temp = (ArrayList<Bacteria>) inds.clone();\n Collections.sort(temp, new Comparator<Bacteria>() {\n @Override\n public int compare(Bacteria o1, Bacteria o2) {\n if (o1.getParentID() > o2.getParentID()) return 1;\n else if (o1.getParentID() == o2.getParentID()) return 0;\n else return -1;\n }\n });\n\t\tSystem.out.println(\"Bacteria population:\");\n for (int i=0; i < getPopSize(); i++) {\n temp.get(i).print();\n }\n System.out.println();\n\t}", "public static void main(String[] args) {\n\t\tList<String> alist = new ArrayList<>();\n\t\talist.add(\"Virat\");\n\t\talist.add(\"ganesh\");\n\t\talist.add(\"Amol\");\n\t\talist.add(\"Ritesh\");\n\t\talist.add(\"deva\");\n\t\talist.add(\"sachin\");\n\t\talist.add(\"Xavier\");\n\t\t\n\t\tSystem.out.println(\"Arraylist before sorting: \");\n\t\tSystem.out.println(alist);\n\t\t\n\t\t//Collections.sort(alist);\n\t\tCollections.sort(alist,String.CASE_INSENSITIVE_ORDER);\n\t\t\n\t\tSystem.out.println(\"Arraylist after sorting: \");\n\t\tSystem.out.println(alist);\n\t\t\n\t\t\t\t\n\n\t}", "public void print(){\n for(Recipe r : recipes){\n System.out.println(r.toString());\n }\n }", "public static void main(String[] args) {\n String[] strs = new String[]{\"eat\",\"tea\",\"tan\",\"ate\",\"nat\",\"bat\"};\n for(List<String> list : groupAnagrams(strs)) {\n System.out.print(\"[\");\n for (String s : list)\n System.out.print(s + \", \");\n System.out.println(\"]\");\n }\n }", "public void printInOrder() {\n\t\tCollections.sort(students);\n\t\tSystem.out.println(\"Student Score List\");\n\t\tfor(Student student : students) {\n\t\t\tSystem.out.println(student);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void main (String args []) throws Exception {\n\n\n ArrayList<Person> people = new ArrayList<Person>();\n Person youngestPerson = getYoungestPerson(people);\n Person oldestPerson = getOldestPerson(people);\n ArrayList<Person> sortedByAgeList = getSortedListByAge(people);\n ArrayList<Person> sortedByNameList = getSortedListByName(people, false);\n\n\n /*\n For the below to work where you can see what you've done, you must have\n done the section 1 recap portion where you override the toString() method of the\n Person class!\n */\n\n for(Person p : sortedByAgeList) {\n System.out.println(p);\n }\n\n for(Person p : sortedByNameList) {\n System.out.println(p);\n }\n }", "public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n animals = new Animal[3];\n animals[0] = new PolarBear();\n animals[1] = new Elephant();\n animals[2] = new PolarBear();\n\n for (Animal animal: animals) {\n System.out.println(\"You see a \" + animal.toString()\n + \" that \" + animal.showOff());\n }\n }", "public static void main(String[] args) {\n\r\n\t\tList<Library> list=new ArrayList<Library>();\r\n\t\tlist.add(new Library(100, \"bhagyesh\"));\r\n\t\tlist.add(new Library(4, \"patel\"));\r\n\t\tlist.add(new Library(5, \"sid\"));\r\n\t\tlist.add(new Library(78, \"naitik\"));\r\n\t\tlist.add(new Library(39, \"amit\"));\r\n\t\t\r\n \tlist.stream().forEach(p -> System.out.println(p.getName()));\r\n \tlist.sort(Comparator.comparing(Library::getName));\r\n \tlist.stream().forEach(p -> System.out.println(p.getName()));\r\n \r\n \t\r\n \t\r\n \t\r\n\t}", "public static void main(String[] args) {\n\t\tGoods g1 = new Goods(\"s00001\",\"手机\",2000);\n\t\tGoods g2 = new Goods(\"s00002\",\"冰箱\",5000);\n\t\tGoods g3 = new Goods(\"s00003\",\"热水器\",6000);\n\t\tList<Goods> goodsList = new ArrayList<Goods>();\n\t\tgoodsList.add(g1);\n\t\tgoodsList.add(g2);\n\t\tgoodsList.add(g3);\n\t\t\n\t\tfor(Goods goods:goodsList) {\n\t\t\tSystem.out.println(goods+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tCollections.sort(goodsList);\n\t\tfor(Goods goods:goodsList) {\n\t\t\tSystem.out.println(goods+\" \");\n\t\t}\n\t}", "public void listSortedByType(ArrayList<Pet> petList){\n System.out.println(\"Pets sorted by Type: \");\n for (Pet each: mySort.sortByType(petList)){\n System.out.println(each.getName() + \" is a \" + each.getType());\n }\n System.out.println();\n }", "public void printSpayedOrNeutered(){\n System.out.println(\"Spayed or Neutered Dogs:\");\n ArrayList<Dog> dogsSpayedOrNeutered = dogsSpayedOrNeutered();\n for(Dog d : dogsSpayedOrNeutered){\n d.printInfo();\n }\n }", "public static void main(String[] args) {\r\n Tile[] arr = new Tile[] {new Tile(\"2p\"), new Tile(\"6p\"), new Tile(\"9p\"), new Tile(\"5m\"), new Tile(\"1d\"), new Tile(\"2w\"), new Tile(\"5s\")};\r\n Arrays.sort(arr);\r\n for (Tile i : arr) {\r\n System.out.print(i);\r\n System.out.print(\", \");\r\n }System.out.println();\r\n \r\n Tile[] tileSet = Wall.riichiTileSet();\r\n for (Tile i : tileSet) {\r\n System.out.print(i);\r\n System.out.print(\", \");\r\n }System.out.println();\r\n \r\n }", "public void displayByArtists()\n {\n Collections.sort(catalog, new ArtistComparator());\n \n System.out.printf(\"%-30s %-39s %s %n\",\"ARTIST\", \"ALBUM\", \"TRACKS\"); \n for(Album a : catalog)\n System.out.println(a.toString(false)); //prints the artist first.\n \n for(int i=1; i<30; i++)\n System.out.print(\"*\");\n System.out.print(\"\\n\\n\");\n }", "String showAllPublicationsSorted() {\n\n PrintModelVisitor printVisitor = new PrintModelVisitor();\n visitPublications(sortPublicationsAfterTitle(mBooks), printVisitor);\n visitPublications(sortPublicationsAfterTitle(mMagazines), printVisitor);\n\n return printVisitor.getPublications();\n }", "public void printAllRecipeNames() {\r\n for (Recipe currentRecipe : listOfRecipes) {\r\n System.out.println(currentRecipe.getRecipeName());\r\n }\r\n }", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public void printDogsOfSize(String size){\n System.out.println(\"Here are the \" + size + \" dogs in the shelter:\");\n ArrayList<Dog> smallDogs = dogsOfSize(size);\n for(Dog d : smallDogs){d.printInfo();}\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tArrayList<Student2> studs = new ArrayList<>();\r\n\t\tstuds.add(new Student2(6,\"neena\"));\r\n\t\tstuds.add(new Student2(1,\"nimmy\"));\r\n\t\tstuds.add(new Student2(4,\"cookie\"));\r\n\t\t\r\n\t\tCollections.sort(studs);\r\n\t\t\r\n\t\tfor(Student2 s : studs) {\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic String print() {\n\r\n\t\tfor (int i = 0; i < 26; i++) {\r\n\t\t\tfor (Entry k : array[i]) {\r\n\t\t\t\tSystem.out.println(k.name + \"\\t\" + k.initials + \"\\t\" + k.extension + \"\\n\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n\n\t\tMovie[] hitMovies = new Movie[5];\n\t\thitMovies[0] = new Movie(\"명량\", 2014);\n\t\thitMovies[1] = new Movie(\"극한직업\", 2019);\n\t\thitMovies[2] = new Movie(\"신과함께\", 2017);\n\t\thitMovies[3] = new Movie(\"국제시장\", 2014);\n\t\thitMovies[4] = new Movie(\"베테랑\", 2015);\n\n\t\t// 이름\n\t\tInsertion.sort(hitMovies);\n\t\tfor (Movie e : hitMovies) {\n\t\t\tSystem.out.println(e);\n\t}\n\n\t\t// 연도\n\t\tInsertion.sort(hitMovies, new Movie.YearOrder());\n\t\tfor (Movie e : hitMovies) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\t// 연도 - > 이름\n\t\tInsertion.sort(hitMovies, new Movie.YearNameOrder());\n\t\tfor (Movie e : hitMovies) {\n\t\tSystem.out.println(e);\n\t\t}\n\n\t}", "public void print()\n\t{\n\t\tminGenes = Integer.MAX_VALUE;\n\t\tmaxGenes = 0;\n\t\tcreatureGenesQty = 0;\n\t\tfor (Creature creature : creatures)\n\t\t{\n\t\t\tminGenes = (minGenes > creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : minGenes;\n\t\t\tmaxGenes = (maxGenes < creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : maxGenes;\n\t\t\tcreatureGenesQty += creature.getGenotype().size();\n\t\t\t//creature.print();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t}\n\t\tavgGenes = creatureGenesQty / ((float) size());\n\n\t\t// add some statistics\n\t\tSystem.out.println(\"Population size: \" + size());\n\t\tSystem.out.println(\"Minimum number of genes: \" + minGenes);\n\t\tSystem.out.println(\"Average number of genes: \" + avgGenes);\n\t\tSystem.out.println(\"Maximum number of genes: \" + maxGenes);\n\t\tCreatureLog.info(String.valueOf(size()) + \"\\t\" + avgGenes + \"\\t\" + minGenes + \"\\t\" +maxGenes);\n\n\t}", "public static void main(String[] args)\n {\n String[] A = {\"Ken\", \"Pam\", \"Meg\", \"Jan\", \"Ned\",\n \"Peg\", \"Deb\", \"Jim\", \"Amy\", \"Tom\"};\n \n // print, sort, then print again\n printArray(A);\n sort(A);\n printArray(A); \n }", "public static void main(String[] args) \r\n {\n ArrayList<String> al = new ArrayList<String>(); \r\n al.add(\"Geeks For Geeks\"); \r\n al.add(\"Friends\"); \r\n al.add(\"Dear\"); \r\n al.add(\"Is\"); \r\n al.add(\"Superb\"); \r\n \r\n /* Collections.sort method is sorting the \r\n elements of ArrayList in ascending order. */\r\n Collections.sort(al); \r\n \r\n // Let us print the sorted list \r\n System.out.println(\"List after the use of\"\r\n + \" Collection.sort() :\\n\" + al); \r\n }", "public static void main(String[] args) {\n List<String> list = new ArrayList<String>();\n list.add(\"sss\");\n list.add(\"uuu\");\n list.add(\"ccc\");\n // Collections.sort(list);\n System.out.println(list);\n }", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "public static void main(String[] args) {\n\t\tString abd = \"The lines are here to sort.\";\n\t\tabd = abd.toLowerCase();\n\t\tabd = abd.substring(0, abd.length()-1);\n\t\tString[] abdArr = abd.split(\" \");\n\t\tList<String> list = Arrays.asList(abdArr);\n\t\tCollections.sort(list, new compare());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tString fir = list.get(0);\n\t\t//list.remove(0);\n\t\tsb.append(fir.substring(0, 1).toUpperCase() + fir.substring(1) + \" \");\n\t\tfor(int i=1; i< list.size(); i++){\n\t\t\tsb.append(list.get(i) + \" \" );\n\t\t}\n\t\tString result = sb.toString();\n\t\tresult = result.substring(0, result.length()-1);\n\t\tresult = result+ \".\";\n\t\tSystem.out.println(result);\n\t\t\n\t}", "public static void main(String[] args) {\n String[] orgs={\"birlasoft\",\"ZOHO\",\"Cognizant\",\"infosys\",\"amazon\"};\n Selection.sort(orgs);\n for(String yet:orgs)\n {\n \t System.out.println(yet);\n }\n \t\t \n \n\t}", "public static void main(String[] args) {\n\t\tEmployee e=new Employee(104, \"vik\");\r\n\t\tEmployee e1=new Employee(105, \"wik\");\r\n\t\tEmployee e2=new Employee(101, \"xik\");\r\n\t\tEmployee e3=new Employee(102, \"yik\");\r\n\t\tEmployee e4=new Employee(103, \"zik\");\r\n\t\tArrayList<Employee>al=new ArrayList<>();\r\n\t\tal.add(e);\r\n\t\tal.add(e1);\r\n\t\tal.add(e2);\r\n\t\tal.add(e3);\r\n\t\tal.add(e4);\r\n\tSystem.out.println(al);\r\n\tCollections.sort(al);// ArrayList is not ascending order so in order to do sorting we need to use .sort {its default in TreeSet so in TreeSet we don't write .sort method to sort}\r\n\tfor(Employee em:al)\r\n\t{\r\n\t\tSystem.out.println(em.getEno()+\" \"+em.getEname());\r\n\t}\r\n\t}", "public String sortBy();", "public static void main(String[] args){\n\t\tArrayList<Pets> petList = new ArrayList<Pets>();\n\t\tpetList.add(new Pets(\"Dog\", \"Ace\", 5)); // initializes objects with properties: species=\"Dog\",name=\"Ace\", and ID=5.\n\t\tpetList.add(new Pets(\"Cat\", \"Betty\", 8));\n\t\tpetList.add(new Pets(\"Snake\", \"Creepy\", 4));\n\t\tpetList.add(new Pets(\"Bird\", \"Diana\", 6));\n\t\tpetList.add(new Pets(\"Ant\", \"Elaine\", 1));\n\t\t\n\t\t// sort the list by the desired attribute, in this case by ID.\n\t\tArrayList<Pets> sortedPets = sortArrayList(petList);\n\t\t\n\t\t// prints list of pets\n\t\tfor (int j = 0; j < petList.size(); j++) {\n\t\t\tSystem.out.println(sortedPets.get(j));\n\t\t}\n\t\t\n\t\t// prints out results using the iterative binary search.\n\t\tSystem.out.println();\n\t\tfor (int i = 1; i<=8; i++){\n\t\t\tSystem.out.println(\"The pet with id:\"+i+\" is at index \"+iterativeBinarySearch(sortedPets,i));\n\t\t}\n\n\t\t// prints out results using the recursive binary search.\n\t\tSystem.out.println();\n\t\tfor (int i = 1; i<=8; i++){\n\t\t\tSystem.out.println(\"The pet with id:\"+i+\" is at index \"+ recursiveBinarySearch(sortedPets,i, 0, sortedPets.size()-1));\n\t\t}\n\t\n\t}", "public void printAsc(Item<K,V> i){\n if (i==null) {\n return;\n } \n printAsc(i.getL());\n System.out.println(i);\n printAsc(i.getR());\n }", "public String sort() {\n this.foodEntries = FoodListManager.sortListByDate(foodEntries);\n return this.toString();\n }", "public void printGodList(List<God> gods){\n int counter = 1;\n for(God god : gods){\n System.out.println(counter+\") \"+god.toString());\n counter++;\n }\n }", "private void displayStudentByGrade() {\n\n studentDatabase.sortArrayList();\n\n for (Student student : studentDatabase) {\n\n stdOut.println(student.toStringsort() + \"\\n\");\n }\n }", "private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tList<Card> listOfCards = new ArrayList<Card>();\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.DIAMOND, SuitValue.ACE));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.CLUB, SuitValue.FIVE));\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.HEART, SuitValue.FOUR));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.SPADE, SuitValue.THREE));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.CLUB, SuitValue.TWO));\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.DIAMOND, SuitValue.JACK));\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.ColorComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.TypeComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.ValueComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.CardComparator);\n\t\tSystem.out.println(listOfCards);\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void printDistance()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar, new DistanceCompare());//sort by distance\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tRobot r=it.next();\n\t\t\tSystem.out.println(i+\". \"+r.getName()+\" distance \"+r.getDistance());\n\t\t\ti++;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tTreeSet<String> color = new TreeSet<>();\n\n\t\tcolor.add(\"Azul\");\n\t\tcolor.add(\"Rojo\");\n\t\tcolor.add(\"yellow\");\n\t\tcolor.add(\"Burdeos\");\n\t\tcolor.add(\"Verde\");\n\t\tcolor.add(\"Violeta\");\n\t\tcolor.add(\"Amarillo\");\n\t\tcolor.add(\"Marrón\");\n\t\tSystem.out.println(color);\n\t\t\n\t\tIterator it = color.descendingIterator();\n\t\t\n\t\twhile(it.hasNext()) {\n\t\t\tSystem.out.print(it.next()+\", \");\n\t\t}\n\t\t\n\t}", "public void displayCategories() {\n System.out.println(\"Categories:\");\n for(int i = 0; i < categories.size(); i++)\n System.out.println((i + 1) + \". \" + categories.get(i).getName());\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint a[]= {-1,4,2,6,8,1};\n\t\t\n\t\tArrays.sort(a);\n\t\t\n\t\tfor(int num:a)\n\t\t\tSystem.out.print(num+\" \");\n\t\t\n\t\t\n\t\tList<String> l=new ArrayList<>();\n\t\t\n\t\tl.add(\"nikhil\");\n\t\tl.add(\"ajay\");\n\t\tl.add(\"vijay\");\n\t\tl.add(\"pushpa\");\n\t\t\n\t\t\n\t\tCollections.sort(l);\n\t\t\n\t\tSystem.out.print(l);\n\n\t}", "public static void main(String[] args) {\n\t\tStud1 s1=new Stud1(1,\"Yogi\");\r\n\t\tStud1 s2=new Stud1(4,\"Rushi\");\r\n\t\tStud1 s3=new Stud1(2,\"Praje\");\r\n\t\tStud1 s4=new Stud1(3,\"Amre\");\r\n\t\t\r\n\t\tList l=new ArrayList();\r\n\t\tl.add(s1);\r\n\t\tl.add(s2);\r\n\t\tl.add(s3);\r\n\t\tl.add(s4);\r\n\t\t\r\n\t\tSystem.out.println(l);\r\n\t\t\r\n\t\tCollections.sort(l);\r\n\t\t\r\n\t\tEnumeration e=Collections.enumeration(l);\r\n\t\t\r\n\t\twhile(e.hasMoreElements())\r\n\t\t{\r\n\t\t\tObject o=e.nextElement();\r\n\t\t\tSystem.out.println(o);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tSet<Bag> bags = new TreeSet<Bag>();\n\t\tBag bag1=new Bag(\"LV\",15000.0);\n\t\tBag bag2=new Bag(\"hermas\",100000.0);\n\t\tBag bag3=new Bag(\"chanel\",30000.0);\n\t\tBag bag4=new Bag(\"coach\",3000.0);\n\t\tBag bag5=new Bag(\"MK\",2000.0);\n\t\tbags.add(bag1);\n\t\tbags.add(bag2);\n\t\tbags.add(bag3);\n\t\tbags.add(bag4);\n\t\tbags.add(bag5);\n\t\tfor(Bag bag:bags){//foreach循环\n\t\t\tSystem.out.println(bag);\n\t\t}\n \t}", "private static void displayBag(BagInterface<String> aBag)\n {\n System.out.println(\"The bag contains the following string(s):\");\n Object[] bagArray = aBag.toArray();\n for (int index = 0; index < bagArray.length; index++)\n {\n System.out.print(bagArray[index] + \" \");\n } // end for\n\n System.out.println();\n }", "public static void main(String args[]) {\n\t\tTreeSet<Car> treeset = new TreeSet<>();\r\n\r\n\t\ttreeset.add(new Car(\"Diablo\", 600000, 1998, \"Chrevolet\"));\r\n\t\ttreeset.add(new Car(\"Focus\", 300000, 1990, \"Fords\"));\r\n\t\ttreeset.add(new Car(\"Indica\", 200000, 1890, \"Tata\"));\r\n\r\n\t\t//Lambda expression for printing value\r\n\t\ttreeset.stream().forEach((name) -> System.out.println(name));\r\n\r\n\t}", "public static void main(String[] args) {\n\n char[] animal = {'k', 'u', 't', 'y', 'a'};\n Arrays.stream(new String(animal).split(\" \")).forEach(System.out::print);\n\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "@Override\r\n\tpublic int compare(Animals a1, Animals a2) {\n\t\treturn a1.name.compareTo(a2.name);\r\n\t}", "public void sortStringArray() {\n\t\tSystem.out.println(\"PROPERY BELONGS TO ONLY CHILD CLASS!!\");\n\t}", "public void printTheCatalog() {\n System.out.println(\"choose an option:\\n1)print all sorting by title\");\n System.out.println(\"2)print all sorting by author\\n3)print all sorting by Subject\");\n int option1 = input.nextInt();\n if (option1 == 1) {\n Collections.sort(cards, Card.OrderByTitle);\n System.out.println(\"books ordered by title: \" + cards);\n } else if (option1 == 2) {\n Collections.sort(cards, Card.OrderByAuthor);\n System.out.println(\"books ordered by Author: \" + cards);\n } else if (option1 == 3) {\n Collections.sort(cards, Card.OrderBySubject);\n System.out.println(\"books ordered by Subject: \" + cards);\n }\n }", "public static void main(String[] args) {\n\t\tString[] a = StdIn.readAllStrings();\r\n\t\tsort(a);\r\n\t\tassert isSorted(a);\r\n\t\tshow(a);\r\n\t}", "public static void printFruits() {\r\n\t\tSystem.out.println(\"\\nFruits Available in our store: \\n\");\r\n\t\tSystem.out.format(\"%5s\\t%10s\\t%10s\\t%10s\\t%10s\\n\", \"Id\", \"Name\", \"Quality\", \"Price\", \"Best Before Use\");\r\n\t\tfor (Fruit fruit : fruits.values()) {\r\n\t\t\tSystem.out.format(\"%5s\\t%10s\\t%10s\\t%10s\\t%10s\\n\", fruit.getId(), fruit.getName(), fruit.getQuality(),\r\n\t\t\t\t\tfruit.getPrice(), fruit.getBestBeforeUse());\r\n\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public static void main(String[] args) {\n\t\tArrayList al=new ArrayList();\n\t\tal.add(\"Hello\");\n\t\tal.add(\"Hi\");\n\t\tal.add(\"India\");\n\t\tal.add(\"Japan\");\n\t\tal.add(\"Usa\");\n\t\tal.add(\"China\");\n/**************************Insertion order preserved********************************************************************/\n\t\tSystem.out.println(al);\n/*************************default natural sorting order*****************************************************************/\n\t\tCollections.sort(al);\n\t\tSystem.out.println(al);\n/***************************Customized sorting order********************************************************************/\n\t\tCollections.sort(al, new MyComparator1());\n\t\tSystem.out.println(al);\n\n\n\t}", "public String printSortedResult() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(printStartNumberAndName() + \"; \");\n\t\tsb.append(printInfo());\n\t\t\n\t\tsb.append(printTotalTime());\n\t\t\n\t\tsb.append(errorHandler.print());\n\t\t\n\t\treturn sb.toString();\n\t}", "@Override\n public void printDeque() {\n int index = moveForward(nextFirst, 1);\n for (int count = 1; count <= size; count++) {\n System.out.print(items[index] + \" \");\n index = moveForward(index, 1);\n }\n }", "public void print() {\n toLower();\n }", "private void sortAlphabet()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }", "public void displayNames()\r\n {\r\n // ensure there is at least one Cat in the collection\r\n if (catCollection.size() > 0) {\r\n System.out.println(\"The current guests in \"+businessName);\r\n for (Cat eachCat : catCollection) {\r\n System.out.println(eachCat.getName());\r\n }\r\n }\r\n else {\r\n System.out.println(businessName + \" is empty!\");\r\n }\r\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(AlphabetSoup(s.nextLine())); \n }", "public static void main(String[] args) {\n\t\tString[] a = StdIn.readAllStrings();\n\t\tSelection.sort(a);\n\t\tAbstractSortHelper.show(a);\n\t}", "public void showBowlingOrder()\n\t{\n\t\twhile(bowlers.size()!=0)\n\t\t{\n\t\t\tbowlers.get(0).setBall(bowlers.get(0).getBall()-1);\n\t\t\tSystem.out.println(bowlers.get(0).getName()+\" throw this ball and left with \"+bowlers.get(0).getBall());\n\t\t\tif(bowlers.get(0).getBall()==0)\n\t\t\t{\n\t\t\t\tbowlers.remove(0);\n\t\t\t}\n\t\t\tthis.shortSort();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n int arr[] = { 20, 12, 53, 1, 34, 7, 12}; \n\n for (int element: sortedList(arr)) {\n System.out.println(element);\n }\n }", "public void printResults() {\r\n System.out.printf(\"\\nHistory\\n\\n\");\r\n String format = \"%-25s %s from %s\\n\";\r\n Collections.sort(results);\r\n for(Data data : results) {\r\n System.out.printf(format, data.getName(),\r\n defaultFormatter.format(data.getDate()), data.getComputer());\r\n }\r\n }", "public void printList() {\n\t\t//sort alphabetically\n\t\tCollections.sort(listStr); \n\t\t//cast the array list to a linked list\n\t\tLinkedList<Object> linkedString = new LinkedList<Object>(listStr);\n \t//while there is something in the LinkedList, run following code\n \twhile (linkedString.size() > 0) {\n \t\t//print out the current first in \"queue\" word\n \t\tSystem.out.print(linkedString.get(0) + \" \");\n \t\t//remove the first item in the linked list\n \t \t\tlinkedString.removeFirst();\n \t}\n \t//print out a new blank line for better readability\n \tSystem.out.println(\"\\n\");\n\t}", "public void printAll(){\n\t\tSystem.out.println(\"Single hits: \" + sin);\n\t\tSystem.out.println(\"Double hits: \" + doub);\n\t\tSystem.out.println(\"Triple hits: \" + trip);\n\t\tSystem.out.println(\"Homerun: \" + home);\n\t\tSystem.out.println(\"Times at bat: \" + atbat);\n\t\tSystem.out.println(\"Total hits: \" + hits);\n\t\tSystem.out.println(\"Baseball average: \" + average);\n\t}", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "private static void show(Comparable[] a) {\n for (Comparable a1 : a)\n System.out.print(a1 + \" \");\n\n System.out.println();\n }", "public static void main(String[] args)\r\n\t{\n\t\tString[] names = new String[5];\r\n\t\tScanner s = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the names: \");\r\n\t\tfor (int i=0;i<((names.length/2)+1 );i++ )\r\n\t\t{\r\n\t\t\tnames[i] = s.next();\r\n\t\t}\r\n\t\tfor(int i=((names.length/2)+1 );i<names.length;i++) \r\n\t\t{\r\n\t\t\tnames[i]=s.next();\r\n\t }\r\n\t\tArrays.sort(names);\r\n\t\tfor (int i=0;i<names.length ;i++) \r\n\t\t{\r\n\t\t\t//Prints the names in sorted manner\r\n\t\t\tSystem.out.println(\"Name are \" + names[i]);\r\n\t\t}\r\n\t}", "public void print() {\n for (int i = 0; i < size; i++)\n System.out.print(elements[i] + \" \");\n System.out.println();\n }", "public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}", "public static void main(String[] args) {\n\t\tTreeSet<String> list = new TreeSet<>();\n\t\tlist.add(\"Hello\");\n\t\tlist.add(\"To\");\n\t\tlist.add(\"Java\");\n\t\tlist.add(\"Batch\");\n\t\tlist.add(\"Batch\");\n\t\tlist.add(\"7\");\n\t\tIterator<String> it = list.iterator();\n\t\twhile (it.hasNext()) \n\t\t{\n\t\t\t\n\t\t\tString element = it.next();\n\t\t\tSystem.out.println(element);\n\t\t}\n\t}", "@Override\n public String report() {\n\n StringBuilder print = new StringBuilder();\n player.getModels().stream().sorted((p, l) -> {\n int result = p.getClass().getSimpleName().compareTo(l.getClass().getSimpleName()); // Order them by type alphabetically,\n if (result == 0) {\n result = Integer.compare(l.getHealth(), p.getHealth());// then by health descending,\n if (result == 0) {\n result = p.getUsername().compareTo(l.getUsername());\n ;// then by username alphabetically.\n }\n }\n return result;\n })\n .forEach(pl -> print.append(pl).append(System.lineSeparator()));\n\n return print.toString().trim();\n }", "public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}" ]
[ "0.70695764", "0.6952907", "0.6703184", "0.6563534", "0.65458804", "0.6545719", "0.64614564", "0.6410575", "0.63738805", "0.6348364", "0.63089037", "0.6308038", "0.6249787", "0.6231804", "0.6228121", "0.62253696", "0.62147486", "0.6212601", "0.6155117", "0.615388", "0.61225367", "0.60874027", "0.6076197", "0.6027957", "0.5996394", "0.59895366", "0.59865624", "0.5947106", "0.5940496", "0.59282535", "0.5904903", "0.58902407", "0.58890986", "0.5880714", "0.5830096", "0.5828183", "0.5826578", "0.58223915", "0.58154696", "0.5813232", "0.5810834", "0.5808034", "0.5801745", "0.5795557", "0.57943845", "0.5771921", "0.57705504", "0.57659984", "0.5762209", "0.575979", "0.5746672", "0.57403946", "0.5740061", "0.5739427", "0.5738801", "0.57357776", "0.5729619", "0.5728822", "0.5727318", "0.57183444", "0.5711217", "0.5699684", "0.5697954", "0.56944555", "0.5683064", "0.5677596", "0.5672785", "0.5668642", "0.56602067", "0.5645165", "0.5642981", "0.5640572", "0.5635274", "0.5632774", "0.56289935", "0.5596089", "0.55946404", "0.5593155", "0.55930877", "0.5584922", "0.5578979", "0.557448", "0.5572641", "0.5571784", "0.55673236", "0.55639017", "0.55631006", "0.5559517", "0.5558332", "0.5558296", "0.5550986", "0.55488825", "0.5546148", "0.5534658", "0.55340147", "0.5530339", "0.5520259", "0.5518861", "0.551739", "0.55130064" ]
0.8446694
0
Printing animal details to the console
public String printDetails(Animal animal) { return animal.getName() + " - " + animal.getBreedOrType() + ", born in " + animal.getYearOfBirth(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }", "public void printDogs(){\n System.out.println(\"Here are the dogs in the shelter:\");\n for(Dog d : dogs){\n d.printInfo();\n }\n }", "public void printSpeciesData(){\n\n System.out.println(\"A \" + this.name + \" has \" + this.legs + \" legs, \" + this.numberOfWings +\n \" wings, it is \" + this.wingColor + \", and likes a plant called \" + this.favFlower);\n\n }", "public void eat(){\r\n System.out.println(this.animalName + \" eats\");\r\n }", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "public void showAnimalInfo(Player p, Entity e){\r\n\tif(this.checkifHasOwner(e.getUniqueId().toString())){\r\n\t\tAnimals a = new Animals(plugin, e.getUniqueId().toString(), p.getUniqueId().toString());\r\n\t\tint hp = (int) a.getHeartPoints();\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"+++++ Animal Info +++++\");\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Animal Name: \" + ChatColor.GREEN+ a.getAnimalName());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Animal Owner: \" + ChatColor.GREEN+ a.getOwnerName());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Heart Level: \" + ChatColor.GREEN + hp);\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Clean: \" + ChatColor.GREEN + a.getIsWashed());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is happy: \" + ChatColor.GREEN + a.isHappy());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is lonely: \" + ChatColor.GREEN + a.getIsPet());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Hungry: \" + ChatColor.GREEN + a.getHunger());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Healthy: \" + ChatColor.GREEN + a.isHealthy());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Weight: \" + ChatColor.GREEN + a.getWeight());\r\n\t\t}\r\n\t}", "public void showName() {\n\t\tSystem.out.println(\"Object id: \" + id + \", \" + description + \": \" + name);\n\t\t//System.out.println(description);\n\t}", "public void printAlphabetically() {\n if (getAnimals().size() > 0) {\n System.out.println(\"======== Animals sorted alphabetically ========\");\n getAnimals().stream()\n .sorted(Comparator.comparing(Animal::getName)).collect(Collectors.toList())\n .forEach(animal -> System.out.println(printDetails(animal)));\n System.out.println(\"================================== =-_-= ======\");\n } else {\n System.out.println(\"Nothing to print\");\n }\n }", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "@Override\n\tvoid Show() {\n\t\tanimal.Show();\n\t\tSystem.out.print(\" Shorts\");\n\t}", "public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }", "public void info()\n {\n System.out.println(toString());\n }", "public void printYourself(){\n\t\tsuper.printYourself();\t// Invoke the superclass\n \t// (Animal) code\n \t// Then do Horse-specific\n \t// print work here\n\t}", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public void print(){\n for(Recipe r : recipes){\n System.out.println(r.toString());\n }\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(name);\n\t}", "void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}", "public void print() {\n System.out.println(\"fish: \"+name+\", species= \"+species+\", color= \"+color+\", #fins= \"+fins);\n }", "public void print() {\n System.out.println(\"I am \" + status() + (muted ? \" and told to shut up *sadface*\" : \"\") + \" (\" + toString() + \")\");\n }", "abstract public void printInfo();", "public void showInfomation()\n\t{\n\t\tSystem.out.println(\"\\nMeal\"+\"\\n\\tnumber: \"+ number +\"\\n\\tdishName: \" + dishName +\"\\n\\tprice : \" + price+\"$\");\n\t}", "public void printDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeight() + \" inches\");\n System.out.println(\"Weight: \" + (int) getWeight() + \" pounds\");\n\n // unary, binary, ternary(3)\n // ternary operator\n String travelMessage = canTravel ? \"Does travel\" : \"Does not travel\";\n System.out.println(travelMessage);\n\n String smokeMessage = smokes ? \"Does smoke\" : \"Does not smoke\";\n System.out.println(smokeMessage);\n\n // ternary operators can replace simple if-else statement\n // System.out.print(\"Does \");\n // if (!isCanTravel())\n // System.out.print(\"not \");\n // System.out.println(\"travel\");\n // System.out.print(\"Does \");\n // if (!isSmokes())\n // System.out.print(\"not \");\n // System.out.println(\"smoke\");\n }", "public void printMovieInfo() {\n println(\"Title : \" + this.movie.getTitle());\n println(\"Showing Status: \" + this.movie.getShowingStatus().toString());\n println(\"Content Rating: \" + this.movie.getContentRating().toString());\n println(\"Runtime : \" + this.movie.getRuntime() + \" minutes\");\n println(\"Director : \" + this.movie.getDirector());\n print(\"Cast : \");\n StringBuilder s = new StringBuilder();\n for (String r : movie.getCasts()) {\n s.append(r + \"; \");\n }\n println(s.toString());\n println(\"Language : \" + this.movie.getLanguage());\n println(\"Opening : \" + this.movie.getFormattedDate());\n\n print(\"Synopsis : \");\n println(this.movie.getSynopsis(), 16);\n\n if(movie.getRatingTimes() != 0 ){\n print(\"Overall Rating :\");\n printStars(movie.getOverAllRating());\n } else {\n println(\"Overall Rating: N/A\");\n }\n if (movie.getRatingTimes() != 0){\n for (Review r : movie.getReview()) {\n print(\"Review : \");\n println(r.getComment(), 16);\n print(\"Rating : \");\n printStars(r.getRating());\n }\n }\n }", "public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(alcohol);\n\t}", "public void printSpayedOrNeutered(){\n System.out.println(\"Spayed or Neutered Dogs:\");\n ArrayList<Dog> dogsSpayedOrNeutered = dogsSpayedOrNeutered();\n for(Dog d : dogsSpayedOrNeutered){\n d.printInfo();\n }\n }", "private void print() {\r\n // Print number of survivors and zombies\r\n System.out.println(\"We have \" + survivors.length + \" survivors trying to make it to safety (\" + childNum\r\n + \" children, \" + teacherNum + \" teachers, \" + soldierNum + \" soldiers)\");\r\n System.out.println(\"But there are \" + zombies.length + \" zombies waiting for them (\" + cInfectedNum\r\n + \" common infected, \" + tankNum + \" tanks)\");\r\n }", "void printMe() {\n\t\t/*\n\t\t * age is private variable of the Animal class\n\t\t * so if we can access the age variable, depends on where\n\t\t * we create the Animal. if we create an Animal outside of\n\t\t * the Animal class, we cannot access age, as it's private.\n\t\t * if however, we create an Animal inside the Animal class\n\t\t * this Animal DOES have access to age.\n\t\t * cannot access age here, as private\n\t\t * see the run() method in the Animal class where we create\n\t\t * Animal object with access to age\n\t\t */\n\t//\tSystem.out.println(myAnimal.age);//private, so cannot access\n\t\t//protected, we are in same package so can access height\n\t\tSystem.out.println(myAnimal.height);//protected\n\t\t//default, in same package so we can access weight\n\t\tSystem.out.println(myAnimal.weight);//default\n\t\t//public, so we can access this anywhere\n\t\tSystem.out.println(myAnimal.name);//public\n\t\tmyAnimal.eat();//default level access\n\t\t//can't access this as this is a private method\n\t\t//myAnimal.drink()\n\t}", "public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}", "public static void main(String... args) {\n Mammal mammal = new Mammal();\n mammal.getName();\n Bird bird = new Bird();\n bird.getName();\n\n System.out.println(\"showAnimal(AbstractAnimal abstractAnimal) \");\n showAnimal(mammal);\n showAnimal(bird);\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void print() {\r\n\t\tSystem.out.println(\"** Metadata **\");\r\n\t\tfor (final Map<String, Object> m : _data) {\r\n\t\t\tSystem.out.println(\" + ALBUM\");\r\n\t\t\tfor (final String key : m.keySet()) {\r\n\t\t\t\tfinal Object o = m.get(key);\r\n\r\n\t\t\t\t// Most stuff is string, we can just dump that out.\r\n\t\t\t\tif (o instanceof String) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \": \" + (String) o);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (o instanceof ArrayList) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \":\");\r\n\t\t\t\t\tfor (final Object oo : (ArrayList<GracenoteMetadataOET>) o) {\r\n\t\t\t\t\t\tif (oo instanceof GracenoteMetadataOET) {\r\n\t\t\t\t\t\t\tfinal GracenoteMetadataOET oet = (GracenoteMetadataOET) oo;\r\n\t\t\t\t\t\t\toet.print();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void showInfo() {\n System.out.println(\"Garage {\");\n System.out.println(\"\\tGarage is \" + (isBig ? \"big\" : \"small\"));\n int i = 0;\n for (T car : carsInGarage) {\n System.out.println(\"\\tCar №\" + i + \": \" + car.getShortInfo());\n i++;\n }\n System.out.println(\"}\");\n }", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "public void showInformation() {\n\t\tSystem.out.println(\"Title: \" + getTitle());\n\t\tSystem.out.println(\"Time: \" + getTime());\n\t\tSystem.out.println(\"Number: \" + getNumber());\n\t}", "void printInfo();", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "public void Blueprint(){\r\n System.out.println(\"House features:\\nSquare Footage - \" + footage + \r\n \"\\nStories - \" + stories + \"\\nBedrooms - \" + bedrooms + \r\n \"\\nBathrooms - \" + bathrooms + \"\\n\");\r\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "private void showInfo() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Guess a letter:\\n\" + this.word);\n\t\tSystem.out.println(\"You have made \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t\tSystem.out.println(\"You will lose the game if you make more than \"\n\t\t\t\t+ this.allowance + \" wrong guesses.\");\n\t\tSystem.out.println(\"The already guessed wrong letters are:\");\n\t\tSystem.out.println(this.wrongLetters);\n\t\tSystem.out.println(\"-----------------------------\");\n\t}", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "public static void main(String[] args) {\n animals = new Animal[3];\n animals[0] = new PolarBear();\n animals[1] = new Elephant();\n animals[2] = new PolarBear();\n\n for (Animal animal: animals) {\n System.out.println(\"You see a \" + animal.toString()\n + \" that \" + animal.showOff());\n }\n }", "public void printDogsOfBreed(String breed){\n System.out.println(\"Here are the \" + breed + \" dogs in the shelter:\");\n ArrayList<Dog> specificDogs = dogsOfBreed(breed);\n for(Dog d : specificDogs){d.printInfo();}\n }", "@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "void printCarInfo();", "public static void main(String[] args) {\n\t\tAnimal a1 = new Animal(\"Dogy\", \"M\");\r\n\t\tSystem.out.println(a1.toString());\r\n\t}", "public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }", "public void eat() {\n\t\tSystem.out.println(this.name + \" the \" + this.type + \" ate their rabbit meat.\");\n\t}", "@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}", "public void printInfo()\n {\n System.out.println(\"position Value:\" + pos_.get(0).getPosition());\n System.out.println(\"velocitiy Value:\" + vel_.get(0).getVelocity());\n System.out.println(\"lastUpdateTime Value:\" + lastPosUpdateTime_);\n System.out.println(\"KalmanGain_ Value:\" + KalmanGain_);\n }", "public void print()\n\t{\n\t\tminGenes = Integer.MAX_VALUE;\n\t\tmaxGenes = 0;\n\t\tcreatureGenesQty = 0;\n\t\tfor (Creature creature : creatures)\n\t\t{\n\t\t\tminGenes = (minGenes > creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : minGenes;\n\t\t\tmaxGenes = (maxGenes < creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : maxGenes;\n\t\t\tcreatureGenesQty += creature.getGenotype().size();\n\t\t\t//creature.print();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t}\n\t\tavgGenes = creatureGenesQty / ((float) size());\n\n\t\t// add some statistics\n\t\tSystem.out.println(\"Population size: \" + size());\n\t\tSystem.out.println(\"Minimum number of genes: \" + minGenes);\n\t\tSystem.out.println(\"Average number of genes: \" + avgGenes);\n\t\tSystem.out.println(\"Maximum number of genes: \" + maxGenes);\n\t\tCreatureLog.info(String.valueOf(size()) + \"\\t\" + avgGenes + \"\\t\" + minGenes + \"\\t\" +maxGenes);\n\n\t}", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "public void printAnalysis(){\n System.out.println(\"Product: \" + this.getName());\n System.out.println(\"History: \" + this.history());\n System.out.println(\"Largest amount of product: \" + this.inventoryHistory.maxValue());\n System.out.println(\"Smallest amount of product: \" + this.inventoryHistory.minValue());\n System.out.println(\"Average: \" + this.inventoryHistory.average());\n }", "public void print() {\n System.out.println(toString());\n }", "public void showInfo(A a) {\n System.out.println(a.toString());\n }", "void display()\r\n\t{\r\n\t\tSystem.out.println(\"bikeid=\"+bikeid+\" bike name==\"+bikename);\r\n\t}", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "private void show() {\n System.out.println(team.toString());\n }", "public void PrintAttributes()\n\t{\n\t\tSystem.out.println(\"Name: \"+ name);\n\t\tSystem.out.println(\"Address: \"+ address);\n\t\tSystem.out.println(\"Phone_Number: \"+ phoneNumber);\n\t\tSystem.out.println(\"Year_Built: \"+ yearBuilt);\n\t\tSystem.out.println(\"Price: \"+ price);\n\t\tSystem.out.println(\"Max_Residents: \"+ maxResidents);\n\t\tSystem.out.println(\"Catagory: \"+ catagory);\n\t\t\n\t\t//GetKeywords(); \n\t\tif(keywords.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Keywords\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Keyword: \" + keywords.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//GetAvailableDates(); \n\t\tif(openDates.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Available Date\");\n\t\t}\n\t\tfor(int j = 0; j < openDates.size(); j++)\n\t\t{\n\t\t\tSystem.out.println(\"Available Date: \"+openDates.get(j).PrintDate());\n\t\t}\n\t}", "@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "public void printDogsOfGender(String gender){\n System.out.println(\"Here are the \" + gender + \" dogs in the shelter:\");\n ArrayList<Dog> specificDogs = dogsOfGender(gender);\n for(Dog d : specificDogs){d.printInfo();}\n }", "public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}", "public void printInfo() {\n\t\tSystem.out.println(\"User: \" + userName);\n\t\tSystem.out.println(\"Login: \" + loginName);\n\t\tSystem.out.println(\"Host: \" + hostName);\n\t}", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public static void main(String[] args) {\n\t\tAnimal humanoid = AnimalFactory.getAnimal(new HumanFactory(\"Model MK23\", \"Artificial Intelligence\"));\r\n\t\tAnimal cutedog = AnimalFactory.getAnimal(new DogFactory(\"Cute Model MC3\", \"Life long friend\"));\r\n\t\tSystem.out.println(\"AbstractFactory Human Properties => \" + humanoid);\r\n\t\tSystem.out.println(\"AbstractFactory Dog Properties => \" + cutedog);\r\n\t}", "public static void printInfo(){\n }", "void breed() {\n\t\tSystem.out.println(\"Ape breeding\");\n\t}", "public void print() {\n System.out.println(\"Command: \" + command);\n }", "public void printInfo() throws IOException {\n System.out.println();\n System.out.println(\"* Current books in the database.\\n\");\n for(Book book :bookdatabase){\n System.out.println(book.getTitle());\n }\n System.out.println();\n System.out.println(\"* Current students in the database.\\n\");\n for(Student student :studentdatabase){\n System.out.println(student.getUsername());\n }\n System.out.println();\n System.out.println(\"* Current librarians in the database.\\n\");\n for(Librarian l :lib_db){\n System.out.println(l.getUsername());\n }\n\n\n\n }", "public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}", "public void print() {\n\t\tSystem.out.println(\"ONOMA IDIOKTITH: \" + fname);\n\t\tSystem.out.println(\"EPWNYMO IDIOKTITH: \" + lname);\n\t\tSystem.out.println(\"DIEUTHINSH FARMAKEIOU: \" + address);\n\t\tSystem.out.println(\"THLEFWNO FARMAKEIOU: \" + telephone);\n\t\tSystem.out.println();\n\t}", "public void print(){\r\n System.out.println(toString());\r\n }", "public static void print(BakedFood bakedFood) {\n\t\tSystem.out.printf(\"%s ($%.2f)\\n\", bakedFood.getDescription(), bakedFood.cost());\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "public void printAll(){\n\t\tSystem.out.println(\"Single hits: \" + sin);\n\t\tSystem.out.println(\"Double hits: \" + doub);\n\t\tSystem.out.println(\"Triple hits: \" + trip);\n\t\tSystem.out.println(\"Homerun: \" + home);\n\t\tSystem.out.println(\"Times at bat: \" + atbat);\n\t\tSystem.out.println(\"Total hits: \" + hits);\n\t\tSystem.out.println(\"Baseball average: \" + average);\n\t}", "public static void show() {\n Animal.Petdog.sleep();\n\n // The dog is going to bark.\n Animal.Petdog.bark();\n\n // Creating a new chicken and a new pig.\n Animal c= new Chicken();\n Animal g= new Pig();\n\n // The animals are going to sleep.\n c.sleep();\n g.sleep();\n\n // The animals are going to fight with dog.\n c.fightWithDog();\n g.fightWithDog();\n\n // The animals are going to exercise.\n c.exe();\n g.exe();\n\n // Chicken can also run with your set.\n c.exewithset(\"Run\");\n\n // The animals are going to breed.\n c.breed();\n g.breed();\n\n // The animals are going to do shower.\n c.shower();\n g.shower();\n\n // Let's see how many product do we have before animals produce products.\n System.out.println(\"Chicken meat: \" +Chickenmeat.amount+\"\\nEggs: \"+ Eggs.amount) ;\n System.out.println(\"Pork: \" +Pork.amount) ;\n\n // The animals are going to produce external product.\n c.producewithoutdeath();\n g.producewithoutdeath();\n\n // The animals are going to produce internal product.\n c.producewithdeath();\n g.producewithdeath();\n\n // Let's see how many product do we have after animals produce products.\n System.out.println(\"Chicken meat: \" +Chickenmeat.amount+\"\\nEggs: \"+ Eggs.amount) ;\n System.out.println(\"Pork: \" +Pork.amount) ;\n\n // Get currnet states of the animals.\n c.getstate();\n g.getstate();\n\n // The dead animals regain life.\n c.setstate();\n g.setstate();\n c.getstate();\n g.getstate();\n\n\n }", "public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public void display() {\n System.out.println(toString());\n }", "public static void printMovieInformation(Movie movieObj) {\n\n System.out.print(\"The movie \"+movieObj.getName());\n System.out.print(\" is \"+movieObj.getLength() + \" hour long\");\n System.out.println(\" and it genre is \"+movieObj.getType());\n\n \n\n }", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "void printInfo(String name) {\n System.out.println(\"Info for \" + name + \": \");\n showStyle();\n showDim();\n System.out.println(\"Area is \" + area());\n }" ]
[ "0.7198903", "0.70191103", "0.6851546", "0.68470395", "0.68449503", "0.68395203", "0.67242813", "0.6693776", "0.6687121", "0.66528964", "0.6609679", "0.6587069", "0.65498817", "0.65356827", "0.652346", "0.65211385", "0.6502335", "0.64989877", "0.6486415", "0.6481339", "0.6472311", "0.6469793", "0.64685833", "0.64560896", "0.6453229", "0.64223915", "0.64037055", "0.6403278", "0.6387221", "0.63831", "0.63584185", "0.63544387", "0.63501096", "0.6345105", "0.6336665", "0.632071", "0.63160306", "0.6313303", "0.63104296", "0.6297653", "0.6291759", "0.6267797", "0.62667274", "0.6262908", "0.62619233", "0.6255195", "0.6254686", "0.62486374", "0.62486374", "0.6237293", "0.6216525", "0.6211465", "0.6209694", "0.6206169", "0.62059397", "0.620429", "0.6185982", "0.61769164", "0.6167761", "0.6159275", "0.6157802", "0.6153148", "0.614065", "0.61376834", "0.6133193", "0.61315316", "0.6127516", "0.6121041", "0.61152536", "0.6104777", "0.60969466", "0.60943854", "0.6091827", "0.6087846", "0.60838383", "0.60770184", "0.6075181", "0.60678446", "0.6065161", "0.60617656", "0.6061098", "0.60562986", "0.605157", "0.6045601", "0.60391825", "0.6035718", "0.60335153", "0.60317814", "0.6025347", "0.60234934", "0.6023057", "0.602188", "0.6016513", "0.6012244", "0.6011025", "0.60059696", "0.60057086", "0.6004962", "0.5996307", "0.5994995" ]
0.7607028
0
Filtering collection of animals by breed or name
public ArrayList<Animal> filterAnimals(String field, String value) { ArrayList<Animal> filteredAnimals = new ArrayList<>(); if (getAnimals().size() > 0) { if (field.equals("breed")) filteredAnimals = (ArrayList<Animal>) getAnimals().stream() .filter(animal -> animal.getBreedOrType().equals(value)) .collect(Collectors.toList()); else if (field.equals("name")) filteredAnimals = (ArrayList<Animal>) getAnimals().stream() .filter(animal -> animal.getName().equals(value)) .collect(Collectors.toList()); } return filteredAnimals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Dog> dogsOfBreed(String breed){\n ArrayList<Dog> dogsOfBreed = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getBreed().equals(breed)){\n dogsOfBreed.add(d);\n }\n }\n\n return dogsOfBreed;\n }", "public void sortByBreed() {\n\t\tAnimalCompare animalCompare = new AnimalCompare();\n\t\tCollections.sort(animals, animalCompare);\n\t}", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "private List<Thing> filter(List<Thing> source, List<WeatherType> weatherTypes, List<Gender> genders) {\n List<Thing> filtered = new ArrayList<>();\n for (Thing thing : source) {\n if (hasAnyWeatherType(thing, weatherTypes) && belongsTo(thing, genders)) {\n filtered.add(thing);\n }\n }\n return filtered;\n }", "private void filterItems()\n {\n System.out.println(\"filtered items (name containing 's'):\");\n Set<ClothingItem> items = ctrl.filterItemsByName(\"s\");\n items.stream().forEach(System.out::println);\n }", "private void getSomeDogs(){\n try {\n ArrayList<Dog> dogs = new ArrayList<Dog>();\n dogs.add(createLabrador());\n dogs.add(createGolderRetriver());\n \n //Aggregation\n dogs\n .stream()\n .filter(\n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()))\n .map(p->p.getName())\n .forEach(name -> UtilityMethods.print(name));\n\n //lambda expressions\n Dog.getDogList(\n dogs, \n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()), \n m -> m.getName(),\n o -> UtilityMethods.print(o)\n );\n\n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n }", "public boolean removeAnimal(String name);", "public ArrayList<Animal> filterAnimals(String field, int value) {\n ArrayList<Animal> filteredAnimals = new ArrayList<>();\n if (getAnimals().size() > 0)\n if (field.equals(\"year\"))\n filteredAnimals = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal.getYearOfBirth() == value)\n .collect(Collectors.toList());\n return filteredAnimals;\n }", "@FXML\n public void filterIngredients(){\n String searchText = searchIngredient.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n ingredientsList.setItems(filterObservableList);\n }", "@Override\n public List<FoodItem> filterByName(String substring) {\n //turn foodItemList into a stream to filter the list and check if any food item matched \n return foodItemList.stream().filter(x -> x.getName().toLowerCase() \n .contains(substring.toLowerCase())).collect(Collectors.toList());\n }", "public abstract void filter();", "public static List<Student> filterExample(){\n\t\tList<Student> genderFilter = StudentDataBase.getAllStudents().stream()\n\t\t\t\t.filter(stu->stu.getGender().equals(\"female\")).collect(Collectors.toList());\n\t\treturn genderFilter;\n\t}", "List<Dish> selectByExample(DishExample example);", "public ArrayList<Dog> dogsOfGender(String gender){\n ArrayList<Dog> dogsOfGender = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getGender().equals(gender)){\n dogsOfGender.add(d);\n }\n }\n\n return dogsOfGender;\n }", "@Override\n public List<FoodItem> filterByName(String substring) {\n if (foodItemList == null || foodItemList.size() == 0)\n return foodItemList;\n List<FoodItem> foodCandidate = new ArrayList<>();\n \tfor (FoodItem food : foodItemList) {\n if (food.getName().equals(substring)) {\n foodCandidate.add(food);\n }\n \t}\n return foodCandidate;\n \n }", "public void printDogsOfBreed(String breed){\n System.out.println(\"Here are the \" + breed + \" dogs in the shelter:\");\n ArrayList<Dog> specificDogs = dogsOfBreed(breed);\n for(Dog d : specificDogs){d.printInfo();}\n }", "public HashMap<String, Shelter> getByRestriction(CharSequence gender, CharSequence age,\n CharSequence name){\n HashMap<String, Shelter> searchedList = shelters;\n if (!(gender == null)) {\n Set entries = searchedList.entrySet();\n for(Iterator<Map.Entry<String, Shelter>> it = entries.iterator();\n it.hasNext(); ) {\n Map.Entry<String, Shelter> entry = it.next();\n Shelter shelter = entry.getValue();\n String genderVal = shelter.getGender();\n if (!genderVal.contains(gender) && (genderVal.contains(\"Men\")\n || genderVal.contains(\"Women\"))){\n it.remove();\n }\n }\n }\n if (!(age == null)) {\n Set entries = searchedList.entrySet();\n for(Iterator<Map.Entry<String, Shelter>> it = entries.iterator();\n it.hasNext(); ) {\n Map.Entry<String, Shelter> entry = it.next();\n Shelter shelter = entry.getValue();\n String genderVal = shelter.getGender();\n if (!genderVal.contains(age) && (genderVal.contains(\"Children\")\n || genderVal.contains(\"Families w/ newborns\")\n || genderVal.contains(\"Young adults\"))){\n it.remove();\n }\n }\n }\n if (!(name == null)) {\n Set entries = searchedList.entrySet();\n for(Iterator<Map.Entry<String, Shelter>> it = entries.iterator();\n it.hasNext(); ) {\n Map.Entry<String, Shelter> entry = it.next();\n Shelter shelter = entry.getValue();\n String nameVal = shelter.getName();\n if (!nameVal.contains(name)){\n it.remove();\n }\n }\n }\n return searchedList;\n }", "public Set<Sportive> filterByAge(int age){\n Iterable<Sportive> sportives = repo.findAll();\n return StreamSupport.stream(sportives.spliterator(), false).filter(sportive -> sportive.getAge()<age).collect(Collectors.toSet());\n }", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "public Set<Sportive> filterByFirstName(String st){\n Iterable<Sportive> materials = repo.findAll();\n return StreamSupport.stream(materials.spliterator(), false).filter(sportive -> sportive.getFirstName().contains(st)).collect(Collectors.toSet());\n }", "@FXML\n public void filterCupboardIngredients(){\n String searchText = searchIngredientCupboard.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n allIngredientsCupboardPane.setItems(filterObservableList);\n }", "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "List<Map<String, Object>> searchIngredient(String name);", "public static BookFilter getOnlyBibles()\n {\n return new BookCategoryFilter(BookCategory.BIBLE);\n }", "public abstract Filter<T> filter();", "public static Animal getByName(String name) {\n for(var animal : animals){\n if(animal.getName().equalsIgnoreCase(name))\n return animal;\n }\n return null;\n\n //Diffrent way of finding the animal\n /*return animals.stream()\n .filter(a -> a.getName().equalsIgnoreCase(name))\n .findAny()\n .orElse(null);*/\n }", "@Override\n public Filter getFilter() {\n\n return new Filter() {\n @Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n\n String charString = charSequence.toString();\n\n if (charString.isEmpty()) {\n\n mDataset = mArrayList;\n } else {\n\n ArrayList<DataObject> filteredList = new ArrayList<>();\n\n for (DataObject data : mArrayList) {\n\n if (data.getid().toLowerCase().contains(charString.toLowerCase()) || data.getname().toLowerCase().contains(charString.toLowerCase())) {\n\n filteredList.add(data);\n }\n }\n\n mDataset = filteredList;\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = mDataset;\n return filterResults;\n }\n\n @Override\n protected void publishResults(CharSequence charSequence, FilterResults filterResults) {\n mDataset = (ArrayList<DataObject>) filterResults.values;\n notifyDataSetChanged();\n }\n };\n }", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "ObservableList<Person> getFilteredPersonList();", "private void filter(String text){\n ArrayList<BloodBank> filteredList=new ArrayList<>();\n for(BloodBank bloodBank:lstBloodBanks){\n if(bloodBank.getName().toLowerCase().contains(text.toLowerCase())){\n filteredList.add(bloodBank);\n }\n }\n\n adapter.filterList(filteredList);\n }", "public static List<Bunny> getListOfVeryCuteBunniesNamedSteve() {\n String selectionString = \"name='steve' AND cuteValue > 66\";\n// Long time = Calendar.getInstance().getTimeInMillis();\n QueryResultIterable<Bunny> iterable =\n cupboard().withDatabase(db).query(Bunny.class).withSelection(selectionString).query();\n List<Bunny> list = getListFromQueryResultIterator(iterable);\n return list;\n }", "List<Whisky> findWhiskiesByAgeAndDistilleryNamed(String name, int age);", "public void setAnimals(ArrayList<Animal> animals) { this.animals = animals; }", "public void filterName(String nameProduct){\n market.filterName(nameProduct);\n car = market.filters;\n }", "@Override\n public void filter(String type) {\n\n List<Doctor> newDocs = new ArrayList<>();\n \n for (Doctor doctor : doctors) {\n //If doctor's specialization matches user searched specialization add to new doctor list\n if (doctor.getSpecialization()!=null && doctor.getSpecialization().equals(type)) {\n newDocs.add(doctor);\n }\n }\n \n //Set new doctor list as the doctor list\n doctors = newDocs;\n }", "@Deprecated\n ExtraQuery filter(String name, Object value);", "public interface ArmorFilter {\n List<Equipment> filter(List<Equipment> equipmentList);\n}", "List<Pet> selectByExample(PetExample example);", "public Artikel[] filterAll (Predicate<Artikel> ... predicates){\n Artikel [] temp = new Artikel[key];\n for (Predicate<Artikel> predicate : predicates) {\n temp = filter(predicate);\n }\n return temp;\n }", "private List<ClinicItem> filter(List<ClinicItem> cList, String query){\n query = query.toLowerCase();\n final List<ClinicItem> filteredModeList = new ArrayList<>();\n\n for(ClinicItem vetClinic:cList){\n if(vetClinic.getName().toLowerCase().contains(query)){\n filteredModeList.add(vetClinic); }\n }\n return filteredModeList;\n }", "public void filterBy(Map<String, List<String>> queryMap) {\n }", "private void filter(String text) {\n ArrayList<Pokemon> filteredList = new ArrayList();\n\n for (Pokemon p : team) {\n ArrayList<Type> types = p.getTypes();\n ArrayList<String> typesStringArray = getTypesStringArray(types);\n String typesString = getTypesString(typesStringArray);\n\n boolean nameContainsSearchedText = p.getName().toLowerCase().contains(text.toLowerCase());\n boolean typesContainsSearchedText = typesString.toLowerCase().contains(text.toLowerCase());\n\n if (nameContainsSearchedText || typesContainsSearchedText) {\n filteredList.add(p);\n }\n }\n\n adapter.filteredList(filteredList);\n }", "public List<Animal> getTopThreeEndangeredAnimals(String envName);", "public List<Product> findByNameIs(String name);", "private void filter(String text) {\n List<Target> filteredlist = new ArrayList<>();\n // running a for loop to compare elements.\n for (Target item : repositoryList) {\n // checking if the entered string matched with any item of our recycler view.\n if (item.getNameTarget().toLowerCase().contains(text.toLowerCase())) {\n // if the item is matched we are\n // adding it to our filtered list.\n filteredlist.add(item);\n }\n } adapter.updateData(filteredlist);\n }", "List<Animal> findAnimalByEstimatedAge(Integer estimatedAge);", "void updateFilteredPersonList(Set<String> keywords);", "public static BookFilter getBibles()\n {\n if (commentariesWithBibles)\n {\n return either(new BookCategoryFilter(BookCategory.BIBLE), new BookCategoryFilter(BookCategory.COMMENTARY));\n }\n return new BookCategoryFilter(BookCategory.BIBLE);\n }", "public interface CollectionFilter<T> {\n Collection<Product> filter(Collection<T> toFilter);\n}", "public <Y extends RPrimitive> RDataframe filter(String name, Predicate<Y> predicate) {\n\t\treturn filter(RFilter.from(name, predicate));\n\t}", "public boolean noDogsOfName(String name){\n boolean noDogsOfName = true;\n for(Dog d : dogs){\n if(d.getName().equals(name)){\n noDogsOfName = false;\n break;\n }\n }\n return noDogsOfName;\n }", "Stream<T> filter(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate);", "public ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);", "public ArrayList<Dog> dogsSpayedOrNeutered(){\n ArrayList<Dog> dogsSpayedOrNeutered = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.isSpayedOrNeutered()){\n dogsSpayedOrNeutered.add(d);\n }\n }\n\n return dogsSpayedOrNeutered;\n }", "List<DishDTO> findFirst5ByName(String name);", "@Test\n public void filterDishes1() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Spicy Basil Fried Rice\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Spicy Basil Fried Rice\");\n }", "private void filterClub(String filter) throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs matching the filter type \r\n ArrayList<JSONObject> clubs = new ArrayList<>();\r\n \r\n // check clubs to see if they match the type input by the user\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n \r\n if (filter.equals(profile.get(\"type\").toString()))\r\n \t clubs.add(profile);\r\n }\r\n \r\n if (clubs.isEmpty()) {\r\n \t logger.log(Level.INFO, \"There are no clubs matching that type.\");\r\n \t displayFilter();\r\n }\r\n else \r\n \t filter(clubs); \r\n}", "public Artikel [] filter(Predicate<Artikel> predicate) {\n Artikel[] filteredList = new Artikel[key];\n Artikel [] liste = new Artikel[key];\n int i = 0;\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n liste[i] = integerArtikelEntry.getValue();\n i++;\n }\n int p = 0;\n for (i = 0; i < key; i++) {\n if (predicate.test(liste[i])) {\n filteredList[p] = liste [i];\n p++;\n }\n }\n liste = filteredList;\n return liste;\n }", "public ArrayList<Animal> createSwimmers() {\n ArrayList<Animal> swimmers = new ArrayList<>();\n if (getAnimals().size() > 0)\n swimmers = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal instanceof Swimmer)\n .collect(Collectors.toList());\n return swimmers;\n }", "public boolean filter(Element e) {\n\t\t\t\tif(e.getRepresentedBy() instanceof AttributeElement) {\r\n\t\t\t\t\treturn ((AttributeElement) e.getRepresentedBy())\r\n\t\t\t\t\t\t.getRepresents().getName().equals(\"name\"); \r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}", "public void removeAnimal(Entity e){\r\n\t\tSet<String> farmers = plugin.getAnimalData().getConfigurationSection(\"Farmer\").getKeys(false);\r\n\t\tfor(String farmer : farmers){\r\n\t\t\tSet<String> farmeranimals = plugin.getAnimalData().getConfigurationSection(\"Farmer.\" + farmer + \".Animals\").getKeys(false);\r\n\t\t\t\r\n\t\t\tfor(String farmanimal : farmeranimals){\r\n\t\t\t\tif(farmanimal.equalsIgnoreCase(e.getUniqueId().toString())){\r\n\t\t\t\t\tLivingEntity le = (LivingEntity) e;\r\n\t\t\t\t\tplugin.getAnimalData().set(\"Farmer.\" + farmer +\".Animals.\"+ farmanimal, null);\r\n\t\t\t\t\tPlayer[] p = Bukkit.getOnlinePlayers();\r\n\t\t\t\t\tfor(Player online : p){\r\n\t\t\t\t\tif(online.getUniqueId().toString().equalsIgnoreCase(farmer)){\r\n\t\t\t\t\tonline.sendMessage(ChatColor.GRAY + \"Your \" + e.getType().toString() + \" \" + le.getCustomName() + \" has \" + ChatColor.DARK_RED + \"died.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(plugin.getAnimalData().contains(\"AnimalCoolDown.\" + farmanimal)){\r\n\t\t\t\t\t\tplugin.getAnimalData().set(\"AnimalCoolDown.\" + farmanimal, null );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplugin.saveAnimalData();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\r\n\tpublic List<Animal> getAllAnimals() {\n\t\treturn dao.findAll();\r\n\t}", "public void bark(){// bark class only belongs to dog class\n System.out.println(name+\" is barking\");\n }", "public synchronized <Y extends RPrimitive> RDataframe filter(String name, Class<Y> type, Predicate<Y> predicate) {\n\t\treturn filter(RFilter.from(name, type, predicate));\n\t}", "@Test\n public void filterDishes5() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Thighs Fish/Prawns\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Thighs Fish/Prawns\");\n }", "@Test\n public void filterDishes6() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Beer\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Beer\");\n }", "public Animal(String name) {\r\n this.animalName = name;\r\n }", "@Test\n public void filterDishes2() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Garlic Paradise Salad\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Garlic Paradise Salad\");\n }", "public Collection<T> filter(Query query) throws DataAccessException;", "ObservableList<Patient> getFilteredPatientList();", "private void collectUsingStream() {\n List<Person> persons =\n Arrays.asList(\n new Person(\"Max\", 18),\n new Person(\"Vicky\", 23),\n new Person(\"Ron\", 23),\n new Person(\"Harry\", 12));\n\n List<Person> filtered = persons\n .stream()\n .filter(p -> p.name.startsWith(\"H\"))\n .collect(Collectors.toList());\n\n System.out.println(\"collectUsingStream Filtered: \" + filtered);\n }", "AnimalSpecific(String category,String name,String type){\n\t\tsuper(category);\n\t\tanimalName = name;\n\t\tanimalType = type;\n\t}", "default Collection<ItemStack> getContentsMatching(Predicate<ItemStack> predicate) {\n\t\treturn this.getContents().values().stream().filter(predicate).collect(Collectors.toList());\n\t}", "private void filteringWithTypesOtherThanString() {\n PersonService personService = new PersonService(500);\n\n ComboBox<Person> comboBox = new ComboBox<>(\"Person\");\n comboBox.setPlaceholder(\"Enter minimum age to filter\");\n comboBox.setPattern(\"^\\\\d+$\");\n comboBox.setAllowedCharPattern(\"^\\\\d+$\");\n\n // Configuring fetch callback with a filter converter, so entered filter\n // strings can refer also to other typed properties like age (integer):\n comboBox.setItemsWithFilterConverter(\n query -> personService.fetchOlderThan(\n query.getFilter().orElse(null), query.getOffset(),\n query.getLimit()),\n ageStr -> ageStr.trim().isEmpty() ? null\n : Integer.parseInt(ageStr));\n comboBox.setItemLabelGenerator(person -> person.getFirstName() + \" \"\n + person.getLastName() + \" - \" + person.getAge());\n comboBox.setClearButtonVisible(true);\n comboBox.setWidth(WIDTH_STRING);\n addCard(\"Filtering\", \"Filtering with types other than String\",\n comboBox);\n }", "AggregationBuilder buildExcludeFilteredAggregation(Set<String> excludeNames);", "@Override\n public List<MongoPrideAssay> filterByAttributes(List<Triple<String, String, String>> filters) {\n Query queryMongo = PrideMongoUtils.buildQuery(filters);\n return mongoTemplate.find(queryMongo, MongoPrideAssay.class);\n }", "public ArrayList<Dog> dogsOfSize(String size){\n ArrayList<Dog> dogsOfSize = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getSize().equals(size)){\n dogsOfSize.add(d);\n }\n }\n\n return dogsOfSize;\n }", "@Test\n public void Given_store_with_books_When_filtering_by_existing_author_Then_only_books_of_the_author_are_returned() {\n booksList.add(B1_A);\n booksList.add(B2_A);\n booksList.add(B3_B);\n\n when(dao.getBooks()).thenReturn(booksList);\n\n List<Book> booksFilteredByAuthor = store.getBooksByAuthor(B1_A.getAuthor());\n\n assertThat(booksFilteredByAuthor).containsExactlyInAnyOrder(B1_A, B2_A);\n }", "private List<Scholarship> filter(List<Scholarship> models, String query) {\n query = query.toLowerCase();\n final List<Scholarship> filteredModelList = new ArrayList<>();\n for (final Scholarship model : models) {\n final String text = model.getTitle().toLowerCase();\n if (text.contains(query)) {\n filteredModelList.add(model);\n }\n }\n return filteredModelList;\n }", "@Test\n public void filterDishes4() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Peanut Beef\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Peanut Beef\");\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n Animal animal = (Animal) o;\n\n if (id != animal.id) return false;\n if (customerId != animal.customerId) return false;\n if (!name.equals(animal.name)) return false;\n if (!gender.equals(animal.gender)) return false;\n if (!dateAdmitted.equals(animal.dateAdmitted)) return false;\n if (!type.equals(animal.type)) return false;\n return breed.equals(animal.breed);\n }", "private List<VideoItem> filter(List<VideoItem> models, String query) {\n query = query.toLowerCase();\n final List<VideoItem> filteredModelList = new ArrayList<>();\n for (final VideoItem model : models) {\n final String text = model.getTitle().toLowerCase();\n if (text.contains(query)) {\n filteredModelList.add(model);\n }\n }\n return filteredModelList;\n }", "Collection<T> doFilter(RepositoryFilterContext context);", "public Filter condition();", "public interface CustomerSubsetFilterStrategy {\r\n Set<Customer> applyFilter(List<Customer> customers);\r\n}", "@Override\n public boolean test(Ingredient ingredient) {\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean test(Ingredient ingredient) {\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }", "private static Person findPersonByNameWithAllDogs(EntityManager em, String name) {\n\t\tQuery query = em.createQuery(\"select p from Person p join fetch p.dogs where p.name = :name\", Person.class);\n\t\tquery.setParameter(\"name\", name);\n\t\treturn (Person) query.getSingleResult();\n\t}", "private void filter(String text) {\n ArrayList<ChildItem> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (ChildItem s : dataParent ) {\n\n //if the existing elements contains the search input\n if (s.getKode_barang().toLowerCase().contains(text.toLowerCase())) {\n //adding the element to filtered list\n filterdNames.add(s);\n }\n }\n\n //calling a method of the adapter class and passing the filtered list\n adapter.filterList(filterdNames);\n }", "public static List<Apple> filterApples4(List<Apple> inventory, ApplePredicate p) {\n List<Apple> result = new ArrayList<>();\n for(Apple apple: inventory){\n if(p.test(apple)){\n result.add(apple);\n }\n }\n return result;\n }", "FeatureHolder filter(FeatureFilter filter);", "public void filterMapExample() {\n List<String> result = createPeople()\n .stream()\n .filter(predicate)\n .map(Person::getName)\n .map(String::toUpperCase)\n .collect(Collectors.toUnmodifiableList());\n print.accept(result);\n }", "public static List<Apple> filter(List<Apple> apples, Predicate<Apple> predicate) {\n\n\t\tList<Apple> result = new ArrayList<>();\n\t\tfor (Apple apple : apples) {\n\t\t\tif (predicate.test(apple)) {\n\t\t\t\tresult.add(apple);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\n\t}", "public static void main(String[] args) {\n String[] animals = {\"Cat\", \"Dog\", \"Dog\", \"Bird\", \"Fish\", \"Cat\"};\n\n ArrayList<String> animalsList = new ArrayList<>(Arrays.asList(animals));\n System.out.println(animalsList);\n\n /*\n Remove Cat elements and print your ArrayList again\n\n EXPECTED RESULT:\n [Dog, Bird, Fish]\n */\n\n System.out.println(\"\\n---Removing-Cat-1st way creating a new list---\\n\");\n ArrayList<String> animalsWithoutCats = new ArrayList<>(); // empty at this line\n\n for(String element: animalsList){\n if(!element.equalsIgnoreCase(\"cat\")) animalsWithoutCats.add(element);\n }\n\n System.out.println(\"List after removing cats = \" + animalsWithoutCats);\n\n\n System.out.println(\"\\n---Removing-Dog-2nd way using iterator---\\n\");\n\n Iterator<String> myIterator = animalsList.iterator();\n\n while(myIterator.hasNext()){\n if(myIterator.next().equalsIgnoreCase(\"dog\")) myIterator.remove();\n }\n\n System.out.println(\"List after removing dogs = \" + animalsList);\n }", "public @NotNull Set<Bidder> findBidders(@NotNull final Name name) throws BazaarException;", "public static List<Apple> filterApples(List<Apple> inventory, String color,\n int weight, boolean flag) {\n List<Apple> result = new ArrayList<>();\n for (Apple apple: inventory){\n if ( (flag && apple.getColor().equals(color)) ||\n (!flag && apple.getWeight() > weight) ){\n result.add(apple);\n }\n }\n return result;\n }", "@Query(\"select q from Question q where q.questionCategory.categoryName like ?1 or q.questionLevel.levelName like ?2 \"\r\n\t\t\t+ \"or q.questionType.typeName like ?3 or q.userQuestion.fullName like ?4 or q.dateCreated = ?5 or q.questionTag.tagName like ?6\" )\r\n\tList<Question> filterByAttribute(String categoryName, String levelName, String typeName, \r\n\t\t\tString fullName, Date dateCreated, String tagName, Pageable pageable );", "public List<Food> getFoodsByMeal(Meal m) {\n List<Food> foodsByMeal = new ArrayList<>();\n\n for (Food f : units) {\n if (f.getMeal() == m) {\n foodsByMeal.add(f);\n }\n }\n\n return foodsByMeal;\n }", "public DataSetAnimal(String breedOrType, String name, int yearOfBirth) {\n this.breedOrType = breedOrType;\n this.name = name;\n this.yearOfBirth = yearOfBirth;\n }", "List<Dress> selectByExample(DressExample example);" ]
[ "0.62349933", "0.61240304", "0.5718964", "0.56021", "0.55211616", "0.5500689", "0.5469838", "0.5457808", "0.54515547", "0.5336369", "0.5334652", "0.5332414", "0.533037", "0.52677137", "0.5247935", "0.5197961", "0.51780224", "0.5156035", "0.51254535", "0.5124054", "0.5105053", "0.5092435", "0.5090099", "0.5087807", "0.50806767", "0.5080003", "0.5054622", "0.5054438", "0.5037218", "0.5013449", "0.49978343", "0.49909458", "0.49716002", "0.49634215", "0.49608585", "0.4951142", "0.49429077", "0.4938252", "0.49301088", "0.49178872", "0.48984167", "0.48842573", "0.48661372", "0.48608458", "0.48564082", "0.48555416", "0.48416758", "0.483533", "0.48030567", "0.4800917", "0.47942942", "0.47918072", "0.4776124", "0.47650576", "0.4764143", "0.47528592", "0.47509974", "0.4747148", "0.47444907", "0.4742511", "0.47334164", "0.47310355", "0.47204632", "0.4719395", "0.47185183", "0.4708024", "0.47074246", "0.4707095", "0.47050092", "0.47029597", "0.47009587", "0.4698133", "0.4695351", "0.4691689", "0.46905074", "0.4687557", "0.46815807", "0.46743923", "0.4672759", "0.46597686", "0.4654195", "0.46409082", "0.46321398", "0.46268898", "0.46144176", "0.46138424", "0.46138424", "0.46100938", "0.46083274", "0.46009624", "0.45969534", "0.45922238", "0.4591901", "0.45917532", "0.45879498", "0.45791766", "0.45701185", "0.45682102", "0.45548236", "0.4553516" ]
0.68920606
0
Filtering collection of animals by year
public ArrayList<Animal> filterAnimals(String field, int value) { ArrayList<Animal> filteredAnimals = new ArrayList<>(); if (getAnimals().size() > 0) if (field.equals("year")) filteredAnimals = (ArrayList<Animal>) getAnimals().stream() .filter(animal -> animal.getYearOfBirth() == value) .collect(Collectors.toList()); return filteredAnimals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<Vehicle> findByYear(BigDecimal year) {\n List<AggregationOperation> operations = new ArrayList<>();\n operations.addAll(getVehicleAggregations());\n operations.add(getMatchOperation(\"cars.vehicles.year_model\", Operation.EQ, year));\n operations.add(getVehicleProjection());\n operations.add(sort(Sort.Direction.DESC, \"date_added\"));\n TypedAggregation<Warehouse> aggregation =\n Aggregation.newAggregation(Warehouse.class, operations);\n return mongoTemplate.aggregate(aggregation, Vehicle.class).getMappedResults();\n }", "public ArrayList<Song> searchByYear(Integer year) \r\n {\r\n return musicLibraryYearKey.get(year);\r\n \r\n }", "public List<Vehicle> filterOlderVehicles2(){\n List<Vehicle> resultingVehicles = this.vehicles.stream().filter(vehicle ->\n vehicle.isYoungerThanGivenYear(FILTER_YEAR)).collect(Collectors.toList());\n\n resultingVehicles.forEach(vehicle -> Vehicle.printMakeModelAndYear(vehicle));\n return resultingVehicles;\n }", "public void sortBasedYearService();", "public void printAverageRatingsByYear(){\n ThirdRatings sr = new ThirdRatings();\n int raters = sr.getRaterSize();\n System.out.println(\"raters: \" + raters);\n System.out.println(\"-------------------------------------\");\n \n //MovieDatabase.initialize(\"ratedmovies_short.csv\");\n MovieDatabase.initialize(\"ratedmoviesfull.csv\");\n System.out.println(\"movies: \" + MovieDatabase.size());\n System.out.println(\"-------------------------------------\");\n \n Filter f = new YearAfterFilter(2000); \n int minRatings = 20;\n ArrayList<Rating> aveRat = sr.getAverageRatingsByFilter(minRatings, f);\n System.out.println(\"Found \" + aveRat.size() + \" movies\");\n System.out.println(\"-------------------------------------\");\n // sort arraylist\n Collections.sort(aveRat);\n for(Rating r: aveRat){\n System.out.println(r.getValue() + \"\\t\" + MovieDatabase.getYear(r.getItem()) + \"\\t\" + MovieDatabase.getTitle(r.getItem()));\n }\n System.out.println(\"-------------------------------------\");\n \n \n }", "@Override\n\tpublic Set<Person> getfindByBirthdateYear(int year) {\n\t\treturn null;\n\t}", "public Set<Sportive> filterByAge(int age){\n Iterable<Sportive> sportives = repo.findAll();\n return StreamSupport.stream(sportives.spliterator(), false).filter(sportive -> sportive.getAge()<age).collect(Collectors.toSet());\n }", "List<TCpyYearCheck> selectByExample(TCpyYearCheckExample example);", "public void testYearSort() {\n sorter.inssortYear();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getYear(), 2000);\n assertEquals(list.get(1).getYear(), 2011);\n assertEquals(list.get(2).getYear(), 2019);\n }", "public List<Car> searchByYear(List<Car> cars, int year) {\n List<Car> resultList = new ArrayList<>();\n // find all cars that were made in year or newer and add to resultList\n for (Car c: cars) {\n if (c.getYear() >= year) {\n resultList.add(c);\n }\n }\n return resultList;\n }", "public ArrayList<Book> listYear99() {\n ArrayList<Book> booksBefore1999 = new ArrayList<>();\n for (Book book : bookList) {\n if (book.getYear() < 1999) {\n booksBefore1999.add(book);\n\n }\n }\n return booksBefore1999;\n }", "public List<Refinery> getRefineries(int year);", "public void setYear(String year) {\n this.year = year;\n }", "public void setYear(String year) {\n this.year = year;\n }", "public void setYear(int year) {\n this.year = year;\n }", "@Test\n public void lab6() {\n StudentService ss = new StudentService();\n Utils.fillStudents(ss);\n\n List<Student> students = ss.getAllStudents();\n\n long count = students.stream()\n .filter(s -> s.getDob().until(LocalDate.now(), ChronoUnit.YEARS) > 20)\n .collect(counting());\n\n }", "public void setYear(int year)\n {\n this.year = year;\n }", "@Test\n public void lab5() {\n StudentService ss = new StudentService();\n Utils.fillStudents(ss);\n\n List<Student> students = ss.getAllStudents();\n\n //List<Long> listOfAges = students.stream()\n Set<Long> listOfAges = students.stream()\n .filter(s -> s.getStatus() == Student.Status.HIBERNATING)\n .map(s -> s.getDob().until(LocalDate.now(), ChronoUnit.YEARS))\n .collect(toSet());\n\n\n }", "List<Car> getByBrandOrderByYearAsc(String brand);", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(int year) {\r\n this.year = year;\r\n }", "public void removeAllRecordingYear() {\r\n\t\tBase.removeAll(this.model, this.getResource(), RECORDINGYEAR);\r\n\t}", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void removeAllOriginalReleaseYear() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALRELEASEYEAR);\r\n\t}", "public void setYear(int _year) { year = _year; }", "public void setYear(int year) {\n\tthis.year = year;\n}", "@Query(value = \"select * from patent_details order by year asc;\", nativeQuery = true)\n public Iterable<PatentDetails> findYearwisePatentDetails();", "private void populateYears(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT DISTINCT year FROM album ORDER BY year\");\n\n while(results.next()){\n Integer year = results.getInt(1);\n yearList.add(year);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "public void searchYear()\r\n\t{\r\n\r\n\t\tSystem.out.print(\"Please provide a year: \");\r\n\t\tint year = scan.nextInt();\r\n\t\tboolean display = false;\r\n\t\tboolean found = false;\r\n\t\tfor (int i = 0; i < actualSize; i++)\r\n\t\t{\r\n\r\n\t\t\tif (year == data[i].getYear())\r\n\t\t\t{\r\n\t\t\t\tif (display == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Title\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" + \"Year\\t\" + \"rating\\t\" + \"score\");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(data[i].toString());\r\n\t\t\t\tdisplay = true;\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (found == false)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The year does not match any of the movies.\");\r\n\t\t}\r\n\r\n\t}", "public void setYear(String year)\r\n {\r\n this.year = year; \r\n }", "public void initializeYears() {\n int j, k;\n WaterPurityReport earliest = _purityReportData.get(1);\n WaterPurityReport latest = _purityReportData.get(_purityReportData.getCount());\n if (earliest != null) {\n// j = earliest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n// k = latest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(earliest.getDate());\n j = cal.get(Calendar.YEAR);\n cal.setTime(latest.getDate());\n k = cal.get(Calendar.YEAR);\n dataGraphYear.setItems(FXCollections.observableArrayList(IntStream.range(j, k+1).boxed().collect(Collectors.toList())));\n }\n }", "boolean isFilterByDate();", "public static final Function<Date,Date> setYear(final int value) {\r\n return new Set(Calendar.YEAR, value);\r\n }", "public void setYear(int value) {\r\n this.year = value;\r\n }", "public void setYear(int year)\r\n\t{\r\n\t\tthis.year = year;\r\n\t}", "TCpyYearCheck selectOneByExample(TCpyYearCheckExample example);", "public void setYear(String year) {\n this.put(\"year\", year);\n }", "public void setYear(String year) {\n\t\tthis.year = year;\n\t}", "private ArrayList<Event> getAcademicYearEvents(ArrayList<Event> semesterList, int year) throws PacException {\n ArrayList<Event> yearList = new ArrayList<>();\n for (Event event : semesterList) {\n if (event.getYear().equals(year)) {\n yearList.add(event);\n }\n }\n if (yearList.isEmpty()) {\n throw new PacException(EMPTY_YEAR_LIST_ERROR_MESSAGE);\n }\n return yearList;\n }", "public void setYear(int year) \n\t{\n\t\tthis.year = year;\n\t}", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public int getYear() { return year; }", "public int getYear() { return year; }", "public void printAverageRatingsByYearAfterAndGenre(){\n ThirdRatings sr = new ThirdRatings();\n int raters = sr.getRaterSize();\n System.out.println(\"read data for \" + raters + \" raters\");\n System.out.println(\"-------------------------------------\");\n \n //MovieDatabase.initialize(\"ratedmovies_short.csv\");\n MovieDatabase.initialize(\"ratedmoviesfull.csv\");\n System.out.println(\"read data for \" + MovieDatabase.size() + \" movies\");\n System.out.println(\"-------------------------------------\");\n \n AllFilters f = new AllFilters();\n YearAfterFilter y = new YearAfterFilter(1990);\n GenreFilter g = new GenreFilter(\"Drama\");\n f.addFilter(y);\n f.addFilter(g);\n int minRatings = 8;\n ArrayList<Rating> aveRat = sr.getAverageRatingsByFilter(minRatings, f);\n System.out.println(\"Found \" + aveRat.size() + \" movies\");\n System.out.println(\"-------------------------------------\");\n // sort arraylist\n Collections.sort(aveRat);\n for(Rating r: aveRat){\n System.out.println(r.getValue() + \"\\t\" \n + MovieDatabase.getYear(r.getItem()) + \"\\t\"\n + MovieDatabase.getTitle(r.getItem()) + \"\\t\"\n + MovieDatabase.getGenres(r.getItem()));\n }\n System.out.println(\"-------------------------------------\");\n \n \n }", "@Override\r\n public boolean matches(PublicationContainer books, int index)\r\n throws PublicationContainerException {\r\n return books.get(index).getYear() == this.year;\r\n }", "public List<Integer> getByYearDay() {\n\t\treturn byYearDay;\n\t}", "public void testNumericDateFilter() throws Exception {\n // pub date of Lucene in Action, Second Edition and\n // JUnit in ACtion, Second Edition is May 2010\n Filter filter = NumericRangeFilter.newIntRange(\"pubmonth\",\n 201001,\n 201006,\n true,\n true);\n assertEquals(2, TestUtil.hitCount(searcher, allBooks, filter));\n }", "private ArrayList<Task> filterByDate(ArrayList<Task> toFilter, Date date) {\n ArrayList<Integer> toDelete = new ArrayList<Integer>();\n Calendar calAim = Calendar.getInstance();\n Calendar calTest = Calendar.getInstance();\n calAim.setTime(date);\n\n //remove all on different dates\n for (int i = 0; i < toFilter.size(); i++) {\n if (toFilter.get(i).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Event.class)) {\n Event temp = (Event) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Period.class)) {\n Period temp = (Period) toFilter.get(i);\n calTest.setTime(temp.getStart());\n }\n boolean sameDay = calAim.get(Calendar.DAY_OF_YEAR) == calTest.get(Calendar.DAY_OF_YEAR)\n && calAim.get(Calendar.YEAR) == calTest.get(Calendar.YEAR);\n if (!sameDay) {\n toDelete.add(i);\n }\n }\n\n for (int i = toDelete.size() - 1; i >= 0; ) {\n toFilter.remove((int) toDelete.get(i));\n i--;\n }\n return toFilter;\n }", "public static List getAlumniByYear(int year)\n { \n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"from Alumni_data where passOutYear=:year\").setInteger(\"year\", year).list();\n session.close();\n return li;\n }", "private void fillYearFields() {\n\n\t\tfor (int i = 1990; i <= 2100; i++) {\n\t\t\tyearFieldDf.addItem(i);\n\t\t\tyearFieldDt.addItem(i);\n\t\t}\n\t}", "public void setYear(int value) {\n\tthis.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "public void setYear(short value) {\n this.year = value;\n }", "public Builder byYearDay(Collection<Integer> yearDays) {\n\t\t\tbyYearDay.addAll(yearDays);\n\t\t\treturn this;\n\t\t}", "TCpyYearCheck selectByPrimaryKey(Integer id);", "void setFilterByDate(boolean isFilterByDate);", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "public EventsCalendarYear(Integer year) {\n initYear(year);\n }", "public void setYear(int Year) {\n\t this.year= Year;\n\t}", "public void moviesForYear(String year) {\r\n\t\tboolean success = false;\r\n\t\tMovieListNode<m> cur = head;\r\n\t\twhile(cur!=null) {\r\n\t\t\tboolean part = cur.toString().toLowerCase().contains(year.toLowerCase());\t//REFERENCE: https://stackoverflow.com/questions/2275004/in-java-how-do-i-check-if-a-string-contains-a-substring-ignoring-case\r\n\t\t\t//^^checks if the year is in the current movie node\r\n\t\t\tif(part ==true) {\r\n\t\t\t\t//^^ if the year was in the node, then print the movie details\r\n\t\t\t\tsuccess = true;\r\n\t\t\t\tSystem.out.println(cur.toString());\r\n\t\t\t}\r\n\t\t\tcur=cur.next;\t//goes on to check if there were other movies with that year\r\n\t\t}\r\n\t\tif(cur==null && success!=true) {\r\n\t\t\tSystem.out.println(\"There were no movies for that year.\");\r\n\t\t\t//^^ if no movies with that year were found, then success stays false and the user is informed that there were no movies with the year\r\n\t\t}\r\n\t}", "public void sortYear(){\r\n\r\n\t\t// sort magazines by year inside the items array\r\n Magazine temp; // used for swapping magazines in the array\r\n\t for(int i=0; i<items.size(); i++) {\r\n\r\n\t\t// Check to see the item is a magazine. We will only\r\n\t\t//use magazines.\r\n\t if(items.get(i).getItemType() != Item.ItemTypes.MAGAZINE)\r\n\t continue;\r\n\t\t\t\r\n\t for(int j=i+1; j<items.size(); j++) {\r\n\t\t // We consider only magazines\r\n\t if(items.get(j).getItemType() != Item.ItemTypes.MAGAZINE)\r\n\t\t continue;\r\n\t\t // Compare the years of the two magazines\r\n\t if(((Magazine)items.get(i)).getYear() < \r\n\t \t((Magazine)items.get(j)).getYear()) {\r\n\t\t // Swap the items\r\n\t\t temp = (Magazine)items.get(i);\r\n\t\t items.remove(i);\r\n\t\t items.add(i, items.get(j-1));\r\n\t\t items.remove(j);\r\n\t\t items.add(j, temp);\r\n\t }\r\n\t }\r\n\t }\r\n\t\t// Print the magazines\r\n\t\tfor(int i=0; i<items.size(); i++)\r\n\t\t\tif(items.get(i).getItemType() == Item.ItemTypes.MAGAZINE)\r\n\t\t\t\tSystem.out.println(items.get(i).toString());\r\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYears(int years) {\n this.years = years;\n }", "@Test\n public void testSpecificYear() {\n context = new MockServletContext();\n context.setInitParameter(ConfigService.MESHRDF_YEAR, \"2018\");\n context.setInitParameter(ConfigService.MESHRDF_INTERIM, \"true\");\n configService = new ConfigServiceImpl(context);\n\n ValidYears years = configService.getValidYears();\n\n assertThat(years.getCurrent(), equalTo(2018));\n assertThat(years.getInterim(), equalTo(2019));\n }", "@Override\r\n\tpublic List<GetSalesOrderByYear> getSalesOrdersByYear(int year) {\n\t\tList<Object[]> list=null;\r\n\t\tList<GetSalesOrderByYear> byYears=null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlist=boardDao.getSalesOrdersByYear(year);\r\n\t\t\tbyYears=new ArrayList<GetSalesOrderByYear>();\r\n\t\t\tIterator<Object[]> iterator=list.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tGetSalesOrderByYear salesOrderByYear=new GetSalesOrderByYear();\r\n\t\t\t\tsalesOrderByYear.setMaterial((String)objects[0]);\r\n\t\t\t\tsalesOrderByYear.setMatpct(Float.valueOf((String)objects[1]));\r\n\t\t\t\tbyYears.add(salesOrderByYear);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn byYears;\r\n\t}", "public EventsCalendarYear() {\n initYear();\n }", "@Test\n\tpublic void testYears() {\n\t\tint birthYear = 2000;\n\t\tint deathYear = 2019;\n\t\tPlot plot = new Plot();\n\t\t\n\t\tplot.setBirthYear(2000);\n\t\tassertEquals(plot.getBirthYear(), birthYear);\n\t\tplot.setDeathYear(2019);\n\t\tassertEquals(plot.getDeathYear(), deathYear);\n\t\t\n\t\tSystem.out.println(\"Birth and Death Years were successful.\");\n\t}", "public Movie(String name, int year)\n\t{\n\t\tthis.name = name;\n\t\tthis.year = year;\n\t\tpeopleAct = new ArrayList<CastMember>(10);\n\t}", "public void setYear(final int year) {\n\t\tthis.year = year;\n\t}", "public void setYear(int year) {\n\t\tthis.date.setYear(year);\n\t}", "public List<Book> getBooks() {\r\n \t\t// switch dates\r\n \t\tif (filter_dateFrom.compareTo(filter_dateTo) > 0) {\r\n \t\t\tCalendar tmp = filter_dateFrom;\r\n \t\t\tfilter_dateFrom = filter_dateTo;\r\n \t\t\tfilter_dateTo = tmp;\r\n \t\t}\r\n \r\n \t\tDate yearFrom = filter_dateFrom.getTime();\r\n \t\tDate yearTo = filter_dateTo.getTime();\r\n \r\n \t\t// genre\r\n \t\tGenre genre = null;\r\n \t\tif (!filter_genre.isEmpty() && !filter_genre.equalsIgnoreCase(\"all\")) {\r\n \t\t\tgenre = genreMgr.findByName(filter_genre);\r\n \t\t\tif (genre == null) {\r\n \t\t\t\tSystem.err.println(\"Badly working database encoding!\");\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn bookMgr.find(filter_name, filter_author, yearFrom, yearTo, genre, filter_isbn_issn);\r\n \t}", "public void setDocumentYear(int documentYear);", "public int getDocumentYear();", "public void setYear (int yr) {\n year = yr;\n }", "public interface FilmRepository extends JpaRepository<Film , Integer> {\n\n Page<Film> findByYear(Short year, Pageable pageable);\n\n List<Film> findByYear(Short year);\n\n List<Film> findFilmDistinctByYearIsNotNull();\n\n\n @Query(value = \"Select DISTINCT(f.year) From Film f ORDER BY f.year desc \")\n List<Short> findYearDistinct();\n\n @Query(value = \"Select h.name From f_entity_human h where h.jobs = '导演' ORDER BY h.name desc \")\n List<String> findDirectorDistinct();\n\n}", "public ConcreteYear(int year) {\r\n if (year > 0) {\r\n this.year = year;\r\n }\r\n }", "ObservableList<Patient> getFilteredPatientList();", "public void setYearParam(String yearParam) {\r\n this.yearParam = yearParam;\r\n }", "Year createYear();", "public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VAuthor> fetchByYearOfBirth(java.lang.Integer... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VAuthor.V_AUTHOR.YEAR_OF_BIRTH, values);\n\t}", "public void setYear(short value) {\n this.year = value;\n }", "int getYear();", "public void setYear(short value) {\r\n this.year = value;\r\n }", "private List<Thing> filter(List<Thing> source, List<WeatherType> weatherTypes, List<Gender> genders) {\n List<Thing> filtered = new ArrayList<>();\n for (Thing thing : source) {\n if (hasAnyWeatherType(thing, weatherTypes) && belongsTo(thing, genders)) {\n filtered.add(thing);\n }\n }\n return filtered;\n }", "public List<Books> findBooksByYear(String yearString) {\r\n int year;\r\n\r\n try {\r\n year = Integer.valueOf(yearString);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n\r\n return bookController.findBooksByYear(year);\r\n }", "public void printAverageRatingsByYear(){\n \n String moviefile = \"data/ratedmovies_short.csv\";\n String ratingsfile = \"data/ratings_short.csv\";\n \n \n ThirdRatings tr = new ThirdRatings(ratingsfile);\n \n int rating_size = tr.getRaterSize();\n \n System.out.println(\"The number of raters read is : \"+ rating_size);\n \n MovieDatabase database = new MovieDatabase();\n \n database.initialize(moviefile);\n \n int movie_size = database.size();\n \n System.out.println(\"The number of movies read is : \"+ movie_size); \n \n int year = 2000;\n \n YearAfterFilter year_filter = new YearAfterFilter(year);\n \n ArrayList<Rating> ratings_list = tr.getAverageRatingsByFilter(1, year_filter);\n \n HashMap<String, Double> map = new HashMap<String, Double>();\n \n Collections.sort(ratings_list);\n \n int count = 0; \n \n for(Rating rating : ratings_list){\n \n String title = database.getTitle(rating.getItem());\n \n double val = rating.getValue();\n \n int mov_year = database.getYear(rating.getItem());\n \n if(val != 0.0 ){\n \n map.put(title , val);\n \n count += 1;\n\n System.out.println(val + \"\\t\" + mov_year + \"\\t\" +title );\n }\n\n }\n \n System.out.println(\"The number of movies found with minimal number of ratings is : \"+ count); \n \n \n \n }", "public abstract void filter();", "public int getYear() {\n return year;\n }", "public void removeOriginalReleaseYear(java.lang.Integer value) {\r\n\t\tBase.remove(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "@Override\n public List<MongoPrideAssay> filterByAttributes(List<Triple<String, String, String>> filters) {\n Query queryMongo = PrideMongoUtils.buildQuery(filters);\n return mongoTemplate.find(queryMongo, MongoPrideAssay.class);\n }", "ObservableList<Appointment> getFilteredAppointmentList();", "@Test\n public void testGetOrdersByDate() {\n\n LocalDate ld = LocalDate.parse(\"2017-06-23\");\n List<Order> orderListByDate = service.getOrdersByDate(ld);\n List<Order> filteredList = new ArrayList<>();\n\n for (Order currentOrder : orderListByDate) {\n if (currentOrder.getOrderDate().contains(\"06232017\")) {\n filteredList.add(currentOrder);\n }\n }\n\n assertEquals(2, filteredList.size());\n }", "public ArrayList<Animal> filterAnimals(String field, String value) {\n ArrayList<Animal> filteredAnimals = new ArrayList<>();\n if (getAnimals().size() > 0) {\n if (field.equals(\"breed\"))\n filteredAnimals = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal.getBreedOrType().equals(value))\n .collect(Collectors.toList());\n else if (field.equals(\"name\"))\n filteredAnimals = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal.getName().equals(value))\n .collect(Collectors.toList());\n }\n return filteredAnimals;\n }" ]
[ "0.6065296", "0.5900115", "0.5881745", "0.57678974", "0.5726888", "0.57233924", "0.56664544", "0.56479377", "0.5638916", "0.55804837", "0.5532941", "0.5493871", "0.5452873", "0.5452873", "0.54441816", "0.544153", "0.54402614", "0.54171866", "0.5408806", "0.5408706", "0.5408706", "0.5408706", "0.5396501", "0.53723806", "0.53497815", "0.53497815", "0.53320396", "0.5322701", "0.5308151", "0.53004724", "0.527737", "0.5252807", "0.5244838", "0.52403134", "0.52144164", "0.5210593", "0.520867", "0.5181971", "0.5173364", "0.5159606", "0.5136727", "0.5133977", "0.51215565", "0.5105207", "0.5105207", "0.509473", "0.509473", "0.5068533", "0.5056616", "0.50541127", "0.50489223", "0.50264835", "0.5012888", "0.5002571", "0.4997924", "0.49925533", "0.49924806", "0.4944163", "0.49374327", "0.4930673", "0.4919743", "0.4915232", "0.49097055", "0.49087706", "0.49075377", "0.4890964", "0.48897725", "0.48897725", "0.48897725", "0.488696", "0.48783135", "0.48729962", "0.48690084", "0.486882", "0.48641038", "0.48580772", "0.48533434", "0.48407322", "0.48404354", "0.48344374", "0.48228037", "0.4817115", "0.48065567", "0.480334", "0.47975203", "0.47928077", "0.4787675", "0.47829917", "0.47806647", "0.47476068", "0.47377938", "0.47357446", "0.4731408", "0.470962", "0.46894836", "0.4688511", "0.46880472", "0.46816552", "0.4680126", "0.4678029" ]
0.66620755
0
Filtering collection of animals to create swimmers collection
public ArrayList<Animal> createSwimmers() { ArrayList<Animal> swimmers = new ArrayList<>(); if (getAnimals().size() > 0) swimmers = (ArrayList<Animal>) getAnimals().stream() .filter(animal -> animal instanceof Swimmer) .collect(Collectors.toList()); return swimmers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "public ArrayList<Animal> filterAnimals(String field, String value) {\n ArrayList<Animal> filteredAnimals = new ArrayList<>();\n if (getAnimals().size() > 0) {\n if (field.equals(\"breed\"))\n filteredAnimals = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal.getBreedOrType().equals(value))\n .collect(Collectors.toList());\n else if (field.equals(\"name\"))\n filteredAnimals = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal.getName().equals(value))\n .collect(Collectors.toList());\n }\n return filteredAnimals;\n }", "private void getSomeDogs(){\n try {\n ArrayList<Dog> dogs = new ArrayList<Dog>();\n dogs.add(createLabrador());\n dogs.add(createGolderRetriver());\n \n //Aggregation\n dogs\n .stream()\n .filter(\n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()))\n .map(p->p.getName())\n .forEach(name -> UtilityMethods.print(name));\n\n //lambda expressions\n Dog.getDogList(\n dogs, \n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()), \n m -> m.getName(),\n o -> UtilityMethods.print(o)\n );\n\n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n }", "public ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);", "public void setAnimals(ArrayList<Animal> animals) { this.animals = animals; }", "public ArrayList<Dog> dogsSpayedOrNeutered(){\n ArrayList<Dog> dogsSpayedOrNeutered = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.isSpayedOrNeutered()){\n dogsSpayedOrNeutered.add(d);\n }\n }\n\n return dogsSpayedOrNeutered;\n }", "@FXML\n public void filterCupboardIngredients(){\n String searchText = searchIngredientCupboard.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n allIngredientsCupboardPane.setItems(filterObservableList);\n }", "@FXML\n public void filterIngredients(){\n String searchText = searchIngredient.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n ingredientsList.setItems(filterObservableList);\n }", "default Collection<ItemStack> getContentsMatchingSimulated(Predicate<ItemStack> predicate) {\n\t\treturn this.getContentsSimulated().stream().map(ItemStack::copy).filter(predicate).collect(Collectors.toList());\n\t}", "private List<Thing> filter(List<Thing> source, List<WeatherType> weatherTypes, List<Gender> genders) {\n List<Thing> filtered = new ArrayList<>();\n for (Thing thing : source) {\n if (hasAnyWeatherType(thing, weatherTypes) && belongsTo(thing, genders)) {\n filtered.add(thing);\n }\n }\n return filtered;\n }", "private void filterItems()\n {\n System.out.println(\"filtered items (name containing 's'):\");\n Set<ClothingItem> items = ctrl.filterItemsByName(\"s\");\n items.stream().forEach(System.out::println);\n }", "public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }", "private void collectUsingStream() {\n List<Person> persons =\n Arrays.asList(\n new Person(\"Max\", 18),\n new Person(\"Vicky\", 23),\n new Person(\"Ron\", 23),\n new Person(\"Harry\", 12));\n\n List<Person> filtered = persons\n .stream()\n .filter(p -> p.name.startsWith(\"H\"))\n .collect(Collectors.toList());\n\n System.out.println(\"collectUsingStream Filtered: \" + filtered);\n }", "protected List<Animal> createCatsAndDogs() {\n \n List<Animal> tempAnimals = new ArrayList<Animal>();\n Date tempNow = new Date();\n \n tempAnimals.add(new Animal(AnimalType.DOG, \n new Date(tempNow.getTime() - 10*DAY_IN_MILLISECONDS)));\n \n tempAnimals.add(new Animal(AnimalType.CAT, \n new Date(tempNow.getTime() - 9*DAY_IN_MILLISECONDS)));\n \n tempAnimals.add(new Animal(AnimalType.CAT, \n new Date(tempNow.getTime() - 8*DAY_IN_MILLISECONDS)));\n \n tempAnimals.add(new Animal(AnimalType.CAT, \n new Date(tempNow.getTime() - 7*DAY_IN_MILLISECONDS)));\n \n tempAnimals.add(new Animal(AnimalType.CAT, \n new Date(tempNow.getTime() - 6*DAY_IN_MILLISECONDS)));\n \n tempAnimals.add(new Animal(AnimalType.CAT, \n new Date(tempNow.getTime() - 3*DAY_IN_MILLISECONDS)));\n \n tempAnimals.add(new Animal(AnimalType.DOG, \n tempNow));\n \n return tempAnimals;\n }", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "public interface ArmorFilter {\n List<Equipment> filter(List<Equipment> equipmentList);\n}", "public abstract void filter();", "public Set<Sportive> filterByAge(int age){\n Iterable<Sportive> sportives = repo.findAll();\n return StreamSupport.stream(sportives.spliterator(), false).filter(sportive -> sportive.getAge()<age).collect(Collectors.toSet());\n }", "public ArrayList<Animal> filterAnimals(String field, int value) {\n ArrayList<Animal> filteredAnimals = new ArrayList<>();\n if (getAnimals().size() > 0)\n if (field.equals(\"year\"))\n filteredAnimals = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal.getYearOfBirth() == value)\n .collect(Collectors.toList());\n return filteredAnimals;\n }", "public void sortByBreed() {\n\t\tAnimalCompare animalCompare = new AnimalCompare();\n\t\tCollections.sort(animals, animalCompare);\n\t}", "private void watched(boolean w){\n for (Movie temp:\n baseMovieList) {\n if(temp.isWatched() == w)\n movieList.add(temp);\n }\n }", "public void makeNoise() {\n\t\tfor (Animal a : animals) {\n\t\t\ta.makeNoise();\n\t\t}\n\t}", "default Collection<ItemStack> getContentsMatching(Predicate<ItemStack> predicate) {\n\t\treturn this.getContents().values().stream().filter(predicate).collect(Collectors.toList());\n\t}", "List<Dish> selectByExample(DishExample example);", "public static List<Bunny> getListOfVeryCuteBunniesNamedSteve() {\n String selectionString = \"name='steve' AND cuteValue > 66\";\n// Long time = Calendar.getInstance().getTimeInMillis();\n QueryResultIterable<Bunny> iterable =\n cupboard().withDatabase(db).query(Bunny.class).withSelection(selectionString).query();\n List<Bunny> list = getListFromQueryResultIterator(iterable);\n return list;\n }", "public static void main(String[] args) {\n String[] animals = {\"Cat\", \"Dog\", \"Dog\", \"Bird\", \"Fish\", \"Cat\"};\n\n ArrayList<String> animalsList = new ArrayList<>(Arrays.asList(animals));\n System.out.println(animalsList);\n\n /*\n Remove Cat elements and print your ArrayList again\n\n EXPECTED RESULT:\n [Dog, Bird, Fish]\n */\n\n System.out.println(\"\\n---Removing-Cat-1st way creating a new list---\\n\");\n ArrayList<String> animalsWithoutCats = new ArrayList<>(); // empty at this line\n\n for(String element: animalsList){\n if(!element.equalsIgnoreCase(\"cat\")) animalsWithoutCats.add(element);\n }\n\n System.out.println(\"List after removing cats = \" + animalsWithoutCats);\n\n\n System.out.println(\"\\n---Removing-Dog-2nd way using iterator---\\n\");\n\n Iterator<String> myIterator = animalsList.iterator();\n\n while(myIterator.hasNext()){\n if(myIterator.next().equalsIgnoreCase(\"dog\")) myIterator.remove();\n }\n\n System.out.println(\"List after removing dogs = \" + animalsList);\n }", "public static List<Apple> filterApples4(List<Apple> inventory, ApplePredicate p) {\n List<Apple> result = new ArrayList<>();\n for(Apple apple: inventory){\n if(p.test(apple)){\n result.add(apple);\n }\n }\n return result;\n }", "public interface CollectionFilter<T> {\n Collection<Product> filter(Collection<T> toFilter);\n}", "public MusicFilter(List<Music> songs)\n {\n this.songs = songs;\n }", "FeatureHolder filter(FeatureFilter filter);", "@Override\n public Collection<SimpleModel> mungee(Collection<MockData> src) {\n return src\n .stream()\n .filter(data -> data.getContent() != null)\n .map(SimpleModel::build)\n .collect(Collectors.toList());\n }", "public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }", "ObservableList<Venue> getFilteredVenueList();", "private static List<Sticker> m33731b(Collection<Sticker> collection) {\n List<Sticker> arrayList = new ArrayList(collection.size());\n for (Sticker sticker : collection) {\n if (!sticker.isFriendmoji()) {\n arrayList.add(sticker);\n }\n }\n return arrayList;\n }", "public ArrayList<Dog> dogsOfBreed(String breed){\n ArrayList<Dog> dogsOfBreed = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getBreed().equals(breed)){\n dogsOfBreed.add(d);\n }\n }\n\n return dogsOfBreed;\n }", "public static List<Student> filterExample(){\n\t\tList<Student> genderFilter = StudentDataBase.getAllStudents().stream()\n\t\t\t\t.filter(stu->stu.getGender().equals(\"female\")).collect(Collectors.toList());\n\t\treturn genderFilter;\n\t}", "private List<Equipe> getFavoriteEquipes(List<Equipe> allEquipes) {\n\t\tList<Equipe> retain = new ArrayList<Equipe>(allEquipes.size());\n\t\tfor (Equipe equipe : allEquipes) {\n\t\t\tif (equipe.favorite) {\n\t\t\t\tretain.add(equipe);\n\t\t\t}\n\t\t}\n\t\treturn retain;\n\t}", "public interface CustomerSubsetFilterStrategy {\r\n Set<Customer> applyFilter(List<Customer> customers);\r\n}", "public void filterByMyMoodState(String selectedMoodState){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood event's mood state\n stateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getMoodState();\n // if it equals the selected mood state, then add it to the new list\n if (stateOfMood.equals(selectedMoodState)) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n if (matchesFilter(p)) {\n \tmainApp.getFilteredData().add(p);\n }\n }\n }", "@Override\n protected ArrayList<String> generateExclusions()\n {\n ArrayList<String> retVal = new ArrayList<>();\n switch (monsterList.get(monsterList.size() - 1))\n {\n case \"Spheric Guardian\":\n retVal.add(\"Sentry and Sphere\");\n break;\n case \"3 Byrds\":\n retVal.add(\"Chosen and Byrds\");\n break;\n case \"Chosen\":\n retVal.add(\"Chosen and Byrds\");\n retVal.add(\"Cultist and Chosen\");\n break;\n }\n return retVal;\n }", "@Override\n public void filter(String type) {\n\n List<Doctor> newDocs = new ArrayList<>();\n \n for (Doctor doctor : doctors) {\n //If doctor's specialization matches user searched specialization add to new doctor list\n if (doctor.getSpecialization()!=null && doctor.getSpecialization().equals(type)) {\n newDocs.add(doctor);\n }\n }\n \n //Set new doctor list as the doctor list\n doctors = newDocs;\n }", "@Test void filterAndSortMatches_Filtered() {\n\t\tvar matches = new DogArray<>(BowMatch::new, BowMatch::reset);\n\n\t\t// Limit is greater than the number of matches, before filtering\n\t\t// The filter will remove all odd ID and return half\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 100);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is greater than the number of matches, after filtering\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 27);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is less than the number of matches, after filtering\n\t\tfor (int limit = 5; limit < 20; limit++) {\n\t\t\tmatches.resize(50);\n\t\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, limit);\n\t\t\tassertEquals(limit, matches.size);\n\t\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\t\t}\n\t}", "public Artikel[] filterAll (Predicate<Artikel> ... predicates){\n Artikel [] temp = new Artikel[key];\n for (Predicate<Artikel> predicate : predicates) {\n temp = filter(predicate);\n }\n return temp;\n }", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "public static void addElementWildCard(List<? extends SuperAnimal> animals){\n animals.add(null);\n }", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "public static List<Apple> filter(List<Apple> apples, Predicate<Apple> predicate) {\n\n\t\tList<Apple> result = new ArrayList<>();\n\t\tfor (Apple apple : apples) {\n\t\t\tif (predicate.test(apple)) {\n\t\t\t\tresult.add(apple);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\n\t}", "@Override\n public final CardCollectionView getCards(final boolean filter) {\n\n CardCollectionView cards = super.getCards(false);\n if (!filter) {\n return cards;\n }\n\n boolean hasFilteredCard = false;\n for (Card c : cards) {\n if (c.isPhasedOut()) {\n hasFilteredCard = true;\n break;\n }\n }\n\n if (hasFilteredCard) {\n CardCollection filteredCollection = new CardCollection();\n for (Card c : cards) {\n if (!c.isPhasedOut()) {\n filteredCollection.add(c);\n }\n }\n cards = filteredCollection;\n }\n return cards;\n }", "public void filter(final List<ActivityDTO> activitiesCollection, final PersonModelView user)\n {\n List<ActivityDTO> activities = new LinkedList<ActivityDTO>();\n List<Long> activityIds = new LinkedList<Long>();\n \n // Need a List to preserve order.\n for (ActivityDTO activity : activitiesCollection)\n {\n activityIds.add(activity.getId());\n activities.add(activity);\n }\n \n List<List<Long>> likedCollection = getLikedActivityIdsByUserIdsMapper\n .execute(Arrays.asList(user.getEntityId()));\n \n List<Long> liked = null;\n \n if (likedCollection != null && likedCollection.size() > 0)\n {\n liked = likedCollection.iterator().next();\n }\n else\n {\n return;\n }\n \n List<List<Long>> likersCollection = getPeopleWhoLikedActivityMapper.execute(activityIds);\n List<Long> allLikerIds = new LinkedList<Long>();\n \n // Build list of all needed likers\n for (List<Long> likerList : likersCollection)\n {\n if (likerList.size() > likerLimit - 1)\n {\n allLikerIds.addAll(likerList.subList(0, likerLimit));\n }\n else\n {\n allLikerIds.addAll(likerList);\n }\n }\n \n List<PersonModelView> allLikersList = peopleMapper.execute(allLikerIds);\n \n Map<Long, PersonModelView> allLikersMap = new HashMap<Long, PersonModelView>();\n \n for (PersonModelView person : allLikersList)\n {\n allLikersMap.put(person.getId(), person);\n }\n \n for (int i = 0; i < activities.size(); i++)\n {\n ActivityDTO activity = activities.get(i);\n \n List<Long> likers = likersCollection.get(i);\n \n activity.setLikeCount(likers.size());\n \n List<PersonModelView> likersModels = new LinkedList<PersonModelView>();\n \n for (int j = 0; j < likers.size() && j < likerLimit - 1; j++)\n {\n likersModels.add(allLikersMap.get(likers.get(j)));\n }\n \n activity.setLikers(likersModels);\n activity.setLiked(liked.contains(activity.getId()));\n }\n }", "ObservableList<Patient> getFilteredPatientList();", "public void metodoDropWhile() {\n List<Dish> slicedMenu2\n = specialMenu.stream()\n .dropWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "@Override\n public Set PatientsWithCaughingAndFever() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>coughingAndFever = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getPatientMedicalRecord().getSymptoms().equals(\"Coughing\") || patient.getPatientMedicalRecord().getSymptoms().equals(\"Fever\")){\n coughingAndFever.add(patient);\n }else {\n System.out.println(\"No older patients with symptoms such as caughing and fever\");\n }\n });\n }\n\n return coughingAndFever;\n }", "public List<Animal> getTopThreeEndangeredAnimals(String envName);", "public static ArticleFilter all() {\n return new ArticleFilter() {\n @Override public boolean testArticle(PubmedArticle article) {\n return true;\n };\n };\n }", "ObservableList<Person> getFilteredPersonList();", "FeatureHolder filter(FeatureFilter fc, boolean recurse);", "protected SuspectList filterSuspectList(SuspectList baseList, Set<Set<PolicyTerm>> termGroups) {\n\t\tSuspectList suspects = new SuspectList();\n\t\t//TODO: avoid repeating the same filtering by caching filtering result?\n\t\tfor (Set<PolicyTerm> termGroup : termGroups) {\n\t\t\tSuspectList sl = new SuspectList(baseList);\n\t\t\tfor (PolicyTerm term : termGroup) {\n\t\t\t\tif (term.isStatic()) {\n\t\t\t\t\t// ignore dynamic terms when filtering\n\t\t\t\t\tsl.filter(term);\n\t\t\t\t\tif (sl.size() == 0) {\n\t\t\t\t\t\t// Empty set's union with any other set will be empty.\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsuspects.addAll(sl);\n\t\t}\n\t\treturn suspects;\n\t}", "public Artikel [] filter(Predicate<Artikel> predicate) {\n Artikel[] filteredList = new Artikel[key];\n Artikel [] liste = new Artikel[key];\n int i = 0;\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n liste[i] = integerArtikelEntry.getValue();\n i++;\n }\n int p = 0;\n for (i = 0; i < key; i++) {\n if (predicate.test(liste[i])) {\n filteredList[p] = liste [i];\n p++;\n }\n }\n liste = filteredList;\n return liste;\n }", "List<BirdIdProjection> fetchAllVisibleBirds();", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "public static Stream<StreamAnimal> generateStreamOfAnimals_lambda() {\n\n Stream<StreamAnimal> resultStream = Stream.generate(\n () -> getNewAnimal()\n );\n\n return resultStream;\n }", "public ArrayList<Dog> dogsOfGender(String gender){\n ArrayList<Dog> dogsOfGender = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getGender().equals(gender)){\n dogsOfGender.add(d);\n }\n }\n\n return dogsOfGender;\n }", "private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}", "public Set<Sportive> getAll(){\n Iterable<Sportive> sportives = repo.findAll();\n return StreamSupport.stream(sportives.spliterator(), false).collect(Collectors.toSet());\n }", "@Override\n public boolean shouldFilter() {\n return true;\n }", "public Map<String, Kingdom> generateAllRulers() {\n Map<String, String> kingdomWithAnimal;\n kingdomWithAnimal = kingdomRepository.getRulersWithAnimal();\n Map<String, Kingdom> kingdoms = new HashMap<>();\n for (String emblem : kingdomWithAnimal.keySet()) {\n Kingdom kingdom = new Kingdom(emblem, kingdomWithAnimal.get(emblem));\n kingdom.makeCipherFromAnimalName();\n kingdoms.put(emblem, kingdom);\n }\n return kingdoms;\n }", "@Test\n\tpublic void generateApples() throws Exception {\n\t\tappleList.stream().filter(apple -> apple.getColor().equals(\"green\")).\n\t\t\t\tfilter(apple -> apple.getWeight() > 5).\n\t\t\t\tlimit(7).\n\t\t\t\tforEach(System.out::print);\n\t}", "public void filterArticles() {\n filterAgent.score(articles, filterType);\n articles = insertionSort(articles); // sorted articles list\n\n refreshTable();\n if (articles.size() > 0) {\n currentArt = (NewsArticle) articles.elementAt(0);\n }\n }", "public<T> List<T> takeWhile(final Collection<T> collection, final Filter<T> filter ){\t\t\n\t\tList<T> result = create.createLinkedList();\n\t\tfor(T t:query.getOrEmpty(collection)){\t\t\t\n\t\t\tif(!filter.applicable(t)){\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult.add(t);\n\t\t}\n\t\treturn result;\n\t}", "public static List<Apple> filterApples(List<Apple> inventory, String color,\n int weight, boolean flag) {\n List<Apple> result = new ArrayList<>();\n for (Apple apple: inventory){\n if ( (flag && apple.getColor().equals(color)) ||\n (!flag && apple.getWeight() > weight) ){\n result.add(apple);\n }\n }\n return result;\n }", "List<Whisky> findWhiskiesByAgeAndDistilleryNamed(String name, int age);", "private void populatepets(){\r\n\t\tpets.add(new Cat(\"UnNamed\"));\r\n\t\tpets.add(new Cow(\"UnNamed\"));\r\n\t\tpets.add(new Dog(\"UnNamed\"));\r\n\t\tpets.add(new Rabbit(\"UnNamed\"));\r\n\t\tpets.add(new Rat(\"UnNamed\"));\r\n\t\tpets.add(new Velociraptor(\"UnNamed\"));\r\n\t}", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "public interface SightingFilterFunction {\n\t/**\n\t * Takes in a list of sightings and returns the ones which are valid.\n\t * Can additionally be used to combine sightings using the Sighting.addSighting() method if \n\t * user-supplied logic determines that a single instance of a target has been split into two\n\t * sightings.\n\t * @param rawSightings the unfiltered list of Sightings\n\t * @return the Sightings from rawSightings that are valid according to user-defined logic.\n\t */\n\tpublic ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);\n}", "Collection<T> doFilter(RepositoryFilterContext context);", "public void filterByFoMoodState(String selectedMoodState){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood event's mood state\n stateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getMoodState();\n // if it equals the selected mood state, then add it to the new list\n if (stateOfMood.equals(selectedMoodState)) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public TrainSet filterPassengers(Object value)\n {\n ObjectSet neighbors = new ObjectSet();\n\n if (value instanceof Collection)\n {\n neighbors.addAll((Collection<?>) value);\n }\n else\n {\n neighbors.add(value);\n }\n \n TrainSet answer = new TrainSet();\n \n for (Train obj : this)\n {\n if ( ! Collections.disjoint(neighbors, obj.getPassengers()))\n {\n answer.add(obj);\n }\n }\n \n return answer;\n }", "@Override\n public Filter getFilter() {\n\n return new Filter() {\n @Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n\n String charString = charSequence.toString();\n\n if (charString.isEmpty()) {\n\n mDataset = mArrayList;\n } else {\n\n ArrayList<DataObject> filteredList = new ArrayList<>();\n\n for (DataObject data : mArrayList) {\n\n if (data.getid().toLowerCase().contains(charString.toLowerCase()) || data.getname().toLowerCase().contains(charString.toLowerCase())) {\n\n filteredList.add(data);\n }\n }\n\n mDataset = filteredList;\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = mDataset;\n return filterResults;\n }\n\n @Override\n protected void publishResults(CharSequence charSequence, FilterResults filterResults) {\n mDataset = (ArrayList<DataObject>) filterResults.values;\n notifyDataSetChanged();\n }\n };\n }", "public void setupMorphs(IMorphing morphing)\n {\n /* Collect all variations into one cells */\n Map<String, MorphType> separated = new HashMap<String, MorphType>();\n int i = 0;\n\n for (AbstractMorph morph : morphing.getAcquiredMorphs())\n {\n MorphType list = separated.get(morph.name);\n\n if (list == null)\n {\n list = new MorphType();\n separated.put(morph.name, list);\n }\n\n list.morphs.add(new MorphCell(i, morph));\n i++;\n }\n\n /* Clear the morphs and add all merged morphs */\n this.morphs.clear();\n this.morphs.addAll(separated.values());\n\n if (this.showFavorites)\n {\n Iterator<MorphType> it = this.morphs.iterator();\n\n while (it.hasNext())\n {\n MorphType type = it.next();\n\n if (!type.hasFavorites())\n {\n it.remove();\n continue;\n }\n\n Iterator<MorphCell> cellIt = type.morphs.iterator();\n\n while (cellIt.hasNext())\n {\n if (!cellIt.next().morph.favorite)\n {\n cellIt.remove();\n }\n }\n }\n }\n\n int j = 0;\n\n for (MorphType type : this.morphs)\n {\n for (MorphCell cell : type.morphs)\n {\n cell.typeIndex = j;\n }\n\n j++;\n }\n\n /* Sort those morphs alphabetically */\n Collections.sort(this.morphs, new Comparator<MorphType>()\n {\n @Override\n public int compare(MorphType a, MorphType b)\n {\n return a.morphs.get(0).morph.name.compareTo(b.morphs.get(0).morph.name);\n }\n });\n\n this.index = MathHelper.clamp_int(this.index, -1, this.getMorphCount() - 1);\n }", "public ArrayOfAnimalModel getAnimals() {\n return localAnimals;\n }", "void filterAdvancedScenarios(boolean fingerprints, boolean updatePreference) {\n\tthis.results.setFingerprints(fingerprints);\n\tif (fingerprints) {\n\t\tthis.viewFilters.add(FILTER_ADVANCED_SCENARIOS);\n\t} else {\n\t\tthis.viewFilters.remove(FILTER_ADVANCED_SCENARIOS);\n\t}\n\tthis.preferences.putBoolean(IPerformancesConstants.PRE_FILTER_ADVANCED_SCENARIOS, fingerprints);\n\tupdateFilters();\n}", "public static List<Apple> filterApples(List<Apple> inventory, String color, int weight, boolean flag) {\n List<Apple> result = new ArrayList<>();\n\n for (Apple apple : inventory) {\n if ((flag && apple.getColor().equals(color)) || (!flag && apple.getWeight() > weight)) {\n result.add(apple);\n }\n }\n\n return result;\n }", "@Override\n public List<MongoPrideAssay> filterByAttributes(List<Triple<String, String, String>> filters) {\n Query queryMongo = PrideMongoUtils.buildQuery(filters);\n return mongoTemplate.find(queryMongo, MongoPrideAssay.class);\n }", "public abstract Filter<T> filter();", "@Override\r\n\tpublic List<Animal> getAllAnimals() {\n\t\treturn dao.findAll();\r\n\t}", "@Test\n public void filterDishes5() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Thighs Fish/Prawns\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Thighs Fish/Prawns\");\n }", "@Test\n public void filterDishes6() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Beer\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Beer\");\n }", "public void filterMapExample() {\n List<String> result = createPeople()\n .stream()\n .filter(predicate)\n .map(Person::getName)\n .map(String::toUpperCase)\n .collect(Collectors.toUnmodifiableList());\n print.accept(result);\n }", "public ArrayList<Dog> dogsOfSize(String size){\n ArrayList<Dog> dogsOfSize = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getSize().equals(size)){\n dogsOfSize.add(d);\n }\n }\n\n return dogsOfSize;\n }", "public void vampireAdd(){\n //Will permit to know if every vampires are different\n Set<Being> swap = new HashSet();\n\n //Iterate till the set is equal to the number of vampire we need\n while(swap.size() != this.vampires){\n //Create a new vampire\n Vampire vamp = vampireSet();\n //Test if the vampire is unique\n if(swap.add(vamp)){\n //Add the vampire to the real list if it's unique\n this.beings.add(vamp);\n }\n }\n //Clear the set, I guess it's optional\n swap.clear();\n }", "public Set<Sportive> filterByFirstName(String st){\n Iterable<Sportive> materials = repo.findAll();\n return StreamSupport.stream(materials.spliterator(), false).filter(sportive -> sportive.getFirstName().contains(st)).collect(Collectors.toSet());\n }", "public GroupsOnlySenseFilter() {\n \n }", "private void filterClub(String filter) throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs matching the filter type \r\n ArrayList<JSONObject> clubs = new ArrayList<>();\r\n \r\n // check clubs to see if they match the type input by the user\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n \r\n if (filter.equals(profile.get(\"type\").toString()))\r\n \t clubs.add(profile);\r\n }\r\n \r\n if (clubs.isEmpty()) {\r\n \t logger.log(Level.INFO, \"There are no clubs matching that type.\");\r\n \t displayFilter();\r\n }\r\n else \r\n \t filter(clubs); \r\n}", "public abstract Collection<PlayerFish> getPlayers();", "ObservableList<Appointment> getFilteredAppointmentList();", "@Override\n\tpublic boolean shouldFilter() {\n\t\treturn true;\n\t}", "public Plan() {\n animals = new ArrayList<>();\n }", "@Override\n public void setEdibleAnimals() {\n addPrey(Rabbit.SPECIES);\n }" ]
[ "0.6377842", "0.5929486", "0.56758887", "0.56592053", "0.56504655", "0.55920666", "0.55386347", "0.5532748", "0.5384654", "0.53698057", "0.5353024", "0.5346001", "0.53341556", "0.52760124", "0.5257586", "0.52384204", "0.5193432", "0.5136823", "0.5135125", "0.51280993", "0.5088297", "0.5082219", "0.50467", "0.49959326", "0.49883085", "0.49862927", "0.49782553", "0.49702427", "0.49692702", "0.49664646", "0.4962338", "0.49578947", "0.49345052", "0.4928711", "0.49086964", "0.49077797", "0.490773", "0.48836797", "0.4870653", "0.4869659", "0.48525342", "0.48244452", "0.48010957", "0.4800036", "0.47967124", "0.47961858", "0.47917098", "0.47896305", "0.4775773", "0.4772719", "0.4769524", "0.4767146", "0.47545975", "0.47539228", "0.47370103", "0.472089", "0.47203434", "0.47173956", "0.4714648", "0.47026327", "0.46991727", "0.4682055", "0.46772024", "0.4675617", "0.4673749", "0.46730864", "0.46705887", "0.4669305", "0.46669745", "0.46655506", "0.46626058", "0.46529704", "0.46504205", "0.46497363", "0.4649665", "0.46139926", "0.46098444", "0.460792", "0.45974317", "0.45946568", "0.4593528", "0.45934254", "0.45924786", "0.4591607", "0.45907632", "0.45891863", "0.4587381", "0.4584001", "0.45836717", "0.4582451", "0.4575193", "0.45723945", "0.4569789", "0.45683873", "0.45658693", "0.45598793", "0.4559663", "0.45579103", "0.45531964", "0.45459872" ]
0.7199988
0
Created by Anton on 18.09.2014.
public interface Destination { public String readLabel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private void poetries() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\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 comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private stendhal() {\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 jugar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public void method_4270() {}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\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\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo4359a() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void mo21877s() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\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 initialize() {\n\n \n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n }", "public abstract void mo70713b();", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n protected void init() {\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 }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public void m23075a() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void skystonePos4() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void jugar() {}", "public void mo21779D() {\n }", "@Override\n public int getOrder() {\n return 4;\n }" ]
[ "0.5863147", "0.5804755", "0.57917285", "0.5751191", "0.5698817", "0.5660505", "0.56580925", "0.56580925", "0.56552124", "0.56350964", "0.5629163", "0.5624106", "0.5609534", "0.5607706", "0.5603585", "0.5597105", "0.5574526", "0.55695426", "0.55685526", "0.5545798", "0.5525493", "0.5513908", "0.54991966", "0.5497312", "0.5486861", "0.5485195", "0.54812026", "0.5471955", "0.54661655", "0.5450697", "0.54423195", "0.54003525", "0.53861177", "0.5375373", "0.5375373", "0.5375373", "0.5375373", "0.5375373", "0.5374455", "0.53721356", "0.53418815", "0.53150666", "0.52826023", "0.52768725", "0.52760845", "0.52760845", "0.5266362", "0.52659464", "0.52657026", "0.52376", "0.5235406", "0.5235406", "0.5235406", "0.5232393", "0.5222003", "0.5222003", "0.5216409", "0.5209558", "0.5209037", "0.52034986", "0.5199862", "0.51956505", "0.51900595", "0.51895165", "0.51866275", "0.51832885", "0.51832885", "0.51832885", "0.51757777", "0.5171398", "0.5171398", "0.5171398", "0.51679766", "0.51647246", "0.5164636", "0.5163848", "0.5160801", "0.51532507", "0.51526517", "0.51526517", "0.51526517", "0.51526517", "0.51526517", "0.51526517", "0.51526517", "0.51432794", "0.5139745", "0.5138946", "0.51319766", "0.51319766", "0.512879", "0.51275235", "0.51275074", "0.5126481", "0.5117427", "0.51151323", "0.51128715", "0.51097465", "0.5107131", "0.5102721", "0.50962764" ]
0.0
-1
No further instances allowed
private Swiftbuy() { super("swiftbuy"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isAllowed(ProcessInstance instance) {\r\n return true; // xoxox\r\n }", "private boolean isEmpty(){\n return (numInstances() == 0);\n }", "@Override\n public boolean isInstantiable() {\n return false;\n }", "public Instances notCoveredBy(Instances data) {\n\n Instances r = new Instances(data, data.numInstances());\n Enumeration enu = data.enumerateInstances();\n while (enu.hasMoreElements()) {\n\tInstance i = (Instance) enu.nextElement();\n\tif (resultRule(i) == -1) {\n\t r.add(i);\n\t}\n }\n r.compactify();\n return r;\n }", "private void notEligibleForRealMax() {\n eligibleForRealMax = false;\n }", "private boolean holds(Instance inst) {\n\t\n if(numInstances() == 0)\n\treturn false;\n\n for(int i = 0; i < numAttributes(); i++){\n\tif(i != classIndex() && !holds(i, inst.value(i)))\n\t return false;\n }\n return true;\n }", "public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }", "private void notEligibleForRealMin() {\n eligibleForRealMin = false;\n }", "public boolean action_allowed(){\r\n\t\treturn action_holds.size()==0;\r\n\t}", "boolean hasInstance();", "public boolean isInstantiationAllowed(Class cl) {\r\n\t\tif (_sess.isNew())\r\n\t\t\treturn false;\r\n\t\tBoolean bAllowed = (Boolean) _sess.getAttribute(_reflectionallowedattribute);\r\n\t\tif (bAllowed != null && !bAllowed.booleanValue())\r\n\t\t\treturn false;\r\n\t\treturn super.isInstantiationAllowed(cl);\r\n\t}", "public abstract boolean isNextBlocked();", "private boolean noVacancy() {\r\n\t\t\treturn removed = false;\r\n\t\t}", "protected boolean asEaten() {\n return false;\n }", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "@Override\n\tprotected boolean canDespawn() {\n\t\treturn false;\n\t}", "public boolean canDespawn()\n {\n return false;\n }", "@java.lang.Override\n public boolean hasInstance() {\n return stepInfoCase_ == 5;\n }", "public boolean verifyNoInactives() {\n\t\treturn !btnInactives.isEnabled();\n\n\t}", "@java.lang.Override\n public boolean hasInstance() {\n return stepInfoCase_ == 5;\n }", "private int calculateAllowedInstances() throws Exception {\n int maxAllowed = -1;\n\n CloudStackAccount ourAccount = getCurrentAccount();\n\n if (ourAccount == null) {\n // This should never happen, but\n // we will return -99999 if this happens...\n return -99999;\n }\n\n // if accountType is Admin == 1, then let's return -1\n if (ourAccount.getAccountType() == 1)\n return -1;\n\n // -> get the user limits on instances\n // \"0\" represents instances:\n // http://download.cloud.com/releases/2.2.0/api_2.2.8/user/listResourceLimits.html\n List<CloudStackResourceLimit> limits = getApi().listResourceLimits(null, null, null, null, \"0\");\n if (limits != null && limits.size() > 0) {\n maxAllowed = (int)limits.get(0).getMax().longValue();\n if (maxAllowed == -1)\n return -1; // no limit\n\n EC2DescribeInstancesResponse existingVMS = listVirtualMachines(null, null, null);\n EC2Instance[] vmsList = existingVMS.getInstanceSet();\n return (maxAllowed - vmsList.length);\n } else {\n return 0;\n }\n }", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "public boolean isValid() {\n return instance != null;\n }", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@RequiresLock(\"SeaLock\")\r\n protected void dependentInvalidAction() {\r\n // by default do nothing\r\n }", "private boolean removePermitted(Collection removeInstances) {\n for (Object removeInstance : removeInstances) {\n Entity next = (Entity) removeInstance;\n if (!removePermitted(next.getMetaClass()))\n return false;\n }\n return true;\n }", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\tpublic void list_invalidParent() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_invalidParent();\r\n\t\t}\r\n\t}", "void noNewLoans();", "@Override\r\n\tpublic void list_validParentNoChildren() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_validParentNoChildren();\r\n\t\t}\r\n\t}", "boolean hasInstantiatePermission();", "public boolean canDespawn()\n {\n return true;\n }", "public boolean isLegal() {\n return !this.isBroken() && (this.getId() >= 0 || !this.isExisted());\n }", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "@Override\n\tpublic boolean rejectIt() {\n\t\treturn false;\n\t}", "private boolean hasInfiniteAge() {\n\t\treturn (maximum_age < 0);\n\t}", "public void reject(){\n ArrayList<User> u1 = new ArrayList<User>();\n u1.addAll(Application.getApplication().getNonValidatedUsers());\n u1.remove(this);\n\n Application.getApplication().setNonValidatedUsers(u1);\n }", "boolean hasResMineInstanceID();", "private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }", "@Override\n\t\tpublic boolean isInvalid() {\n\t\t\treturn false;\n\t\t}", "private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }", "private boolean onlyInstance(){\n File dir1 = new File (\".\");\n String location=\"\";\n\n try{\n location = dir1.getCanonicalPath();\n } catch (IOException e) {\n }\n File temp = new File(location+\"\\\\holder.tmp\");\n\n if (!temp.exists())\n return true;\n else\n {\n int result = JOptionPane.showConfirmDialog(null,\n \"Instance of TEWIN already running (or at least I think it is)!\\n\" +\n \"Click YES to load anyway, or NO to exit\",\"I think I'm already running\",\n JOptionPane.YES_NO_OPTION);\n if(result == JOptionPane.YES_OPTION)\n {\n temp.delete();\n return true;\n }else\n return false;\n }\n \n }", "public Boolean isProhibited() {\n throw new NotImplementedException();\n }", "public void terminateAllRemainingInstances() {\n for (Iterator<MemberContext> iterator = activeMembers.iterator(); iterator.hasNext(); ) {\n MemberContext member = iterator.next();\n iterator.remove();\n terminateForcefully(member.getMemberId());\n }\n\n // Forcefully deleting remaining pending members\n for (Iterator<MemberContext> iterator = pendingMembers.iterator(); iterator.hasNext(); ) {\n MemberContext member = iterator.next();\n iterator.remove();\n terminateForcefully(member.getMemberId());\n }\n\n /// Forcefully deleting remaining termination pending members\n for (Iterator<MemberContext> iterator = terminationPendingMembers.iterator(); iterator.hasNext(); ) {\n MemberContext member = iterator.next();\n // Remove the current element from the iterator and the list.\n iterator.remove();\n terminateForcefully(member.getMemberId());\n }\n\n\n // Forcefully deleting remaining obsolete members\n for (Map.Entry<String, MemberContext> entry : obsoletedMembers.entrySet()) {\n MemberContext ObsoleteMemberContext = entry.getValue();\n obsoletedMembers.remove(entry.getKey());\n terminateForcefully(ObsoleteMemberContext.getMemberId());\n }\n }", "public boolean isInhibited() {\n return inhibited;\n }", "@java.lang.Override\n public boolean hasInstantiatePermission() {\n return instantiatePermission_ != null;\n }", "public boolean canCreateAnother() {\n\t\treturn new Date(startDate.getTime() + duration + cooldown)\n\t\t\t\t.before(new Date());\n\t}", "public boolean isVacant() {\r\n\treturn !isOccupied() || !isAvailable();\r\n }", "default boolean isSharded() {\n return false;\n }", "private void ensureScopeNotSet() {\n if (this.instance != null) {\n binder.addError(source, ErrorMessages.SINGLE_INSTANCE_AND_SCOPE);\n return;\n }\n\n if (this.scope != null) {\n binder.addError(source, ErrorMessages.SCOPE_ALREADY_SET);\n }\n }", "@Override\n\tpublic Instances getInstances() {\n\t\treturn null;\n\t}", "public void notAlive() {\n\n for (var i = ownedAnimals.size() - 1; i >= 0; i--) {\n if (ownedAnimals.get(i).healthPoints <= 0) {\n System.out.println(\"The \"\n + ownedAnimals.get(i).type\n + \" \" + ownedAnimals.get(i).animalName\n + \" died\");\n ownedAnimals.remove(i);\n\n\n }\n\n\n }\n }", "private boolean isIllegalTokenCollectionForRuleOne(int elapsedTimeInSeconds) {\n int interval = elapsedTimeInSeconds / 10;\n int intervalModTwo = interval % 2;\n return intervalModTwo == 0;\n }", "private boolean isBlocked() {\n return block_state <= 1;\n }", "public boolean notAlive() {\r\n\r\n if (LOG.isLoggable(Level.FINEST)) {\r\n LOG.finest(\"notAlive ( ) called \");\r\n }\r\n\r\n return !alive();\r\n }", "public boolean isDontCare(){\n return hasDontCare;\n }", "boolean isLimited();", "@Override\n\tpublic long countMemberExcep() {\n\t\treturn 0;\n\t}", "public boolean isAllowed() {\n \t\treturn isAllowed;\n \t}", "public boolean isEffective() {\n return !this.isBroken() && !this.isExisted() && this.getId() < 0;\n }", "public boolean isOverPaymentAllowed() {\n\t\treturn false;\n\t}", "@Override\r\n public boolean isSafe() {\n return false;\r\n }", "public InstanceOverflowException() {\n\t\tsuper();\n\t}", "public boolean canRespawnHere()\n {\n return false;\n }", "@Override\n public boolean active() {\n return false;\n }", "private ObjActiveNotPlanned() {\n\t\tsuper(\"OBJ_ACTIVE_NOT_PLANNED\", Wetrn.WETRN);\n\n\t\t// Initialise data type\n\t\tgetDataType();\n\t}", "@Override public boolean isValidated()\n{\n if (location_set.size() == 0 || !have_join) return false;\n\n return true;\n}", "private DiscretePotentialOperations() {\r\n\t}", "@Override\r\n\tpublic StateBruceDanner swallowSubstance() {\n\t\treturn NON_CONTAMINED;\r\n\t}", "public void isDeceased(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "private void clearBlocked() {\n\n blocked_ = false;\n }", "private ClassInstance checkClassInstanceDefinition(ParseTreeNode instanceNode) {\r\n \r\n instanceNode.verifyType(CALTreeParserTokenTypes.INSTANCE_DEFN);\r\n \r\n ParseTreeNode optionalCALDocNode = instanceNode.firstChild();\r\n optionalCALDocNode.verifyType(CALTreeParserTokenTypes.OPTIONAL_CALDOC_COMMENT);\r\n \r\n ParseTreeNode instanceNameNode = optionalCALDocNode.nextSibling();\r\n //do most of the checking for the part of the instance declaration that occurs between the \"instance\" and \"where\" keywords. \r\n ClassInstance classInstance = resolveInstanceName (instanceNameNode);\r\n \r\n ParseTreeNode instanceMethodListNode = instanceNameNode.nextSibling();\r\n instanceMethodListNode.verifyType(CALTreeParserTokenTypes.INSTANCE_METHOD_LIST);\r\n \r\n TypeClass typeClass = classInstance.getTypeClass();\r\n \r\n Set<String> instanceMethodNamesSet = new HashSet<String>();\r\n \r\n for (final ParseTreeNode instanceMethodNode : instanceMethodListNode) {\r\n \r\n instanceMethodNode.verifyType(CALTreeParserTokenTypes.INSTANCE_METHOD);\r\n \r\n ParseTreeNode optionalInstanceMethodCALDocNode = instanceMethodNode.firstChild();\r\n optionalInstanceMethodCALDocNode.verifyType(CALTreeParserTokenTypes.OPTIONAL_CALDOC_COMMENT);\r\n \r\n ParseTreeNode instanceMethodNameNode = optionalInstanceMethodCALDocNode.nextSibling();\r\n instanceMethodNameNode.verifyType(CALTreeParserTokenTypes.VAR_ID); \r\n String instanceMethodName = instanceMethodNameNode.getText(); \r\n \r\n if (!instanceMethodNamesSet.add(instanceMethodName)) {\r\n //each instance method can be defined only once\r\n compiler.logMessage(new CompilerMessage(instanceMethodNameNode, new MessageKind.Error.MethodDefinedMoreThanOnce(instanceMethodName, classInstance.getNameWithContext())));\r\n continue; \r\n }\r\n \r\n ClassMethod classMethod = typeClass.getClassMethod(instanceMethodName);\r\n if (classMethod == null) {\r\n //instance method must first be declared by the type class that the instance is an instance of\r\n compiler.logMessage(new CompilerMessage(instanceMethodNameNode, new MessageKind.Error.MethodNotDeclaredByClass(instanceMethodName, typeClass.getName().getQualifiedName())));\r\n continue;\r\n }\r\n \r\n ParseTreeNode resolvingFunctionNameNode = instanceMethodNameNode.nextSibling();\r\n QualifiedName resolvingFunctionName = resolveResolvingFunction(resolvingFunctionNameNode);\r\n classInstance.addInstanceMethod(classMethod, resolvingFunctionName); \r\n }\r\n \r\n //check that the instance has an instance method defined for each class method in the type class that does not have\r\n //a default class method.\r\n if (typeClass.getNClassMethods() != instanceMethodNamesSet.size()) {\r\n \r\n //(String set) the class methods that are required to be implemented (because they have no defaults) but were not in this instance.\r\n Set<String> unimplementedMethodsNamesSet = new LinkedHashSet<String>();\r\n {\r\n for (int i = 0, nClassMethods = typeClass.getNClassMethods(); i < nClassMethods; ++i) {\r\n ClassMethod classMethod = typeClass.getNthClassMethod(i);\r\n if (!classMethod.hasDefaultClassMethod()) {\r\n unimplementedMethodsNamesSet.add(classMethod.getName().getUnqualifiedName());\r\n }\r\n }\r\n \r\n unimplementedMethodsNamesSet.removeAll(instanceMethodNamesSet);\r\n }\r\n \r\n for (final String methodName : unimplementedMethodsNamesSet) {\r\n \r\n // ClassInstanceChecker: the method {methodName} is not defined by the instance {classInstance.getNameWithContext()}.\r\n compiler.logMessage(new CompilerMessage(instanceNode, new MessageKind.Error.MethodNotDefinedByInstance(methodName, classInstance.getNameWithContext())));\r\n }\r\n }\r\n \r\n return classInstance;\r\n }", "@Override\n boolean canFail() {\n return true;\n }", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "public boolean getCanSpawnHere()\r\n {\r\n return false;\r\n }", "boolean decrementPlannedInstances();", "public boolean canBeUsed(){\n\t\treturn !(this.isUsed);\n\t}", "@Override\n\tpublic boolean reserve() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void selfValidate() {\n\t\t\n\t}", "private void checkForOverlappingInstances(ParseTreeNode moduleDefnNode) {\r\n moduleDefnNode.verifyType(CALTreeParserTokenTypes.MODULE_DEFN); \r\n checkForOverlappingInstances(moduleDefnNode, currentModuleTypeInfo, new HashSet<ModuleName>(), new HashMap<ClassInstanceIdentifier, ClassInstance>()); \r\n }", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "public static boolean hasInstance()\n\t{\n \tif(wdba == null)\n \t\treturn false;\n \telse\n \t\treturn true;\n\t}", "@Override\r\n\tpublic void list_validParent() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_validParent();\r\n\t\t}\r\n\t}", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "public boolean isAllowed() {\n return isAllowed;\n }", "public abstract int getMinInstances();", "@Override\n public boolean isAccountNonExpired () {\n return true;\n }", "public boolean hasInstantiatePermission() {\n return instantiatePermissionBuilder_ != null || instantiatePermission_ != null;\n }", "private void checkDestroyed() {\n if (destroyed) {\n IllegalStateException e = new IllegalStateException(\n String.format(\"Attempting to use destroyed token: %s\", this));\n throw e;\n }\n }", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "public abstract boolean isRestricted();", "public boolean canRespawnHere() {\n\t\treturn false;\n\t}", "public Boolean shouldAbandon() {\n return false;\n }", "@Test\r\n public void NegativeTestisMember1() {\r\n Assert.assertNotEquals(true, set1.isMember(10));\r\n }", "@Override\n public boolean isSingleton() {\n return false;\n }", "public boolean isDontCare() {\r\n\t\treturn dontCare;\r\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }" ]
[ "0.67594016", "0.6251031", "0.59999865", "0.5938237", "0.58646846", "0.585787", "0.5810515", "0.57986826", "0.5791139", "0.5781252", "0.5724278", "0.56935054", "0.56888044", "0.5685522", "0.56732947", "0.5647899", "0.5631567", "0.5616412", "0.561355", "0.55945885", "0.5539294", "0.5532164", "0.5523499", "0.55114", "0.55114", "0.55114", "0.5508974", "0.5499827", "0.54895437", "0.5460685", "0.5433688", "0.543326", "0.5425061", "0.5424733", "0.5420722", "0.54196995", "0.5414063", "0.54132307", "0.54094267", "0.5406843", "0.5402829", "0.5381395", "0.5376887", "0.5367288", "0.5359597", "0.5359153", "0.5348912", "0.5343423", "0.5330094", "0.5329687", "0.5328271", "0.5322795", "0.53212565", "0.5320647", "0.5319204", "0.5317152", "0.5311821", "0.5307472", "0.53056324", "0.5295491", "0.5290852", "0.5288976", "0.52843225", "0.52791584", "0.5275023", "0.5271431", "0.5266888", "0.5258411", "0.5253544", "0.5241194", "0.5239226", "0.5230106", "0.5225849", "0.5216513", "0.52152425", "0.5208282", "0.5208282", "0.5204208", "0.52026194", "0.5201823", "0.5196587", "0.51964474", "0.5194939", "0.51846397", "0.5182005", "0.5174942", "0.5170607", "0.5165236", "0.51611316", "0.5155053", "0.51548845", "0.5152556", "0.51484424", "0.5145009", "0.5142179", "0.51381177", "0.51380587", "0.5136529", "0.5135936", "0.51350015", "0.51350015" ]
0.0
-1
pg_dump i h localhost p 5432 U postgres F c b v f "/usr/local/backup/10.70.0.61.backup" old_db
public Process backupIt(String fileAndPath) { try { //F olarak t verildi yani tar dosya biçimi final ProcessBuilder pb = new ProcessBuilder(commandPath + "pg_dump.exe", "-f", fileAndPath, "-F", "t", "-v", "-h", IP, "-U", user, dbase); pb.environment().put("PGPASSWORD", password); pb.redirectErrorStream(true); return pb.start(); } catch (IOException ex) { ex.getMessage(); ex.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean dumpDatabase() {\n Statement stm = null;\n try {\n stm = getConnection().createStatement();\n stm.executeUpdate(\"backup to db/backup.db\");\n }\n catch(Exception e) {\n e.printStackTrace();\n return false;\n }\n finally {\n try {\n stm.close();\n }\n catch (Exception e) { \n e.printStackTrace();\n }\n }\n return true;\n }", "public static void backup3(String args[]) {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n\t\tString currentTime = dateFormat.format(calendar.getTime());\n\t\tProcess p = null;\n\t\tPrintStream print = null;\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (String a : args) {\n\t\t\tbuf.append(a);\n\t\t\tbuf.append(\" \");\n\t\t}\n\t\tString databases = buf.toString();\n\t\tSystem.out.println(databases);\n\t\ttry {\n\t\t\tp = runtime.exec(\"cmd /c mysqldump -uroot -p1234 -B \" + databases\n\t\t\t\t\t+ \">\" + currentTime + \".sql.bak\");\n\t\t} catch (IOException e) {\n\t\t\tif (p != null) {\n\t\t\t\tp.destroy();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprint = new PrintStream(currentTime + \"_backup_err.log\");\n\t\t\t\tdateFormat.applyPattern(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tcurrentTime = dateFormat.format(calendar.getTime());\n\t\t\t\tprint.println(currentTime + \" backup failed.\");\n\t\t\t\te.printStackTrace(print);\n\t\t\t\tprint.flush();\n\t\t\t} catch (IOException e2) {\n\n\t\t\t} finally {\n\t\t\t\tif (print != null) {\n\t\t\t\t\tprint.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static boolean restaurar_archivo_backup_pg_win(String archivo,String usuario,String clave,String db,String host) \r\n {\n String objeto = \"-i -h \"+host+\" -p \"+Global.puerto_pg+\" -U \"+usuario+\" -d \"+db+\" -v \"+archivo;\r\n boolean eje = false;\r\n int res=0;\r\n try {\r\n Terminal.restaurar_backup_pg_win(host, \"5432\",usuario,clave, db, archivo);\r\n \r\n } catch (Exception ex) {\r\n System.out.println(\"Error \" + ex.getMessage());\r\n }\r\n return eje;\r\n }", "private void backUpDb() throws FileNotFoundException, IOException {\n backUpDb(Options.toString(Options.DATABASE));\n }", "public void dumpBack(Printer pw, String prefix) {\n }", "public void exportDB(){\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\n\t\tprgUserData.setMessage(getResources().getText(R.string.please_wait_data_dump) );\n\t\tprgUserData.show();\n\n\t\tint myDeviceId = prefs.getInt(\"my_device_id\", 0);\n\t\t// String currentDateTimeString = DateFormat.getDateTimeInstance().format(\"dd-MM-yyyyhh:mm:ssa\");\n\t\tFile sd =new File(Environment.getExternalStorageDirectory().getPath() + \"/vkb_database\");\n\t\tsd.mkdirs();\n\t\tFile data = Environment.getDataDirectory();\n\t\tLog.d(\"dump1\",\"file sd:\"+sd);\n\t\tLog.d(\"dump1\",\"file data:\"+data);\n\t\tFileChannel source=null,sourceSess=null;\n\t\tFileChannel destination=null,destinationSess=null;\n\n\t\tString currentDBPath = \"/data/game.Typing/databases/UT_Marathi\";\n\t\tString currentDBSessPath = \"/data/game.Typing/databases/\"+ApplicationConstants.DATABASE_NAME;\n\n\t\tString backupDBPath = myDeviceId+\"_UT_Users\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\t\tString backupDBSessPath = myDeviceId+\"_UT_Sessions\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\n\t\tFile currentDB = new File(data, currentDBPath);\n\t\tFile currentSessDB = new File(data, currentDBSessPath);\n\n\t\tFile backupDB = new File(sd, backupDBPath);\n\t\tFile backupDBSess = new File(sd, backupDBSessPath);\n\n\t\ttry {\n\t\t\tsource = new FileInputStream(currentDB).getChannel();\n\t\t\tsourceSess = new FileInputStream(currentSessDB).getChannel();\n\n\t\t\tdestination = new FileOutputStream(backupDB).getChannel();\n\t\t\tdestinationSess = new FileOutputStream(backupDBSess).getChannel();\n\n\t\t\tdestination.transferFrom(source, 0, source.size());\n\t\t\tdestinationSess.transferFrom(sourceSess, 0, sourceSess.size());\n\n\t\t\tsource.close();\n\t\t\tsourceSess.close();\n\n\t\t\tdestination.close();\n\t\t\tdestinationSess.close();\n\n\t\t\tToast.makeText(this, \"DB Exported!\", Toast.LENGTH_LONG).show();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tToast.makeText(this, \"DB Exception!\", Toast.LENGTH_LONG).show();\n\t\t}\n\t\ttry{\n\t\t\tprgUserData.hide();\n\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "abstract public void _dump(Dump d);", "public void backupAndRestore(Context ctx, SQLiteDatabase db) {\n\t\tif (backupAllTablesToCsv(ctx, db, null)) {\n\t\t\tdropAndCreate(db);\n\t\t\trestoreAllTablesFromCsv(ctx, db, null);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Backup of \" + getDatabaseName() + \" failed, aborting upgrade\");\n\t\t}\n\t}", "@Test(timeout=300000)\n public void test0() throws Throwable {\n PostgreSQLPlainTextBackuper postgreSQLPlainTextBackuper0 = new PostgreSQLPlainTextBackuper();\n String string0 = postgreSQLPlainTextBackuper0.getDumpFormat();\n assertEquals(\"PostgreSQL Plain Text Dump\", string0);\n }", "public abstract void doBackup();", "public static void backupDatabase(Context context) throws IOException {\n String backupFileName = new SimpleDateFormat(\"yyyy-MM-dd-HH-mm-ss\")\n .format(System.currentTimeMillis()) + \".backup\";\n\n File from = context.getDatabasePath(DatabaseHelper.DATABASE_NAME);\n File to = new File(Environment.getExternalStorageDirectory(),\n BACKUP_DIR + backupFileName);\n\n // Create missing directories.\n if (!to.exists()) {\n to.getParentFile().mkdirs();\n to.createNewFile();\n }\n\n FileUtils.copyFile(from, to);\n }", "private void dropOldTables(CopyTable table) throws SQLException\n\t{\n\t\tLOG.info(\"Dropping older versions of table '\" + table.getToName() + \"'...\");\n\t\t\n\t\tStatement q =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\t\n\t\tResultSet result =\n\t\t\tq.executeQuery(\"SELECT name FROM sys.tables WHERE name LIKE '\" + table.getToName()\n\t\t\t\t+ \"_20%_%' AND name <> '\" + table.getToName() + \"' \"\n\t\t\t\t+ \"AND schema_id = (SELECT id from sys.schemas WHERE LOWER(name) = LOWER('\" + table.getSchema()\n\t\t\t\t+ \"')) AND query IS NULL ORDER BY name DESC\");\n\t\t\n\t\tint i = 0;\n\t\tint dropCount = 0;\n\t\tStatement stmtDrop =\n\t\t\tCopyToolConnectionManager.getInstance().getMonetDbConnection().createStatement();\n\t\twhile(result.next())\n\t\t{\n\t\t\ti++;\n\t\t\t\n\t\t\t// if table is a fast view-switching table then\n\t\t\t// \t\tskip first result -> is current table and referenced by view\n\t\t\t// \t\tskip second result -> as backup (TODO: perhaps make this configurable?)\n\t\t\tif (table.isUseFastViewSwitching())\n\t\t\t\tif (i == 1 || i == 2)\n\t\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// build DROP query\n\t\t\tStringBuilder query = new StringBuilder(\"DROP TABLE \");\n\t\t\t\n\t\t\tif (!StringUtils.isEmpty(table.getSchema()))\n\t\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(table.getSchema())).append(\".\");\n\t\t\t\n\t\t\tquery.append(MonetDBUtil.quoteMonetDbIdentifier(result.getString(\"name\"))).append(\";\");\n\t\t\t\n\t\t\t// execute DROP query\n\t\t\tstmtDrop.executeUpdate(query.toString());\t\t\t\n\t\t\tdropCount++;\n\t\t}\n\t\t\n\t\tif (i == 0 || (table.isUseFastViewSwitching() && i <= 2))\n\t\t\tLOG.info(\"Table '\" + table.getToName() + \"' has no older versions\");\n\t\telse\n\t\t\tLOG.info(\"Dropped \" + dropCount + \" older versions of table '\" + table.getToName() + \"'\");\n\t\t\n\t\tresult.close();\n\t\tq.close();\n\t}", "private void generateBackUpMysql() {\n Calendar c = Calendar.getInstance();//creamos una instancia de la clase calendar de java\n //java.util.Date fecha = new Date();\n String DiaHoy = Integer.toString(c.get(Calendar.DATE));\n String MesHoy = Integer.toString(c.get(Calendar.MONTH)+1);\n String AnioHoy = Integer.toString(c.get(Calendar.YEAR)); \n \n \n JFileChooser RealizarBackupMySQL = new JFileChooser();\n int resp;\n resp=RealizarBackupMySQL.showSaveDialog(this);//JFileChooser de nombre RealizarBackupMySQL\n if (resp==JFileChooser.APPROVE_OPTION) {//Si el usuario presiona aceptar; se genera el Backup\n try{\n Runtime runtime = Runtime.getRuntime();\n File backupFile = new File(String.valueOf(RealizarBackupMySQL.getSelectedFile().toString())+\" \"+DiaHoy +\"-\"+MesHoy+\"-\"+AnioHoy+\".sql\");\n FileWriter fw = new FileWriter(backupFile);\n \n Process child = runtime.exec(\"C:\\\\xampp\\\\mysql\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n\n // Process child = runtime.exec(\"C:\\\\wamp\\\\bin\\\\mariadb\\\\mariadb10.4.10\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n InputStreamReader irs = new InputStreamReader(child.getInputStream());\n BufferedReader br = new BufferedReader(irs);\n String line;\n while( (line=br.readLine()) != null ) {\n fw.write(line + \"\\n\");\n }\n fw.close();\n irs.close();\n br.close();\n JOptionPane.showMessageDialog(null, \"Archivo generado\",\"Verificar\",JOptionPane. INFORMATION_MESSAGE);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Error no se genero el archivo por el siguiente motivo:\"+e.getMessage(), \"Verificar\",JOptionPane.ERROR_MESSAGE);\n } \n } else if (resp==JFileChooser.CANCEL_OPTION) {\n JOptionPane.showMessageDialog(null,\"Ha sido cancelada la generacion del Backup\");\n }\n }", "public boolean backup(SQLiteDatabase db, Context ctx, String suffix) {\n\t\ttry {\n\t\t\tnew CsvTableWriter(this).dumpToCsv(ctx, db, suffix);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getMessage().contains(\"no such table\")) {\n\t\t\t\tLog.w(TAG, \"Table \" + this.getTableName() + \" doesn't exist. This is expected if the table is new in this db version.\");\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "String backup(String request) throws RemoteException;", "void dump() throws RemoteException;", "public static void backupDatabase() throws IOException {\n\t\tString inFileName = \"/data/data/com.tip.mefgps/databases/MEF\";\n\t\tFile dbFile = new File(inFileName);\n\t\tFileInputStream fis = new FileInputStream(dbFile);\n\n\t\tString outFileName = Environment.getExternalStorageDirectory()+\"/MEF.sqlite3\";\n\t\t//Open the empty db as the output stream\n\t\tOutputStream output = new FileOutputStream(outFileName);\n\t\t//transfer bytes from the inputfile to the outputfile\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = fis.read(buffer))>0){\n\t\t\toutput.write(buffer, 0, length);\n\t\t}\n\t\t//Close the streams\n\t\toutput.flush();\n\t\toutput.close();\n\t\tfis.close();\n\t}", "public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public abstract ModuleBackups backups();", "private void backupState(BPState curState, FileProcess fileState) {\n\n\t\tprogram.generageCFG(\"/asm/cfg/\" + program.getFileName() + \"_test\");\n\t\tprogram.getResultFileTemp().appendInLine(\n\t\t\t\tprogram.getDetailTechnique() + \" Nodes:\" + program.getBPCFG().getVertexCount() + \" Edges:\"\n\t\t\t\t\t\t+ program.getBPCFG().getEdgeCount() + \" \");\n\t\t//System.out.println();\n\t}", "public void dump();", "public static void main_revertBackup(){\n try {\n table = (HiringTable) tableClone.clone();\n System.out.println(\"Successfully reverted to the backup copy.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "private void backupStateAll(BPState curState, FileProcess bkFile) {\n\t\tString result = \"Address=\" + curState.getLocation().toString() + \"\\n\";\n\t\tresult += \"Register:\" + curState.getEnvironement().getRegister() + \"\\n\";\n\t\tresult += \"Flag:\" + curState.getEnvironement().getFlag() + \"\\n\";\n\t\tresult += \"Memory:\" + curState.getEnvironement().getMemory() + \"\\n\";\n\t\tresult += \"SEH:\" + curState.getEnvironement().getSystem().getSEHHandler().toString() + \"\\n\";\n\t\tresult += \"*************************************************************\";\n\n\t\tbkFile.appendFile(result);\n\t}", "private void backupState(BPState curState) {\n\t\tprogram.generageCFG(\"/asm/cfg/\" + program.getFileName() + \"_test\");\n\t\tprogram.getResultFileTemp().appendInLine(\n\t\t\t\tprogram.getDetailTechnique() + \" Nodes:\" + program.getBPCFG().getVertexCount() + \" Edges:\"\n\t\t\t\t\t\t+ program.getBPCFG().getEdgeCount() + \" \");\n\t}", "public void backupAll() throws Exception {\n // create DataSet from database.\n IDataSet ds = conn.createDataSet();\n\n // write the content of database to temp file\n FlatXmlDataSet.write(ds, new FileWriter(backupFile), \"UTF-8\");\n }", "@Override\n\tpublic void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data,\n\t ParcelFileDescriptor newState) throws IOException {\n\t synchronized (TravelLiteDBAdapter.sDataLock) {\n\t super.onBackup(oldState, data, newState);\n\t }\n\t}", "CopySnapshotResult copySnapshot(CopySnapshotRequest copySnapshotRequest);", "public void backupCustom(String... tableName) throws Exception {\n // back up specific files\n QueryDataSet qds = new QueryDataSet(conn);\n for (String str : tableName) {\n\n qds.addTable(str);\n }\n FlatXmlDataSet.write(qds, new FileWriter(backupFile), \"UTF-8\");\n new XlsDataSetWriter().write(qds, new FileOutputStream(backupFile));\n }", "public void schemaUpdated() throws SQLException, IOException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n String newDBName = \"OSM\"+uniqueID;\n ProcessBuilder processBuilder = new ProcessBuilder(\"src/main/resources/schema/schemaUploader.sh\", newDBName, password);\n Process process = processBuilder.start();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line = null; // This is here for testing purposes\n while ((line = bufferedReader.readLine()) != null ) {\n System.out.println(line);\n }\n }", "@Override\n\tpublic String Backup(String[] args) throws RemoteException {\n\t\tSystem.out.println(\"Trying to backup with args: \" + args[2] + \" \" + args[3] );\n\t\t\n\t\treturn null;\n\t}", "public static void saveDrops() {\n DropTable.serialize(file);\n }", "String backupENH(String request) throws RemoteException;", "public void setDbPgsqlAlfa(String database) {\n this.dbPgsqlAlfa = database;\n }", "public void importDatabase (String name) throws IOException {\n // Closes all database connections to commit to mem\n databaseHandler.close();\n // Determines paths\n String inFileName = BACKUP_DB_PATH_DIR + name;\n\n File fromDB = new File(inFileName);\n File toDB = new File(CURRENT_DB_PATH);\n // Copy the database to the new location\n copyFile(new FileInputStream(fromDB), new FileOutputStream(toDB));\n Log.d(\"Import Database\", \"succeeded\");\n }", "@Override\n public void ppgDer(int ppgDer, int timestamp) {\n }", "public void createIntegrationTestDatabase() throws SQLException {\n\n final Connection connection = DriverManager.getConnection(url + \"postgres\", databaseProperties);\n\n connection.prepareStatement(\"DROP DATABASE IF EXISTS test_disassembly\").execute();\n connection.prepareStatement(\"DROP DATABASE IF EXISTS test_import\").execute();\n connection.prepareStatement(\"DROP DATABASE IF EXISTS test_empty\").execute();\n\n connection.prepareStatement(\"CREATE DATABASE test_disassembly\").execute();\n connection.prepareStatement(\"CREATE DATABASE test_import\").execute();\n connection.prepareStatement(\"CREATE DATABASE test_empty\").execute();\n\n connection.close();\n\n createDatabase(TEST_IMPORT);\n createDatabase(TEST_DISASSEMBLY);\n }", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n Class.forName(\"org.postgresql.Driver\");\n\n // Connect to the \"bank\" database.\n Connection conn = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:26257/?reWriteBatchedInserts=true&applicationanme=123&sslmode=disable\", \"root\", \"\");\n conn.setAutoCommit(false); // true and false do not make the difference\n // rewrite batch does not make the difference\n\n try {\n // Create the \"accounts\" table.\n conn.createStatement().execute(\"CREATE TABLE IF NOT EXISTS accounts (id serial PRIMARY KEY, balance INT)\");\n\n // Insert two rows into the \"accounts\" table.\n PreparedStatement st = conn.prepareStatement(\"INSERT INTO accounts (balance) VALUES (?), (?) returning id, balance\", \n ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n st.setInt(1, 100); \n st.setInt(2, 200); \n\n ResultSet rs = st.executeQuery();\n\n st = conn.prepareStatement(\"select id1, id2, link_type, visibility, data, time, version from linkbench.linktable where id1 = 9307741 and link_type = 123456790 and time >= 0 and time <= 9223372036854775807 and visibility = 1 order by time desc limit 0 offset 10000\",\n ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n rs = st.executeQuery();\n rs.last();\n int count = rs.getRow();\n rs.beforeFirst();\n System.out.printf(\"# of row in return set is %d\\n\", count);\n\n while (rs.next()) {\n System.out.printf(\"\\taccount %s: %s\\n\", rs.getLong(\"id\"), rs.getInt(\"balance\"));\n }\n } finally {\n // Close the database connection.\n conn.close();\n }\n }", "public String getDumpLocation();", "@Override\n\tpublic void dump() {\n\t\t\n\t}", "private void backup() throws IOException {\n long startTime = System.currentTimeMillis();\n\n this.backupTempDirPath = Files.createTempDirectory(BACKUP_TEMP_DIR_PREFIX).toString();\n Map<UUID, String> streamIdToTableNameMap = getStreamIdToTableNameMap();\n for (UUID streamId : streamsToBackUp) {\n // temporary backup file's name format: uuid.namespace$tableName\n Path filePath = Paths.get(backupTempDirPath)\n .resolve(streamId + \".\" + streamIdToTableNameMap.get(streamId));\n backupTable(filePath, streamId);\n }\n long elapsedTime = System.currentTimeMillis() - startTime;\n\n log.info(\"successfully backed up {} tables to {} directory, elapsed time {}ms\",\n streamsToBackUp.size(), backupTempDirPath, elapsedTime);\n }", "public void storeValuesDump() throws SQLException{ //store DUMP values into the database\n \tString sqlDump = \"INSERT INTO dump VALUES ('\" + massSelection + \"', '\" + smokeSelection + \"', '\" + framesText.getText() + \"', '\" + dtDevcText.getText() + \"');\";\n \tConnectionClass connectionClass = new ConnectionClass();\n\t\tConnection connection = connectionClass.getConnection();\n\t\tStatement statement = connection.createStatement();\n\t\tstatement.executeUpdate(sqlDump);\n }", "public void backupBindings(TableRep bindings) throws RemoteException, Error;", "public void backup(String filename) throws IOException, RemoteException, Error;", "@Override\n public void importTable(ImportJobContext context)\n throws IOException, ImportException {\n if (!PostgresqlManager.warningPrinted) {\n LOG.warn(\"It looks like you are importing from postgresql.\");\n LOG.warn(\"This transfer can be faster! Use the --direct\");\n LOG.warn(\"option to exercise a postgresql-specific fast path.\");\n\n PostgresqlManager.warningPrinted = true; // don't display this twice.\n }\n\n // Then run the normal importTable() method.\n super.importTable(context);\n }", "protected void relocateDatabaseIfNeeded() {\n File databaseDir = new File(config.dataDir(), Constants.DATABASE_DIR);\n File blocksDir = new File(databaseDir, \"block\");\n\n if (blocksDir.exists()) {\n LeveldbDatabase db = new LeveldbDatabase(blocksDir);\n byte[] header = db.get(Bytes.merge((byte) 0x00, Bytes.of(0L)));\n db.close();\n\n if (header == null || header.length < 33) {\n logger.info(\"Unable to decode genesis header. Quit relocating\");\n } else {\n String hash = Hex.encode(Arrays.copyOfRange(header, 1, 33));\n switch (hash) {\n case \"1d4fb49444a5a14dbe68f5f6109808c68e517b893c1e9bbffce9d199b5037c8e\":\n moveDatabase(databaseDir, config.databaseDir(Network.MAINNET));\n break;\n case \"abfe38563bed10ec431a4a9ad344a212ef62f6244c15795324cc06c2e8fa0f8d\":\n moveDatabase(databaseDir, config.databaseDir(Network.TESTNET));\n break;\n default:\n logger.info(\"Unable to recognize genesis hash. Quit relocating\");\n }\n }\n }\n }", "private void dumpProcesses()\n{\n System.err.println(\"\\n\\nDumping Processes\");\n for (DpinProcess dp : process_set.values()) {\n dp.dump();\n }\n}", "String getVirtualDatabaseName() throws Exception;", "private File createBackupFile() throws IOException {\n File[] listFiles = dbBackupDir.listFiles();\n int length = listFiles.length;\n\n //Delete old copies\n if (length > 2) {\n for (int i = 0; i < length - 2; i++) {\n listFiles[i].delete();\n }\n }\n\n File dbBackup = new File(databaseFolderPath + \"/backup/db\" + time + \".db\");\n if (!dbBackup.exists()) {\n if (!dbBackup.createNewFile()) {\n throw new IOException(\"Cannot create backup file.\");\n }\n\n }\n return dbBackup;\n }", "void dropDatabase();", "public static void backup() throws FileNotFoundException, SQLException {\n\n // Laver en dato til vores End Of Days filer i filnavnet\n Date date = new Date();\n String dagensDato = date.toString();\n dagensDato = dagensDato.replaceAll(\" \", \"_\");\n dagensDato = dagensDato.replaceAll(\":\", \"_\");\n\n File file = new File(\"End_Of_Days/End_Of_Day_\" + dagensDato + \".txt\");\n\n try (\n // Laver filen\n PrintWriter output = new PrintWriter(file);\n ) {\n // Initialiserer varibler der skal bruges\n String sql, hentetFnavn, hentetLnavn, hentetAdresse, hentetKonto_type, hentetOvertraeks, hentetUsername;\n int hentetPerson_id, hentetReg_nr, hentetKonto_nr, hentetRentesats, hentetSaldo, hentetOvertraeksgebyr, hentetId, hentetFra_Konto, hentetTil_Konto, hentetPassword;\n double hentetTrukketbelob, hentetIndfortbelob;\n Timestamp hentetTimestamp;\n\n\n output.println(\"Person_id \\t\\t fnavn \\t\\t lnavn \\t\\t adresse\");\n output.println(\"------------------------------------------------\");\n\n // Henter bruger tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM bruger\";\n ResultSet rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra bruger tabelen ind i tekstfilen\n hentetPerson_id = rs.getInt(1);\n hentetFnavn = rs.getNString(2);\n hentetLnavn = rs.getNString(3);\n hentetAdresse = rs.getNString(4);\n output.print(hentetPerson_id + \"\\t\\t\" + hentetFnavn + \"\\t\\t\" + hentetLnavn + \"\\t\\t\" + hentetAdresse + \"\\n\");\n }\n\n output.println();\n output.println(\"Konto_type \\t\\t reg_nr \\t\\t konto_nr \\t\\t rentesats \\t\\t saldo \\t\\t overtraeksgebyr \\t\\t overtraek \\t\\t id\");\n output.println(\"------------------------------------------------------------------------------------------------------------------------------------\");\n\n // Henter konto tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM konto\";\n rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra konto tabelen ind i tekstfilen\n hentetKonto_type = rs.getNString(1);\n hentetReg_nr = rs.getInt(2);\n hentetKonto_nr = rs.getInt(3);\n hentetRentesats = rs.getInt(4);\n hentetSaldo = rs.getInt(5);\n hentetOvertraeksgebyr = rs.getInt(6);\n hentetOvertraeks = rs.getNString(7);\n hentetId = rs.getInt(8);\n output.print(hentetKonto_type + \"\\t\\t\" + hentetReg_nr + \"\\t\\t\" + hentetKonto_nr + \"\\t\\t\" + hentetRentesats + \"\\t\\t\" + hentetSaldo + \"\\t\\t\" + hentetOvertraeksgebyr + \"\\t\\t\" + hentetOvertraeks + \"\\t\\t\" + hentetId + \"\\n\");\n }\n\n output.println();\n output.println(\"id \\t\\t Fra_Konto \\t\\t Trukketbeløb \\t\\t Til_kontoNr \\t\\t Indførtbeløb \\t\\t Timestamp\");\n output.println(\"------------------------------------------------------------------------------------------------------------------------------------\");\n\n // Henter transactioner tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM transactioner\";\n rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra transactioner tabelen ind i tekstfilen\n hentetId = rs.getInt(1);\n hentetFra_Konto = rs.getInt(2);\n hentetTrukketbelob = rs.getDouble(3);\n hentetTil_Konto = rs.getInt(4);\n hentetIndfortbelob = rs.getDouble(5);\n hentetTimestamp = rs.getTimestamp(6);\n output.print(hentetId + \"\\t\\t\" + hentetFra_Konto + \"\\t\\t\" + hentetTrukketbelob + \"\\t\\t\" + hentetTil_Konto + \"\\t\\t\" + hentetIndfortbelob + \"\\t\\t\" + hentetTimestamp + \"\\n\");\n }\n\n output.println();\n output.println(\"username \\t\\t password\");\n output.println(\"------------------------------------------------------------------------------------------------------------------------------------\");\n\n // Henter login tabelen\n stmt = con.createStatement();\n sql = \"SELECT * FROM login\";\n rs = stmt.executeQuery(sql);\n while (rs.next()) { // Indsaetter raekkerne fra login tabelen ind i tekstfilen\n hentetUsername = rs.getNString(1);\n hentetPassword = rs.getInt(2);\n output.print(hentetUsername + \"\\t\\t\" + hentetPassword + \"\\n\");\n }\n\n }\n System.out.println(\"End Of Days backup successful!\");\n }", "public static void backupTable(SQLiteDatabase database, String tableName,\n String[] columns, String where) {\n dropBackupTableIfExist(database, tableName);\n String query = \"CREATE TABLE \" + tableName + BACKUP_PREFIX + \" AS \" +\n SQLiteQueryBuilder.buildQueryString(false, tableName, columns, where,\n null, null, null, null);\n\n database.execSQL(query);\n Log.v(DatabaseHelper.TAG, query);\n }", "public static void main(String args[]) throws Exception{\n\t\t\n\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\n\t\tConnection connection = DriverManager.getConnection(\n\t\t\t\t\"jdbc:postgresql://10.1.3.233:5432/postgres\", \"postgres\",\"123456\");\n\t\t\n\t\t//DatabaseMetaData metaData = connection.getMetaData();\n\t\t//System.out.println(metaData.getDatabaseProductName());\n\n\t\tStatement statement = connection.createStatement();\n\t\tResultSet result = statement.executeQuery(\"select * from table1\");\n\t\twhile(result.next()){\n\t\t\tSystem.out.println(result.getString(1));\n\t\t}\n\t\tconnection.close();\n\t}", "private static void createBackup(Path savegame, Path backups) {\r\n\r\n\t\ttry {\r\n\t\t\t// Copys savegame into backup directory, with an consecutive index \".bckXX\"\r\n\t\t\tFiles.copy(savegame,\r\n\t\t\t\t\tPaths.get(backups.toString() + \"\\\\\" + savegame.getFileName() + \".bck_\"\r\n\t\t\t\t\t\t\t+ new SimpleDateFormat(\"yyyy_MM_dd-HH_mm\").format(new Date())),\r\n\t\t\t\t\tStandardCopyOption.REPLACE_EXISTING);\r\n\t\t\tSystem.out.println(\"Backup Successful...\");\r\n\t\t\tif (backupInterval > 60_000) {\r\n\r\n\t\t\t\tSystem.out.println(\"Next Backup in \" + TimeUnit.MILLISECONDS.toMinutes(backupInterval) + \" Minutes..\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Next Backup in One Minute or less..\");\r\n\t\t\t}\r\n\t\t\tif (maxBackups != -1) {\r\n\t\t\t\tif (backups.toFile().listFiles().length > maxBackups) {\r\n\t\t\t\t\tbackups.toFile().listFiles()[0].delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// logBackup(backups);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error while backing up save\");\r\n\t\t\tSystem.out.println(\"Program aborted!\");\r\n\t\t\tprogramRunning = false;\r\n\t\t}\r\n\r\n\t}", "public void updateBackupInfo(BackupInfo context) throws IOException {\n systemTable.updateBackupInfo(context);\n }", "private void backup(final FileObject _backup,\n final int _number)\n throws FileSystemException\n {\n if (_number < this.numberBackup) {\n final FileObject backFile = this.manager.resolveFile(this.manager.getBaseFile(),\n this.storeFileName + VFSStoreResource.EXTENSION_BACKUP + _number);\n if (backFile.exists()) {\n backup(backFile, _number + 1);\n }\n _backup.moveTo(backFile);\n } else {\n _backup.delete();\n }\n }", "private void backupInternalState(Backup backup)\n {\n backup.m_offset_ = m_source_.getIndex();\n backup.m_FCDLimit_ = m_FCDLimit_;\n backup.m_FCDStart_ = m_FCDStart_;\n backup.m_isCodePointHiragana_ = m_isCodePointHiragana_;\n backup.m_bufferOffset_ = m_bufferOffset_;\n backup.m_buffer_.setLength(0);\n if (m_bufferOffset_ >= 0) {\n backup.m_buffer_.append(m_buffer_);\n }\n }", "private void dropDBProcedure() {\r\n try {\r\n Class.forName(myDriver);\r\n Connection conn = DriverManager.getConnection(myUrl, myUser, myPass);\r\n DatabaseMetaData md = conn.getMetaData();\r\n String[] types = {\"TABLE\"};\r\n ResultSet rs = md.getTables(null, \"USERTEST\", \"%\", types);\r\n while (rs.next()) {\r\n String queryDrop\r\n = \"DROP TABLE \" + rs.getString(3);\r\n Statement st = conn.createStatement();\r\n st.executeQuery(queryDrop);\r\n System.out.println(\"TABLE \" + rs.getString(3).toLowerCase() + \" DELETED\");\r\n st.close();\r\n }\r\n rs.close();\r\n conn.close();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\r\n }", "public static void main(String[] args) {\n\t\tString IP = \"jdbc:postgresql://localhost:5432/textdb\";\n\t\tString Username = \"postgres\";\n\t\tString Password = \"yyggdd1219\";\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not load class\" + \"org.postgresql.Driver\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}// try-catch exception\n\t\t//the driver is loaded...\n\t\tSystem.out.println(\"PostgreSQL JDBC Driver found!\");\n\t\t//proceed with a database connection\n\t\tConnection connection = null;\n\t\t//connect to the yacata.dcs.gla.ac.uk:5432\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(IP, Username, Password);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Connection Filed!\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}//try-catch exception\n\t\t//connection to the database is done!\n\t\tif (connection != null) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Controlling your database...\");\n\t\t\t\t//do not forget to close the connection to the database!\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}//try-catch exception\n\t\t}else {\n\t\t\tSystem.out.println(\"Failed to establish connection!\");\n\t\t}//if-else\n\t\t\n\t\t}", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "public static void main_compareBackup(){\n //table.equals(tableClone);\n\n if(table.equals(tableClone))\n System.out.println(\"Current list is the same as the backup copy.\");\n else\n System.out.println(\"Current list is not the same as the backup copy.\");\n }", "public void dropDB() throws SQLException {\n\t \t\tStatement stmt = cnx.createStatement();\n\t \t\tString[] tables = {\"account\", \"consumer\", \"transaction\"};\n\t \t\tfor (int i=0; i<3;i++) {\n\t \t\t\tString query = \"DELETE FROM \" + tables[i];\n\t \t\t\tstmt.executeUpdate(query);\n\t \t\t}\n\t \t}", "public void dropDatabase(String dbName) throws Exception;", "private void deleteOldTables(){\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence\");\n jdbcTemplate.execute(\"DROP TABLE OLDrole\");\n jdbcTemplate.execute(\"DROP TABLE OLDperson\");\n jdbcTemplate.execute(\"DROP TABLE OLDavailability\");\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence_profile\");\n }", "public void copyDatabase(Context context) {\n try {\n AssetManager assetManager = context.getAssets();\n InputStream is = null;\n try {\n is = assetManager.open(DATABASE_NAME);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //mo file de ghi\n String path = DATABASE_PATH + DATABASE_NAME;\n File f = new File(path);\n if (f.exists()) {\n return;\n } else {\n f.createNewFile();\n }\n FileOutputStream fos = new FileOutputStream(f);\n byte[] b = new byte[1024];\n int lenght = 0;\n\n while ((lenght = is.read(b)) != -1) {\n fos.write(b, 0, lenght);\n fos.flush();\n }\n is.close();\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static boolean exportDB(String path, String dbname) {\n\n try {\n\n File sd = Environment.getExternalStorageDirectory();\n File data = Environment.getDataDirectory();\n File dir = new File(path);\n if (!dir.exists()){\n if (!dir.mkdir()){\n // directory creation failed\n return false;\n }\n }\n if (sd.canWrite()) {\n String currentDBPath= \"//data//\" + \"selfdriving.streaming\"\n + \"//databases//\" + dbname;\n\n File currentDB = new File(data, currentDBPath);\n File backupDB = new File(dir, dbname);\n\n FileChannel src = new FileInputStream(currentDB).getChannel();\n FileChannel dst = new FileOutputStream(backupDB).getChannel();\n dst.transferFrom(src, 0, src.size());\n src.close();\n dst.close();\n return true;\n }\n } catch (Exception e) {\n Log.e(\"DbHelper\", \"Error in exporting database : \" + e.getMessage());\n }\n return false;\n }", "private void backupTable(Path filePath, UUID uuid) throws IOException {\n long startTime = System.currentTimeMillis();\n BackupTableStats backupTableStats;\n\n try (FileOutputStream fileOutput = new FileOutputStream(filePath.toString())) {\n StreamOptions options = StreamOptions.builder()\n .ignoreTrimmed(false)\n .cacheEntries(false)\n .build();\n Stream<OpaqueEntry> stream = (new OpaqueStream(runtime.getStreamsView().get(uuid, options))).streamUpTo(timestamp);\n\n backupTableStats = writeTableToFile(fileOutput, stream, uuid);\n } catch (IOException e) {\n log.error(\"failed to back up table {} to file {}\", uuid, filePath);\n throw e;\n } catch (TrimmedException e) {\n log.error(\"failed to back up tables as log was trimmed after back up starts.\");\n throw e;\n }\n\n long elapsedTime = System.currentTimeMillis() - startTime;\n\n log.info(\"{} SMREntry (size: {} bytes, elapsed time: {} ms) saved to temp file {}\",\n backupTableStats.getNumOfEntries(), backupTableStats.getTableSize(), elapsedTime, filePath);\n }", "private static void dropBackupTableIfExist(SQLiteDatabase database, String tableName) {\n database.execSQL(\"DROP TABLE IF EXISTS \" + tableName + BACKUP_PREFIX);\n }", "@Override\n public void dump(String prefix, FileDescriptor fd,\n PrintWriter writer, String[] args) {\n super.dump(prefix, fd, writer, args);\n writer.print(prefix);\n writer.print(\"rawQuery=\");\n writer.println(rawQuery);\n writer.print(prefix);\n writer.print(\"args=\");\n writer.println(Arrays.toString(args));\n }", "public String getDbPgsqlAlfa() {\n return this.dbPgsqlAlfa;\n }", "private void copyDataBase() throws IOException {\n\n\t\tInputStream myInput = rssContext.getAssets().open(DATABASE_NAME);\n\t\tString outFileName = DATABASE_PATH + DATABASE_NAME;\n\t\tOutputStream myOutput = new FileOutputStream(outFileName);\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = myInput.read(buffer)) > 0) {\n\t\t\tmyOutput.write(buffer, 0, length);\n\t\t}\n\t\tmyOutput.flush();\n\t\tmyOutput.close();\n\t\tmyInput.close();\n\t}", "public void forceBackup() {\n // If you configures storage support as a file,\n // method push() send all data from memory into file referenced into properties file.\n // Before writing, all expired data will be flushed.\n DacasTransaction.push();\n\n }", "public boolean writePlicSnapshotToFile(File f, String dbSchema, String dataSource){\n try{\n //Obtener la conexion JDBC del proyecto\n InitialContext ctx = new InitialContext();\n DataSource ds = (DataSource) ctx.lookup(dataSource);\n Connection connection = ds.getConnection();\n\n\t String query = \"SELECT '\\\"'||REPLACE(COALESCE(globaluniqueidentifier,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(institutioncode,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datelastmodified,'YYYY-MM-DD HH24:MI:SS'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(taxonrecordid,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(language,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(creators,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(distribution,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(abstract,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(kingdomtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(phylumtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(classtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ordertaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(familytaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(genustaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(synonyms,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(authoryearofscientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(speciespublicationreference,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(commonnames,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(typification,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(contributors,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datecreated,'YYYY-MM-DD'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habit,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(lifecycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(reproduction,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(annualcycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(briefdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(feeding,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(behavior,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(interactions,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(chromosomicnumbern,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(moleculardata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(populationbiology,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(threatstatus,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(legislation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habitat,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(territory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(endemicity,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(theuses,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(themanagement,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(folklore,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(thereferences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructureddocumentation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(otherinformationsources,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(papers,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(identificationkeys,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(migratorydata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ecologicalsignificance,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructurednaturalhistory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(invasivenessdata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(targetaudiences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(version,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage3,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage3,''),'\\r\\n', ' ')||'\\\"'\"+\n\t\t\t \" AS aux \"+\n\t\t\t \"FROM \"+dbSchema+\".plic_snapshot;\";\n\n System.out.println(query);\n\n\t\t\tStatement st = connection.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query); \n\n //Imprimir los datos en el archivo\n BufferedWriter out = new BufferedWriter(new FileWriter(f));\n\t\t\twhile (rs.next()) {\n\t\t\t\tout.write(rs.getString(\"aux\")+\"\\n\");\n\t\t\t}\n out.close();\n\n //Cerrar el resultset y el statement\n rs.close();\n\t\t\tst.close();\n\n //Resultado\n return true;\n }\n catch(Exception e){\n e.printStackTrace();\n return false;}\n }", "public void setDump(boolean dump) {\n isDump = dump;\n }", "public static void restoreDatabase(Context context, String backupFileName) throws IOException {\n File from = new File(Environment.getExternalStorageDirectory(), BACKUP_DIR + backupFileName);\n File to = context.getDatabasePath(DatabaseHelper.DATABASE_NAME);\n FileUtils.copyFile(from, to);\n\n DatabaseHelper databaseHelper = DatabaseHelper.getInstance(context);\n SQLiteDatabase db = databaseHelper.getWritableDatabase();\n\n // Upgrade restored old DB if it needs\n int restoredVersion = db.getVersion();\n if (restoredVersion < DatabaseHelper.DATABASE_VERSION) {\n databaseHelper.onUpgrade(db, restoredVersion, DatabaseHelper.DATABASE_VERSION);\n }\n }", "public String restoreState(Database db) {\n if (db == null) {\n return \"There is no database present\";\n } else {\n try {\n lists.put(ItemType.DEVELOPER, db.restoreItems(ItemType.DEVELOPER));\n lists.put(ItemType.STORY, db.restoreItems(ItemType.STORY));\n lists.put(ItemType.PROJECT, db.restoreItems(ItemType.PROJECT));\n lists.put(ItemType.STORY_DEVELOPER, db.restoreItems(ItemType.STORY_DEVELOPER));\n db.restoreRelationships();\n db.restoreState();\n } catch (NameClashException nameClash) {\n nameClash.printStackTrace();\n }\n\n return db.getStorageDescription();\n }\n }", "public void dump() throws IOException;", "public abstract boolean migrate(int userId, String uuid, String tarHost, String content, String conid);", "public void dropDataBase(String databaseName);", "public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {\n boolean dumpWatchers;\n int dumpOp;\n String dumpPackage;\n int dumpUid;\n Throwable th;\n boolean needSep;\n long now;\n int dumpUid2;\n SimpleDateFormat sdf;\n Date date;\n long now2;\n int userRestrictionCount;\n ClientRestrictionState restrictionState;\n int excludedPackageCount;\n boolean hasPackage;\n SimpleDateFormat sdf2;\n Date date2;\n int restrictedOpCount;\n boolean[] restrictedOps;\n int dumpMode;\n boolean dumpWatchers2;\n long now3;\n boolean dumpHistory;\n int dumpOp2;\n String dumpPackage2;\n long now4;\n boolean needSep2;\n SimpleDateFormat sdf3;\n long nowElapsed;\n long nowElapsed2;\n int dumpMode2;\n UidState uidState;\n long now5;\n ArrayMap<String, Ops> pkgOps;\n int dumpOp3;\n String dumpPackage3;\n SimpleDateFormat sdf4;\n long now6;\n int dumpMode3;\n UidState uidState2;\n long nowElapsed3;\n int j;\n Ops ops;\n int dumpOp4;\n String dumpPackage4;\n SimpleDateFormat sdf5;\n long now7;\n int j2;\n boolean printedPackage;\n int mode;\n long nowElapsed4;\n int opModeCount;\n int code;\n int mode2;\n boolean hasPackage2;\n boolean hasOp;\n boolean hasOp2;\n boolean needSep3;\n boolean hasOp3;\n SparseArray<Restriction> restrictions;\n boolean needSep4;\n int dumpUid3;\n boolean needSep5;\n boolean printedHeader;\n long now8;\n boolean needSep6;\n boolean needSep7;\n ArraySet<ModeCallback> callbacks;\n if (DumpUtils.checkDumpAndUsageStatsPermission(this.mContext, TAG, pw)) {\n String dumpPackage5 = null;\n int dumpUid4 = -1;\n boolean dumpOp5 = false;\n if (args != null) {\n int i = 0;\n boolean dumpWatchers3 = false;\n int dumpMode4 = -1;\n int dumpUid5 = -1;\n int dumpOp6 = -1;\n while (i < args.length) {\n String arg = args[i];\n if (\"-h\".equals(arg)) {\n dumpHelp(pw);\n return;\n }\n if (!\"-a\".equals(arg)) {\n if (\"--op\".equals(arg)) {\n i++;\n if (i >= args.length) {\n pw.println(\"No argument for --op option\");\n return;\n }\n int dumpOp7 = Shell.strOpToOp(args[i], pw);\n if (dumpOp7 >= 0) {\n dumpOp6 = dumpOp7;\n } else {\n return;\n }\n } else if (\"--package\".equals(arg)) {\n i++;\n if (i >= args.length) {\n pw.println(\"No argument for --package option\");\n return;\n }\n dumpPackage5 = args[i];\n try {\n dumpUid5 = AppGlobals.getPackageManager().getPackageUid(dumpPackage5, 12591104, 0);\n } catch (RemoteException e) {\n }\n if (dumpUid5 < 0) {\n pw.println(\"Unknown package: \" + dumpPackage5);\n return;\n }\n dumpUid5 = UserHandle.getAppId(dumpUid5);\n } else if (\"--mode\".equals(arg)) {\n i++;\n if (i >= args.length) {\n pw.println(\"No argument for --mode option\");\n return;\n }\n int dumpMode5 = Shell.strModeToMode(args[i], pw);\n if (dumpMode5 >= 0) {\n dumpMode4 = dumpMode5;\n } else {\n return;\n }\n } else if (\"--watchers\".equals(arg)) {\n dumpWatchers3 = true;\n } else if (arg.length() <= 0 || arg.charAt(0) != '-') {\n pw.println(\"Unknown command: \" + arg);\n return;\n } else {\n pw.println(\"Unknown option: \" + arg);\n return;\n }\n }\n i++;\n }\n dumpOp = dumpOp6;\n dumpWatchers = dumpWatchers3;\n dumpPackage = dumpPackage5;\n dumpUid = dumpUid5;\n dumpUid4 = dumpMode4;\n } else {\n dumpOp = -1;\n dumpWatchers = false;\n dumpPackage = null;\n dumpUid = -1;\n }\n synchronized (this) {\n try {\n pw.println(\"Current AppOps Service state:\");\n if (0 == 0 && !dumpWatchers) {\n try {\n this.mConstants.dump(pw);\n } catch (Throwable th2) {\n th = th2;\n }\n }\n pw.println();\n long now9 = System.currentTimeMillis();\n long nowElapsed5 = SystemClock.elapsedRealtime();\n SystemClock.uptimeMillis();\n long nowElapsed6 = nowElapsed5;\n SimpleDateFormat sdf6 = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date date3 = new Date();\n if (dumpOp < 0 && dumpUid4 < 0 && dumpPackage == null && this.mProfileOwners != null && !dumpWatchers && 0 == 0) {\n pw.println(\" Profile owners:\");\n for (int poi = 0; poi < this.mProfileOwners.size(); poi++) {\n pw.print(\" User #\");\n pw.print(this.mProfileOwners.keyAt(poi));\n pw.print(\": \");\n UserHandle.formatUid(pw, this.mProfileOwners.valueAt(poi));\n pw.println();\n }\n pw.println();\n }\n if (this.mOpModeWatchers.size() <= 0 || 0 != 0) {\n needSep = false;\n } else {\n boolean j3 = false;\n needSep = false;\n for (int i2 = 0; i2 < this.mOpModeWatchers.size(); i2++) {\n if (dumpOp < 0 || dumpOp == this.mOpModeWatchers.keyAt(i2)) {\n boolean printedOpHeader = false;\n ArraySet<ModeCallback> callbacks2 = this.mOpModeWatchers.valueAt(i2);\n boolean printedHeader2 = j3;\n int j4 = 0;\n while (true) {\n needSep7 = needSep;\n if (j4 >= callbacks2.size()) {\n break;\n }\n ModeCallback cb = callbacks2.valueAt(j4);\n if (dumpPackage != null) {\n callbacks = callbacks2;\n if (dumpUid != UserHandle.getAppId(cb.mWatchingUid)) {\n needSep = needSep7;\n j4++;\n callbacks2 = callbacks;\n }\n } else {\n callbacks = callbacks2;\n }\n if (!printedHeader2) {\n needSep7 = true;\n pw.println(\" Op mode watchers:\");\n printedHeader2 = true;\n } else {\n needSep7 = true;\n }\n if (!printedOpHeader) {\n pw.print(\" Op \");\n pw.print(AppOpsManager.opToName(this.mOpModeWatchers.keyAt(i2)));\n pw.println(\":\");\n printedOpHeader = true;\n }\n pw.print(\" #\");\n pw.print(j4);\n pw.print(\": \");\n pw.println(cb);\n needSep = needSep7;\n j4++;\n callbacks2 = callbacks;\n }\n j3 = printedHeader2;\n needSep = needSep7;\n }\n }\n }\n if (this.mPackageModeWatchers.size() > 0 && dumpOp < 0 && 0 == 0) {\n boolean printedHeader3 = false;\n for (int i3 = 0; i3 < this.mPackageModeWatchers.size(); i3++) {\n if (dumpPackage == null || dumpPackage.equals(this.mPackageModeWatchers.keyAt(i3))) {\n boolean needSep8 = true;\n if (!printedHeader3) {\n pw.println(\" Package mode watchers:\");\n printedHeader3 = true;\n }\n pw.print(\" Pkg \");\n pw.print(this.mPackageModeWatchers.keyAt(i3));\n pw.println(\":\");\n ArraySet<ModeCallback> callbacks3 = this.mPackageModeWatchers.valueAt(i3);\n int j5 = 0;\n while (j5 < callbacks3.size()) {\n pw.print(\" #\");\n pw.print(j5);\n pw.print(\": \");\n pw.println(callbacks3.valueAt(j5));\n j5++;\n needSep8 = needSep8;\n }\n needSep = needSep8;\n printedHeader3 = printedHeader3;\n }\n }\n }\n if (this.mModeWatchers.size() > 0 && dumpOp < 0 && 0 == 0) {\n boolean printedHeader4 = false;\n for (int i4 = 0; i4 < this.mModeWatchers.size(); i4++) {\n ModeCallback cb2 = this.mModeWatchers.valueAt(i4);\n if (dumpPackage != null) {\n if (dumpUid != UserHandle.getAppId(cb2.mWatchingUid)) {\n needSep = needSep;\n }\n }\n needSep = true;\n if (!printedHeader4) {\n pw.println(\" All op mode watchers:\");\n printedHeader4 = true;\n }\n pw.print(\" \");\n pw.print(Integer.toHexString(System.identityHashCode(this.mModeWatchers.keyAt(i4))));\n pw.print(\": \");\n pw.println(cb2);\n printedHeader4 = printedHeader4;\n }\n }\n if (this.mActiveWatchers.size() <= 0 || dumpUid4 >= 0) {\n now = now9;\n } else {\n needSep = true;\n boolean printedHeader5 = false;\n int watcherNum = 0;\n while (watcherNum < this.mActiveWatchers.size()) {\n SparseArray<ActiveCallback> activeWatchers = this.mActiveWatchers.valueAt(watcherNum);\n if (activeWatchers.size() <= 0) {\n needSep6 = needSep;\n } else {\n ActiveCallback cb3 = activeWatchers.valueAt(0);\n if (dumpOp < 0 || activeWatchers.indexOfKey(dumpOp) >= 0) {\n if (dumpPackage != null) {\n needSep6 = needSep;\n } else {\n needSep6 = needSep;\n }\n if (!printedHeader5) {\n pw.println(\" All op active watchers:\");\n printedHeader5 = true;\n }\n pw.print(\" \");\n pw.print(Integer.toHexString(System.identityHashCode(this.mActiveWatchers.keyAt(watcherNum))));\n pw.println(\" ->\");\n pw.print(\" [\");\n int opCount = activeWatchers.size();\n now8 = now9;\n for (int opNum = 0; opNum < opCount; opNum++) {\n if (opNum > 0) {\n pw.print(' ');\n }\n pw.print(AppOpsManager.opToName(activeWatchers.keyAt(opNum)));\n if (opNum < opCount - 1) {\n pw.print(',');\n }\n }\n pw.println(\"]\");\n pw.print(\" \");\n pw.println(cb3);\n watcherNum++;\n needSep = needSep6;\n now9 = now8;\n } else {\n needSep6 = needSep;\n }\n }\n now8 = now9;\n watcherNum++;\n needSep = needSep6;\n now9 = now8;\n }\n now = now9;\n }\n if (this.mNotedWatchers.size() > 0 && dumpUid4 < 0) {\n needSep = true;\n boolean printedHeader6 = false;\n int i5 = 0;\n while (i5 < this.mNotedWatchers.size()) {\n SparseArray<NotedCallback> notedWatchers = this.mNotedWatchers.valueAt(i5);\n if (notedWatchers.size() > 0) {\n NotedCallback cb4 = notedWatchers.valueAt(0);\n if ((dumpOp < 0 || notedWatchers.indexOfKey(dumpOp) >= 0) && (dumpPackage == null || dumpUid == UserHandle.getAppId(cb4.mWatchingUid))) {\n if (!printedHeader6) {\n pw.println(\" All op noted watchers:\");\n printedHeader6 = true;\n }\n pw.print(\" \");\n pw.print(Integer.toHexString(System.identityHashCode(this.mNotedWatchers.keyAt(i5))));\n pw.println(\" ->\");\n pw.print(\" [\");\n int opCount2 = notedWatchers.size();\n i5 = 0;\n while (i5 < opCount2) {\n if (i5 > 0) {\n printedHeader = printedHeader6;\n pw.print(' ');\n } else {\n printedHeader = printedHeader6;\n }\n pw.print(AppOpsManager.opToName(notedWatchers.keyAt(i5)));\n if (i5 < opCount2 - 1) {\n pw.print(',');\n }\n i5++;\n printedHeader6 = printedHeader;\n }\n pw.println(\"]\");\n pw.print(\" \");\n pw.println(cb4);\n printedHeader6 = printedHeader6;\n }\n }\n i5++;\n }\n }\n if (this.mClients.size() <= 0 || dumpUid4 >= 0 || dumpWatchers || 0 != 0) {\n dumpUid2 = dumpUid;\n } else {\n needSep = true;\n boolean j6 = false;\n int i6 = 0;\n while (i6 < this.mClients.size()) {\n try {\n boolean printedClient = false;\n ClientState cs = this.mClients.valueAt(i6);\n if (cs.mStartedOps.size() > 0) {\n boolean printedStarted = false;\n boolean printedHeader7 = j6;\n int j7 = 0;\n while (true) {\n dumpUid3 = dumpUid;\n try {\n if (j7 >= cs.mStartedOps.size()) {\n break;\n }\n Op op = cs.mStartedOps.get(j7);\n if (dumpOp >= 0) {\n needSep5 = needSep;\n if (op.op != dumpOp) {\n j7++;\n dumpUid = dumpUid3;\n needSep = needSep5;\n }\n } else {\n needSep5 = needSep;\n }\n if (dumpPackage == null || dumpPackage.equals(op.packageName)) {\n if (!printedHeader7) {\n pw.println(\" Clients:\");\n printedHeader7 = true;\n }\n if (!printedClient) {\n pw.print(\" \");\n pw.print(this.mClients.keyAt(i6));\n pw.println(\":\");\n pw.print(\" \");\n pw.println(cs);\n printedClient = true;\n }\n if (!printedStarted) {\n pw.println(\" Started ops:\");\n printedStarted = true;\n }\n pw.print(\" \");\n pw.print(\"uid=\");\n pw.print(op.uidState.uid);\n pw.print(\" pkg=\");\n pw.print(op.packageName);\n pw.print(\" op=\");\n pw.println(AppOpsManager.opToName(op.op));\n j7++;\n dumpUid = dumpUid3;\n needSep = needSep5;\n } else {\n j7++;\n dumpUid = dumpUid3;\n needSep = needSep5;\n }\n } catch (Throwable th3) {\n th = th3;\n throw th;\n }\n }\n needSep4 = needSep;\n j6 = printedHeader7;\n } else {\n dumpUid3 = dumpUid;\n needSep4 = needSep;\n }\n i6++;\n dumpUid = dumpUid3;\n needSep = needSep4;\n } catch (Throwable th4) {\n th = th4;\n throw th;\n }\n }\n dumpUid2 = dumpUid;\n }\n try {\n if (this.mAudioRestrictions.size() > 0 && dumpOp < 0 && dumpPackage != null && dumpUid4 < 0 && !dumpWatchers && !dumpWatchers) {\n boolean printedHeader8 = false;\n for (int o = 0; o < this.mAudioRestrictions.size(); o++) {\n String op2 = AppOpsManager.opToName(this.mAudioRestrictions.keyAt(o));\n SparseArray<Restriction> restrictions2 = this.mAudioRestrictions.valueAt(o);\n int i7 = 0;\n while (i7 < restrictions2.size()) {\n if (!printedHeader8) {\n pw.println(\" Audio Restrictions:\");\n printedHeader8 = true;\n needSep = true;\n }\n int usage = restrictions2.keyAt(i7);\n pw.print(\" \");\n pw.print(op2);\n pw.print(\" usage=\");\n pw.print(AudioAttributes.usageToString(usage));\n Restriction r = restrictions2.valueAt(i7);\n pw.print(\": mode=\");\n pw.println(AppOpsManager.modeToName(r.mode));\n if (!r.exceptionPackages.isEmpty()) {\n pw.println(\" Exceptions:\");\n int j8 = 0;\n while (true) {\n restrictions = restrictions2;\n if (j8 >= r.exceptionPackages.size()) {\n break;\n }\n pw.print(\" \");\n pw.println(r.exceptionPackages.valueAt(j8));\n j8++;\n restrictions2 = restrictions;\n }\n } else {\n restrictions = restrictions2;\n }\n i7++;\n printedHeader8 = printedHeader8;\n op2 = op2;\n restrictions2 = restrictions;\n }\n }\n }\n if (needSep) {\n pw.println();\n }\n int i8 = 0;\n while (i8 < this.mUidStates.size()) {\n UidState uidState3 = this.mUidStates.valueAt(i8);\n SparseIntArray opModes = uidState3.opModes;\n ArrayMap<String, Ops> pkgOps2 = uidState3.pkgOps;\n if (dumpWatchers) {\n dumpMode = dumpUid4;\n dumpHistory = dumpOp5;\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n now4 = now;\n dumpPackage2 = dumpPackage;\n dumpOp2 = dumpOp;\n now3 = nowElapsed6;\n } else if (dumpOp5) {\n dumpPackage2 = dumpPackage;\n dumpMode = dumpUid4;\n dumpHistory = dumpOp5;\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n now4 = now;\n dumpOp2 = dumpOp;\n now3 = nowElapsed6;\n } else {\n if (dumpOp >= 0 || dumpPackage != null || dumpUid4 >= 0) {\n boolean hasOp4 = dumpOp < 0 || (uidState3.opModes != null && uidState3.opModes.indexOfKey(dumpOp) >= 0);\n boolean hasPackage3 = dumpPackage == null;\n boolean hasMode = dumpUid4 < 0;\n if (hasMode || opModes == null) {\n hasOp = hasOp4;\n hasPackage2 = hasPackage3;\n } else {\n hasOp = hasOp4;\n int opi = 0;\n while (true) {\n if (hasMode) {\n hasPackage2 = hasPackage3;\n break;\n }\n hasPackage2 = hasPackage3;\n if (opi >= opModes.size()) {\n break;\n }\n if (opModes.valueAt(opi) == dumpUid4) {\n hasMode = true;\n }\n opi++;\n hasPackage3 = hasPackage2;\n }\n }\n if (pkgOps2 != null) {\n dumpHistory = dumpOp5;\n boolean hasPackage4 = hasPackage2;\n int pkgi = 0;\n hasOp2 = hasOp;\n while (true) {\n if (hasOp2 && hasPackage4 && hasMode) {\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n break;\n }\n dumpWatchers2 = dumpWatchers;\n try {\n if (pkgi >= pkgOps2.size()) {\n needSep2 = needSep;\n break;\n }\n Ops ops2 = pkgOps2.valueAt(pkgi);\n if (!hasOp2 && ops2 != null && ops2.indexOfKey(dumpOp) >= 0) {\n hasOp2 = true;\n }\n if (!hasMode) {\n hasOp3 = hasOp2;\n int opi2 = 0;\n while (true) {\n if (hasMode) {\n needSep3 = needSep;\n break;\n }\n needSep3 = needSep;\n if (opi2 >= ops2.size()) {\n break;\n }\n if (((Op) ops2.valueAt(opi2)).mode == dumpUid4) {\n hasMode = true;\n }\n opi2++;\n needSep = needSep3;\n }\n } else {\n hasOp3 = hasOp2;\n needSep3 = needSep;\n }\n if (!hasPackage4 && dumpPackage.equals(ops2.packageName)) {\n hasPackage4 = true;\n }\n pkgi++;\n hasOp2 = hasOp3;\n dumpWatchers = dumpWatchers2;\n needSep = needSep3;\n } catch (Throwable th5) {\n th = th5;\n throw th;\n }\n }\n hasPackage2 = hasPackage4;\n } else {\n dumpHistory = dumpOp5;\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n hasOp2 = hasOp;\n }\n try {\n if (uidState3.foregroundOps != null && !hasOp2 && uidState3.foregroundOps.indexOfKey(dumpOp) > 0) {\n hasOp2 = true;\n }\n if (!hasOp2 || !hasPackage2) {\n dumpMode = dumpUid4;\n dumpOp2 = dumpOp;\n now4 = now;\n dumpPackage2 = dumpPackage;\n now3 = nowElapsed6;\n } else if (!hasMode) {\n dumpPackage2 = dumpPackage;\n dumpMode = dumpUid4;\n dumpOp2 = dumpOp;\n now4 = now;\n now3 = nowElapsed6;\n }\n } catch (Throwable th6) {\n th = th6;\n throw th;\n }\n } else {\n dumpHistory = dumpOp5;\n dumpWatchers2 = dumpWatchers;\n }\n pw.print(\" Uid \");\n UserHandle.formatUid(pw, uidState3.uid);\n pw.println(\":\");\n pw.print(\" state=\");\n pw.println(AppOpsManager.getUidStateName(uidState3.state));\n if (uidState3.state != uidState3.pendingState) {\n pw.print(\" pendingState=\");\n pw.println(AppOpsManager.getUidStateName(uidState3.pendingState));\n }\n if (uidState3.pendingStateCommitTime != 0) {\n pw.print(\" pendingStateCommitTime=\");\n sdf3 = sdf6;\n nowElapsed = nowElapsed6;\n TimeUtils.formatDuration(uidState3.pendingStateCommitTime, nowElapsed, pw);\n pw.println();\n } else {\n sdf3 = sdf6;\n nowElapsed = nowElapsed6;\n }\n if (uidState3.startNesting != 0) {\n pw.print(\" startNesting=\");\n pw.println(uidState3.startNesting);\n }\n if (uidState3.foregroundOps != null && (dumpUid4 < 0 || dumpUid4 == 4)) {\n pw.println(\" foregroundOps:\");\n for (int j9 = 0; j9 < uidState3.foregroundOps.size(); j9++) {\n if (dumpOp < 0 || dumpOp == uidState3.foregroundOps.keyAt(j9)) {\n pw.print(\" \");\n pw.print(AppOpsManager.opToName(uidState3.foregroundOps.keyAt(j9)));\n pw.print(\": \");\n pw.println(uidState3.foregroundOps.valueAt(j9) ? \"WATCHER\" : \"SILENT\");\n }\n }\n pw.print(\" hasForegroundWatchers=\");\n pw.println(uidState3.hasForegroundWatchers);\n }\n needSep = true;\n if (opModes != null) {\n int opModeCount2 = opModes.size();\n int j10 = 0;\n while (j10 < opModeCount2) {\n int code2 = opModes.keyAt(j10);\n int mode3 = opModes.valueAt(j10);\n if (dumpOp >= 0) {\n opModeCount = opModeCount2;\n code = code2;\n if (dumpOp != code) {\n nowElapsed4 = nowElapsed;\n j10++;\n opModeCount2 = opModeCount;\n nowElapsed = nowElapsed4;\n }\n } else {\n opModeCount = opModeCount2;\n code = code2;\n }\n if (dumpUid4 >= 0) {\n nowElapsed4 = nowElapsed;\n mode2 = mode3;\n if (dumpUid4 != mode2) {\n j10++;\n opModeCount2 = opModeCount;\n nowElapsed = nowElapsed4;\n }\n } else {\n nowElapsed4 = nowElapsed;\n mode2 = mode3;\n }\n pw.print(\" \");\n pw.print(AppOpsManager.opToName(code));\n pw.print(\": mode=\");\n pw.println(AppOpsManager.modeToName(mode2));\n j10++;\n opModeCount2 = opModeCount;\n nowElapsed = nowElapsed4;\n }\n nowElapsed2 = nowElapsed;\n } else {\n nowElapsed2 = nowElapsed;\n }\n if (pkgOps2 == null) {\n dumpPackage2 = dumpPackage;\n dumpMode = dumpUid4;\n sdf6 = sdf3;\n now4 = now;\n dumpOp2 = dumpOp;\n now3 = nowElapsed2;\n } else {\n int pkgi2 = 0;\n while (pkgi2 < pkgOps2.size()) {\n Ops ops3 = pkgOps2.valueAt(pkgi2);\n if (dumpPackage == null || dumpPackage.equals(ops3.packageName)) {\n boolean op3 = false;\n int j11 = 0;\n while (j11 < ops3.size()) {\n try {\n Op op4 = (Op) ops3.valueAt(j11);\n int opCode = op4.op;\n if (dumpOp < 0 || dumpOp == opCode) {\n if (dumpUid4 >= 0) {\n j2 = j11;\n try {\n } catch (Throwable th7) {\n th = th7;\n throw th;\n }\n } else {\n j2 = j11;\n }\n if (!op3) {\n pw.print(\" Package \");\n pw.print(ops3.packageName);\n pw.println(\":\");\n printedPackage = true;\n } else {\n printedPackage = op3;\n }\n pw.print(\" \");\n pw.print(AppOpsManager.opToName(opCode));\n pw.print(\" (\");\n pw.print(AppOpsManager.modeToName(op4.mode));\n int switchOp = AppOpsManager.opToSwitch(opCode);\n if (switchOp != opCode) {\n pw.print(\" / switch \");\n pw.print(AppOpsManager.opToName(switchOp));\n Op switchObj = (Op) ops3.get(switchOp);\n if (switchObj != null) {\n mode = switchObj.mode;\n } else {\n mode = AppOpsManager.opToDefaultMode(switchOp);\n }\n pw.print(\"=\");\n pw.print(AppOpsManager.modeToName(mode));\n }\n pw.println(\"): \");\n uidState2 = uidState3;\n dumpPackage4 = dumpPackage;\n dumpMode3 = dumpUid4;\n dumpOp4 = dumpOp;\n sdf5 = sdf3;\n j = j2;\n ops = ops3;\n now7 = now;\n nowElapsed3 = nowElapsed2;\n dumpStatesLocked(pw, op4, now7, sdf5, date3, \" \");\n if (op4.running) {\n pw.print(\" Running start at: \");\n TimeUtils.formatDuration(nowElapsed3 - op4.startRealtime, pw);\n pw.println();\n }\n if (op4.startNesting != 0) {\n pw.print(\" startNesting=\");\n pw.println(op4.startNesting);\n }\n op3 = printedPackage;\n int i9 = j + 1;\n dumpOp = dumpOp4;\n nowElapsed2 = nowElapsed3;\n dumpUid4 = dumpMode3;\n now = now7;\n sdf3 = sdf5;\n pkgOps2 = pkgOps2;\n ops3 = ops;\n j11 = i9;\n dumpPackage = dumpPackage4;\n uidState3 = uidState2;\n } else {\n j2 = j11;\n }\n dumpMode3 = dumpUid4;\n uidState2 = uidState3;\n sdf5 = sdf3;\n dumpPackage4 = dumpPackage;\n dumpOp4 = dumpOp;\n ops = ops3;\n now7 = now;\n nowElapsed3 = nowElapsed2;\n j = j2;\n int i92 = j + 1;\n dumpOp = dumpOp4;\n nowElapsed2 = nowElapsed3;\n dumpUid4 = dumpMode3;\n now = now7;\n sdf3 = sdf5;\n pkgOps2 = pkgOps2;\n ops3 = ops;\n j11 = i92;\n dumpPackage = dumpPackage4;\n uidState3 = uidState2;\n } catch (Throwable th8) {\n th = th8;\n throw th;\n }\n }\n dumpMode2 = dumpUid4;\n pkgOps = pkgOps2;\n uidState = uidState3;\n dumpPackage3 = dumpPackage;\n now6 = now;\n now5 = nowElapsed2;\n sdf4 = sdf3;\n dumpOp3 = dumpOp;\n } else {\n dumpMode2 = dumpUid4;\n pkgOps = pkgOps2;\n uidState = uidState3;\n sdf4 = sdf3;\n now6 = now;\n dumpPackage3 = dumpPackage;\n dumpOp3 = dumpOp;\n now5 = nowElapsed2;\n }\n pkgi2++;\n dumpPackage = dumpPackage3;\n dumpOp = dumpOp3;\n nowElapsed2 = now5;\n uidState3 = uidState;\n dumpUid4 = dumpMode2;\n now = now6;\n sdf3 = sdf4;\n pkgOps2 = pkgOps;\n }\n dumpMode = dumpUid4;\n sdf6 = sdf3;\n now4 = now;\n dumpPackage2 = dumpPackage;\n dumpOp2 = dumpOp;\n now3 = nowElapsed2;\n }\n i8++;\n dumpPackage = dumpPackage2;\n dumpOp = dumpOp2;\n dumpOp5 = dumpHistory;\n nowElapsed6 = now3;\n dumpWatchers = dumpWatchers2;\n dumpUid4 = dumpMode;\n now = now4;\n }\n needSep = needSep2;\n i8++;\n dumpPackage = dumpPackage2;\n dumpOp = dumpOp2;\n dumpOp5 = dumpHistory;\n nowElapsed6 = now3;\n dumpWatchers = dumpWatchers2;\n dumpUid4 = dumpMode;\n now = now4;\n }\n long now10 = now;\n if (needSep) {\n pw.println();\n }\n int userRestrictionCount2 = this.mOpUserRestrictions.size();\n int i10 = 0;\n while (i10 < userRestrictionCount2) {\n IBinder token = this.mOpUserRestrictions.keyAt(i10);\n ClientRestrictionState restrictionState2 = this.mOpUserRestrictions.valueAt(i10);\n boolean printedTokenHeader = false;\n if (dumpUid4 >= 0 || dumpWatchers) {\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n } else if (dumpOp5) {\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n } else {\n int restrictionCount = restrictionState2.perUserRestrictions != null ? restrictionState2.perUserRestrictions.size() : 0;\n if (restrictionCount <= 0 || dumpPackage != null) {\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n } else {\n boolean printedOpsHeader = false;\n int j12 = 0;\n while (j12 < restrictionCount) {\n int userId = restrictionState2.perUserRestrictions.keyAt(j12);\n boolean[] restrictedOps2 = restrictionState2.perUserRestrictions.valueAt(j12);\n if (restrictedOps2 != null) {\n if (dumpOp < 0 || (dumpOp < restrictedOps2.length && restrictedOps2[dumpOp])) {\n if (!printedTokenHeader) {\n StringBuilder sb = new StringBuilder();\n sdf2 = sdf6;\n sb.append(\" User restrictions for token \");\n sb.append(token);\n sb.append(\":\");\n pw.println(sb.toString());\n printedTokenHeader = true;\n } else {\n sdf2 = sdf6;\n }\n if (!printedOpsHeader) {\n pw.println(\" Restricted ops:\");\n printedOpsHeader = true;\n }\n StringBuilder restrictedOpsValue = new StringBuilder();\n restrictedOpsValue.append(\"[\");\n int restrictedOpCount2 = restrictedOps2.length;\n date2 = date3;\n int k = 0;\n while (k < restrictedOpCount2) {\n if (restrictedOps2[k]) {\n restrictedOps = restrictedOps2;\n restrictedOpCount = restrictedOpCount2;\n if (restrictedOpsValue.length() > 1) {\n restrictedOpsValue.append(\", \");\n }\n restrictedOpsValue.append(AppOpsManager.opToName(k));\n } else {\n restrictedOps = restrictedOps2;\n restrictedOpCount = restrictedOpCount2;\n }\n k++;\n restrictedOps2 = restrictedOps;\n restrictedOpCount2 = restrictedOpCount;\n }\n restrictedOpsValue.append(\"]\");\n pw.print(\" \");\n pw.print(\"user: \");\n pw.print(userId);\n pw.print(\" restricted ops: \");\n pw.println(restrictedOpsValue);\n j12++;\n userRestrictionCount2 = userRestrictionCount2;\n now10 = now10;\n date3 = date2;\n sdf6 = sdf2;\n }\n }\n sdf2 = sdf6;\n date2 = date3;\n j12++;\n userRestrictionCount2 = userRestrictionCount2;\n now10 = now10;\n date3 = date2;\n sdf6 = sdf2;\n }\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n }\n int excludedPackageCount2 = restrictionState2.perUserExcludedPackages != null ? restrictionState2.perUserExcludedPackages.size() : 0;\n if (excludedPackageCount2 > 0 && dumpOp < 0) {\n boolean printedPackagesHeader = false;\n int j13 = 0;\n while (j13 < excludedPackageCount2) {\n int userId2 = restrictionState2.perUserExcludedPackages.keyAt(j13);\n String[] packageNames = restrictionState2.perUserExcludedPackages.valueAt(j13);\n if (packageNames == null) {\n excludedPackageCount = excludedPackageCount2;\n restrictionState = restrictionState2;\n } else {\n if (dumpPackage != null) {\n hasPackage = false;\n int length = packageNames.length;\n excludedPackageCount = excludedPackageCount2;\n int excludedPackageCount3 = 0;\n while (true) {\n if (excludedPackageCount3 >= length) {\n restrictionState = restrictionState2;\n break;\n }\n restrictionState = restrictionState2;\n if (dumpPackage.equals(packageNames[excludedPackageCount3])) {\n hasPackage = true;\n break;\n } else {\n excludedPackageCount3++;\n restrictionState2 = restrictionState;\n }\n }\n } else {\n excludedPackageCount = excludedPackageCount2;\n restrictionState = restrictionState2;\n hasPackage = true;\n }\n if (hasPackage) {\n if (!printedTokenHeader) {\n pw.println(\" User restrictions for token \" + token + \":\");\n printedTokenHeader = true;\n }\n if (!printedPackagesHeader) {\n pw.println(\" Excluded packages:\");\n printedPackagesHeader = true;\n }\n pw.print(\" \");\n pw.print(\"user: \");\n pw.print(userId2);\n pw.print(\" packages: \");\n pw.println(Arrays.toString(packageNames));\n }\n }\n j13++;\n excludedPackageCount2 = excludedPackageCount;\n restrictionState2 = restrictionState;\n }\n }\n }\n i10++;\n userRestrictionCount2 = userRestrictionCount;\n now10 = now2;\n date3 = date;\n sdf6 = sdf;\n }\n } catch (Throwable th9) {\n th = th9;\n throw th;\n }\n } catch (Throwable th10) {\n th = th10;\n throw th;\n }\n }\n if (dumpOp5 && !dumpWatchers) {\n this.mHistoricalRegistry.dump(\" \", pw, dumpUid2, dumpPackage, dumpOp);\n }\n }\n }", "public static void main(String[] args) throws BadCommandException, BadUrlException \n\t{\n\t\tint argsLen = args.length;\n\t\tString srcDb = \"\";\n\t\tString destDb = \"\";\n\t\tString srcPass = \"\";\n\t\tString destPass = \"\";\n\t\tString srcUser = \"\";\n\t\tString destUser = \"\";\n\t\t\n\t\targs = new String[4];\n\t\t/***** Debug input ****/\n\t\targs[0] = \"-o\";\n\t\targs[1] = \"localhost:3306/test_src\";\n\t\targs[2] = \"-d\";\n\t\targs[3] = \"localhost:3306/test_dest\";\n\t\targsLen = args.length;\n\t\t\n\t\tif(argsLen < 4)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tthrow new BadCommandException(\"You have an error in the arguments sintax\");\n\t\t\t}\n\t\t\tcatch(BadCommandException e)\n\t\t\t{\n\t\t\t\te.toString();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\tswitch(args[i])\n\t\t\t\t{\n\t\t\t\t\tcase \"-o\":\n\t\t\t\t\t\tsrcDb = args[i+1];\n\t\t\t\t\t\tif(!isUrlValid(srcDb))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthrow new BadUrlException(\"You have an error in the origin url sintax\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch(BadUrlException e)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\te.toString();\n\t\t\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase \"-d\":\n\t\t\t\t\t\tdestDb = args[i+1];\n\t\t\t\t\t\tif(!isUrlValid(destDb))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthrow new BadUrlException(\"You have an error in the destination url sintax\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch(BadUrlException e)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\te.toString();\n\t\t\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\tSystem.out.print(\"Insert the origin database user: \");\n\t\t\tsrcUser = Keyboard.readString();\n\t\t\tSystem.out.print(\"\\nInsert the origin database password: \");\n\t\t\tsrcPass = Keyboard.readString();\n\t\t\t\n\t\t\tSystem.out.print(\"\\n\\nInsert the destination database user: \");\n\t\t\tdestUser = Keyboard.readString();\n\t\t\tSystem.out.print(\"\\nInsert the destination database password: \");\n\t\t\tdestPass = Keyboard.readString();\n\t\t\t*/\n\t\t\t\n\t\t\tsrcUser = \"root\";\n\t\t\tsrcPass = \"180993\";\n\t\t\tdestUser = \"root\";\n\t\t\tdestPass = \"180993\";\n\t\t\t\n\t\t\tDbEngine srcDbEngine = new DbEngine();\n\t\t\ttry \n\t\t\t{\n\t\t\t\tsrcDbEngine.initConnection(srcDb, srcUser, srcPass);\n\t\t\t} \n\t\t\tcatch (DatabaseConnectionException e) \n\t\t\t{\n\t\t\t\t//e.printStackTrace(); //TODO Debug mode... Remove this.\n\t\t\t\tSystem.out.println(\"Fatal error: Failed to estabilish the connection with the origin database.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\tDbEngine destDbEngine = new DbEngine();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdestDbEngine.initConnection(destDb, destUser, destPass);\n\t\t\t}\n\t\t\tcatch(DatabaseConnectionException e)\n\t\t\t{\n\t\t\t\t//e.printStackTrace(); //TODO Debug mode... Remove this.\n\t\t\t\tSystem.out.println(\"Fatal error: Failed to estabilish the connection with the destination database.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t// Reading from wp_users\n\t\t\tSystem.out.println(\"Reading records from table wp_users...\");\n\t\t\tWPUserInterface srcUserInterface = new WPUserInterface(new WPUser(), srcDbEngine.getConnection());\n\t\t\ttry \n\t\t\t{\n\t\t\t\tsrcUserInterface.readTable();\n\t\t\t\t\n\t\t\t\tif(srcUserInterface.getReadValues().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Pay Attention!: No records have been read from the table wp_users.\");\n\t\t\t\t\twpUsersLength = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Read \" + srcUserInterface.getReadValues().size()\n\t\t\t\t\t\t\t+ \" records from table wp_users.\");\n\t\t\t\t\t\n\t\t\t\t\twpUsersLength = srcUserInterface.getReadValues().size();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Do you want to list the records? (y/n)\");\n\t\t\t\t\tString choose = Keyboard.readString();\n\t\t\t\t\t\n\t\t\t\t\tIterator<WPUser> itr = srcUserInterface.getReadValues().iterator();\n\t\t\t\t\t\n\t\t\t\t\tif(choose.equalsIgnoreCase(\"y\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint i = 1;\n\t\t\t\t\t\twhile(itr.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tWPUser usr = itr.next();\n\t\t\t\t\t\t\tSystem.out.println(i + \"--> \" + usr.toString());\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Writing wp_users\n\t\t\t\t\tSystem.out.println(\"Writing to wp_users...\");\n\t\t\t\t\tWPUserInterface dstUserInterface = new WPUserInterface(new WPUser(), destDbEngine.getConnection());\n\t\t\t\t\t\n\t\t\t\t\tdstUserInterface.setReadValues(srcUserInterface.getReadValues());\n\t\t\t\t\tdstUserInterface.writeTable();\n\t\t\t\t\twpUsersCopyLength = dstUserInterface.getRowsWithErrors().size();\n\t\t\t\t}\n\t\t\t} \n\t\t\tcatch (SQLException e) \n\t\t\t{\n\t\t\t\t//e.printStackTrace(); //TODO Debug mode... Remove this.\n\t\t\t\tSystem.out.println(\"Error: Failed to read the origin users table.\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Reading wp_usermeta\n\t\t\tSystem.out.println(\"Reading records from table wp_usermeta...\");\n\t\t\tWPUserMetaInterface wpUserMeta = new WPUserMetaInterface(new WPUserMeta(), srcDbEngine.getConnection());\n\t\t\ttry \n\t\t\t{\n\t\t\t\twpUserMeta.readTable();\n\t\t\t\t\n\t\t\t\tif(wpUserMeta.getReadValues().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Pay Attention!: No records have been read from the table wp_usermeta.\");\n\t\t\t\t\twpUserMetaLength = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Read \" + wpUserMeta.getReadValues().size()\n\t\t\t\t\t\t\t+ \" records from table wp_usermeta.\");\n\t\t\t\t\t\n\t\t\t\t\twpUserMetaLength = wpUserMeta.getReadValues().size();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Do you want to list the records? (y/n)\");\n\t\t\t\t\tString choose = Keyboard.readString();\n\t\t\t\t\t\n\t\t\t\t\tIterator<WPUserMeta> itr = wpUserMeta.getReadValues().iterator();\n\t\t\t\t\t\n\t\t\t\t\tif(choose.equalsIgnoreCase(\"y\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint i = 1;\n\t\t\t\t\t\twhile(itr.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tWPUserMeta usrMeta = itr.next();\n\t\t\t\t\t\t\tSystem.out.println(i + \"--> \" + usrMeta.toString());\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Writing wp_users\n\t\t\t\t\tSystem.out.println(\"Writing to wp_usermeta...\");\n\t\t\t\t\tWPUserMetaInterface dstUserMetaInterface = \n\t\t\t\t\t\t\tnew WPUserMetaInterface(new WPUserMeta(), destDbEngine.getConnection());\n\t\t\t\t\t\n\t\t\t\t\tdstUserMetaInterface.setReadValues(wpUserMeta.getReadValues());\n\t\t\t\t\tdstUserMetaInterface.writeTable();\n\t\t\t\t\twpUserMetaCopyLength = dstUserMetaInterface.getRowsWithErrors().size();\n\t\t\t\t}\n\t\t\t} \n\t\t\tcatch (SQLException e) \n\t\t\t{\n\t\t\t\t//e.printStackTrace(); //TODO Debug mode... Remove this.\n\t\t\t\tSystem.out.println(\"Error: Failed to read the origin wp_usermeta table.\");\n\t\t\t}\n\t\t\t\n\t\t\t//Reading wp_posts\n\t\t\tSystem.out.println(\"Reading records from table wp_posts...\");\n\t\t\tWPPostInterface wpPost = new WPPostInterface(new WPPost(), srcDbEngine.getConnection());\n\t\t\t\n\t\t\ttry \n\t\t\t{\n\t\t\t\twpPost.readTable();\n\t\t\t\t\n\t\t\t\tif(wpPost.getReadValues().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Pay Attention!: No records have been read from the table wp_posts.\");\n\t\t\t\t\twpPostLength = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Read \" + wpPost.getReadValues().size()\n\t\t\t\t\t\t\t+ \" records from table wp_posts.\");\n\t\t\t\t\t\n\t\t\t\t\twpPostLength = wpPost.getReadValues().size();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Do you want to list the records? (y/n)\");\n\t\t\t\t\tString choose = Keyboard.readString();\n\t\t\t\t\t\n\t\t\t\t\tIterator<WPPost> itr = wpPost.getReadValues().iterator();\n\t\t\t\t\t\n\t\t\t\t\tif(choose.equalsIgnoreCase(\"y\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint i = 1;\n\t\t\t\t\t\twhile(itr.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tWPPost post = itr.next();\n\t\t\t\t\t\t\tSystem.out.println(i + \"--> \" + post.toString());\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Writing wp_posts\n\t\t\t\t\tSystem.out.println(\"Writing to wp_posts...\");\n\t\t\t\t\tWPPostInterface dstPostInterface = new WPPostInterface(new WPPost(), destDbEngine.getConnection());\n\t\t\t\t\t\n\t\t\t\t\tdstPostInterface.setReadValues(wpPost.getReadValues());\n\t\t\t\t\tdstPostInterface.writeTable();\n\t\t\t\t\twpPostCopyLength = dstPostInterface.getRowsWithErrors().size();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} \n\t\t\tcatch (SQLException e) \n\t\t\t{\n\t\t\t\t//e.printStackTrace(); //TODO Debug mode... Remove this.\n\t\t\t\tSystem.out.println(\"Error: Failed to read the origin wp_posts table.\");\n\t\t\t}\n\t\t\t\n\t\t\t//Reading wp_postmeta\n\t\t\tSystem.out.println(\"Reading records from table wp_postmeta...\");\n\t\t\tWPPostMetaInterface wpPostMeta = new WPPostMetaInterface(new WPPostMeta(), srcDbEngine.getConnection());\n\t\t\t\n\t\t\ttry \n\t\t\t{\n\t\t\t\twpPostMeta.readTable();\n\n\t\t\t\tif(wpPostMeta.getReadValues().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Pay Attention!: No records have been read from the table wp_postmeta.\");\n\t\t\t\t\twpPostMetaLength = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Read \" + wpPostMeta.getReadValues().size()\n\t\t\t\t\t\t\t+ \" records from table wp_postmeta.\");\n\t\t\t\t\t\n\t\t\t\t\twpPostMetaLength = wpPostMeta.getReadValues().size();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Do you want to list the records? (y/n)\");\n\t\t\t\t\tString choose = Keyboard.readString();\n\t\t\t\t\t\n\t\t\t\t\tIterator<WPPostMeta> itr = wpPostMeta.getReadValues().iterator();\n\t\t\t\t\t\n\t\t\t\t\tif(choose.equalsIgnoreCase(\"y\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint i = 1;\n\t\t\t\t\t\twhile(itr.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tWPPostMeta postMeta = itr.next();\n\t\t\t\t\t\t\tSystem.out.println(i + \"--> \" + postMeta.toString());\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Writing wp_postmeta\n\t\t\t\t\tSystem.out.println(\"Writing to wp_postmeta...\");\n\t\t\t\t\tWPPostMetaInterface dstPostMetaInterface = \n\t\t\t\t\t\t\tnew WPPostMetaInterface(new WPPostMeta(), destDbEngine.getConnection());\n\t\t\t\t\t\n\t\t\t\t\tdstPostMetaInterface.setReadValues(wpPostMeta.getReadValues());\n\t\t\t\t\tdstPostMetaInterface.writeTable();\n\t\t\t\t\twpPostMetaCopyLength = dstPostMetaInterface.getRowsWithErrors().size();\n\t\t\t\t}\n\t\t\t} \n\t\t\tcatch (SQLException e) \n\t\t\t{\n\t\t\t\t//e.printStackTrace(); //TODO Debug mode... Remove this.\n\t\t\t\tSystem.out.println(\"Error: Failed to read the origin wp_postmeta table.\");\n\t\t\t}\n\t\t\t\n\t\t\tsummaryReport();\n\t\t}\n\t}", "public static String getDatabaseURL(String host, int port, String database){\n\t\treturn HIVE_URL_PREFIX + host + \":\" + port + \"/\" + database;\n\t}", "private void prepareClone(final MasterProcedureEnv env) throws IOException {\n final TableName tableName = getTableName();\n if (env.getMasterServices().getTableDescriptors().exists(tableName)) {\n throw new TableExistsException(tableName);\n }\n\n // check whether ttl has expired for this snapshot\n if (\n SnapshotDescriptionUtils.isExpiredSnapshot(snapshot.getTtl(), snapshot.getCreationTime(),\n EnvironmentEdgeManager.currentTime())\n ) {\n throw new SnapshotTTLExpiredException(ProtobufUtil.createSnapshotDesc(snapshot));\n }\n\n validateSFT();\n }", "public void restoreDB(String databaseName) throws Exception {\n boolean isBackup = this.uFile.isFileExists(context, \"backup-\" + databaseName);\n if (isBackup) {\n // check if database exists\n boolean isDB = this.uFile.isFileExists(context, databaseName);\n if (isDB) {\n boolean retD = this.uFile.deleteFile(context, databaseName);\n if (!retD) {\n String msg = \"Error: restoreDB: delete file \";\n msg += databaseName;\n throw new Exception(msg);\n } else {\n boolean retC = this.uFile.copyFile(context, \"backup-\" + databaseName, databaseName);\n if (!retC) {\n String msg = \"Error: restoreDB: copyItem\";\n msg += \" failed\";\n throw new Exception(msg);\n }\n }\n }\n } else {\n String msg = \"Error: restoreDB: backup-\" + databaseName;\n msg += \" does not exist\";\n throw new Exception(msg);\n }\n }", "public void dump(String prefix) {\n System.out.print(toString(prefix));\n System.out.println(\" \"+name);\n }", "public abstract boolean copyStatistics(DatabaseLoginConfiguration emptyDB, String localPath);", "private void copyDataBase() throws IOException {\n\t\tInputStream mInput = mContext.getAssets().open(DATABASE_NAME);\r\n\t\tString outFileName = DATABASE_PATH + DATABASE_NAME;\r\n\t\tOutputStream mOutput = new FileOutputStream(outFileName);\r\n\r\n\t\t// transferer donnees de la db\r\n\t\tbyte[] buffer = new byte[1024];\r\n\t\tint length;\r\n\t\twhile ((length = mInput.read(buffer)) > 0) {\r\n\t\t\tmOutput.write(buffer, 0, length);\r\n\t\t}\r\n\t\t// fermeture\r\n\t\tmOutput.flush();\r\n\t\tmOutput.close();\r\n\t\tmInput.close();\r\n\t}", "public static void main(String[] args) {\n boolean test1 = false;\n boolean test2 = false;\n Connection conn = null;\n String username = \"postgres\";\n String password = \"CSCI112ONLINE\"; //Update this if you used a different password\n\n /**\n * Test 1: Connecting to a database that doesn't exist\n */\n try {\n conn = DriverManager.getConnection(\"jdbc:postgresql://localhost/abcd\", username, password); //Create connection to database server\n System.out.println(\"Connected to database.\");\n }\n catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n System.out.println(\"This is expected. We didn't make an 'abcd' database.\");\n System.out.println(\"Test 1 Passed.\");\n test1 = true;\n }\n finally {\n try {\n conn.close(); //Try to close connection\n System.out.println(\"Connection to 'abcd' closed.\");\n }\n catch(Exception e) {\n //Connection wasn't opened; Do nothing.\n System.out.println(\"Can't close connection to 'abcd'. (This is OK because the connection was never opened.)\");\n }\n }\n\n System.out.println();\n\n /**\n * Test 2: Connecting to a database that does/should exist\n */\n try {\n conn = DriverManager.getConnection(\"jdbc:postgresql://localhost/Module8\", username, password); //Create connection to database server\n System.out.println(\"Connected to 'CSCI112' database.\");\n }\n catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n System.out.println(\"This should NOT happen. Check that Postgres is running (start pgAdmin), check spelling of database name in URL, and check username/password.\");\n }\n finally {\n try {\n conn.close(); //Try to close connection\n System.out.println(\"Connection to 'CSCI112' closed.\");\n System.out.println(\"Test 2 Passed.\");\n test2 = true;\n }\n catch(Exception e) {\n //Connection wasn't opened; Do nothing.\n System.out.println(\"Can't close connection to 'CSCI112'. (This shouldn't be printed.)\");\n }\n }\n\n /**\n * How'd it go?\n */\n if(test1 && test2) {\n System.out.println(\"\\nEverything is working correctly!\");\n }\n else {\n System.out.println(\"\\nTest was unsuccessful. Check the database server is running and that the URL and database names are correct.\");\n }\n\n }", "private void Btn_exportar_bkupActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n SimpleDateFormat d = new SimpleDateFormat(\"dd-MM-yyyy-HH-mm-ss\");\n Date date = new Date(); \n String respaldo= \"Respaldo_\"+d.format(date); \n respaldo=respaldo.toUpperCase();\n \n \n String cmd = \"expdp system/2015VC601 schemas=director directory=DIRECTORIO dumpfile=\"+respaldo+\".dmp logfile=\"+respaldo+\"_txt.log\"; //Comando \n Process exec = Runtime.getRuntime().exec(cmd); \n JOptionPane.showMessageDialog(rootPane, \"Generando respaldo, espere unos minutos.\");\n } catch (IOException | HeadlessException ioe) {\n System.out.println (ioe);\n }\n }", "@POST\n @Produces({\"application/json\"})\n public String createDb() throws WebApplicationException {\n HibernateEntityManager emAdm = PersistenceManager.getInstance().getEntityManagerAdmin();\n SQLQuery qCreate = emAdm.getSession().createSQLQuery(\"CREATE DATABASE test_jeff template=postgis\");\n try{\n qCreate.executeUpdate();\n }catch(SQLGrammarException e){\n System.out.println(\"Error !!\" + e.getSQLException());\n emAdm.close();\n return e.getSQLException().getLocalizedMessage();\n }\n emAdm.close();\n Map properties = new HashMap();\n //change the connection string to the new db\n properties.put(\"hibernate.connection.url\", \"jdbc:postgresql_postGIS://192.168.12.36:5432/test_jeff\");\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"dataPU\", properties); \n return \"Yeah\";\n }", "public final void mT__45() throws RecognitionException {\n try {\n int _type = T__45;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:15:7: ( 'database-' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:15:9: 'database-'\n {\n match(\"database-\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "SqlElasticPoolOperations.DefinitionStages.WithCreate withNewDatabase(String databaseName);", "public void customDump() {\n //Same with StandardHeapDumper StripHprofHeapDumper\n new ForkJvmHeapDumper().dump(\"absolute-path\");\n }", "public String backupName() {\n return this.backupName;\n }", "String toPdb() throws UnsupportedOperationException;", "public void copyDatabaseFromAsset() {\n\n /** Just to calculate time How much it will take to copy database */\n //Utility t = new Utility();\n\n\t\t/* Insert Database */\n DBHelper db = new DBHelper(this);\n\n try {\n boolean dbExist = db.isDataBaseAvailable();\n\n if (!dbExist)\n db.copyDataBaseFromAsset();\n\n /* Force fully calling onCreate to create table of Favourite*/\n //db.onCreate(db.getWritableDatabase());\n\n } catch (Exception e) {\n AppLogger.writeLog(\"state \" + TAG + \" -- \" + e.toString());\n\n if (AppConstants.DEBUG)\n Log.e(\"\", e.toString());\n }\n }", "private void copyDatabase() throws IOException {\n // Open your local database as the input stream\n InputStream inputStream = mContext.getAssets().open(DB_NAME);\n try {\n // Path to the newly created empty database\n String outFileName = DB_PATH + DB_NAME;\n OutputStream outputStream = new FileOutputStream(outFileName);\n try {\n // Transfer bytes from input file to output file\n byte[] buffer = new byte[1024];\n int len;\n while ((len = inputStream.read(buffer)) > 0) {\n outputStream.write(buffer, 0, len);\n }\n outputStream.flush();\n } finally {\n outputStream.close();\n }\n } finally {\n inputStream.close();\n }\n }", "public String getTableDbName() {\r\n return \"t_package\";\r\n }", "private void postCloneSnapshot(final MasterProcedureEnv env)\n throws IOException, InterruptedException {\n final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();\n if (cpHost != null) {\n final RegionInfo[] regions =\n (newRegions == null) ? null : newRegions.toArray(new RegionInfo[newRegions.size()]);\n cpHost.postCompletedCreateTableAction(tableDescriptor, regions, getUser());\n }\n }", "public static void restoreTable(SQLiteDatabase database, String tableName,\n String[] columns, String where) {\n String query = \"INSERT INTO \" + tableName + \" (\" + buildColumnsString(columns) + \") \" +\n SQLiteQueryBuilder.buildQueryString(false, tableName + BACKUP_PREFIX, columns, where,\n null, null, null, null);\n\n database.execSQL(query);\n dropBackupTableIfExist(database, tableName);\n Log.v(DatabaseHelper.TAG, query);\n }", "private void upgradeFrom(UpdateUI ui, CurrentSchemaVersion curr, CiDb db)\n throws OrmException, SQLException {\n List<SchemaVersion> pending = pending(curr.versionNbr);\n updateSchema(pending, ui, db);\n migrateData(pending, ui, curr, db);\n\n JdbcSchema s = (JdbcSchema) db;\n final List<String> pruneList = Lists.newArrayList();\n s.pruneSchema(new StatementExecutor() {\n @Override\n public void execute(String sql) {\n pruneList.add(sql);\n }\n\n @Override\n public void close() {\n // Do nothing.\n }\n });\n\n try (JdbcExecutor e = new JdbcExecutor(s)) {\n if (!pruneList.isEmpty()) {\n ui.pruneSchema(e, pruneList);\n }\n }\n }" ]
[ "0.59233564", "0.5563819", "0.51107544", "0.49543962", "0.49537903", "0.48355857", "0.48338664", "0.47790584", "0.46896783", "0.46606308", "0.4647409", "0.46360946", "0.457921", "0.45576882", "0.45193446", "0.4490559", "0.44856307", "0.44840565", "0.44792655", "0.44775996", "0.44281712", "0.4427133", "0.44182754", "0.4405287", "0.43945563", "0.43821585", "0.4363428", "0.43460736", "0.43245798", "0.43237355", "0.43232042", "0.43131837", "0.43125632", "0.4302146", "0.42700362", "0.42686078", "0.42660043", "0.42436004", "0.42421094", "0.42338008", "0.42302027", "0.42012277", "0.41960523", "0.41855112", "0.41467738", "0.41359052", "0.41293585", "0.41215453", "0.41160142", "0.40953097", "0.40883788", "0.40795255", "0.4065831", "0.40619084", "0.40539545", "0.40538523", "0.405226", "0.40513265", "0.40395108", "0.40367255", "0.4018171", "0.40022245", "0.39865547", "0.39846218", "0.39685133", "0.39651287", "0.39630255", "0.39594278", "0.39546204", "0.39512983", "0.39495182", "0.3936876", "0.39306825", "0.39300448", "0.39144903", "0.39065754", "0.39049524", "0.39048806", "0.3904319", "0.39027852", "0.38999987", "0.38917544", "0.38885814", "0.38824126", "0.38724342", "0.38661397", "0.38633248", "0.3849585", "0.38487908", "0.38419458", "0.38302806", "0.38292095", "0.38166007", "0.38144037", "0.38119176", "0.37945533", "0.37823647", "0.37797362", "0.377789", "0.37769285" ]
0.5918189
1
Instantiates a new graph node.
public GraphNode(String db, String table, List<Predicate> predicates) { this.db = db; this.table = table; this.predicates = predicates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected GraphNode() {\n }", "protected GraphNode() {\n }", "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public Node(){}", "public void create(NetworkNode networkNode);", "public Graph() {\n }", "public VISNode() {\n this.model = new VISNodeModel();\n }", "public Graph() {\r\n\t\tinit();\r\n\t}", "public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }", "public Node() {\n\n }", "public Node() {\r\n\t}", "public Node() {\r\n\t}", "public abstract GraphNode<N, E> createNode(N value);", "public Node() {\n\t}", "public FlowNodeInstance() {\n\t}", "public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }", "public Node(){\n\n\t\t}", "TNode createTNode();", "public Node() {\n }", "public Node(){\n }", "void nodeCreate( long id );", "private Node() {\n\n }", "Graph(){\n\t\taddNode();\n\t\tcurrNode=myNodes.get(0);\n\t}", "protected SceneGraphObject createNode() {\n\tthrow new SGIORuntimeException(\"createNode() not implemented in class \"+this.getClass().getName());\n }", "private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }", "public Node(){\n this(9);\n }", "public static GraphNode createGraphNodeForUseCase() {\n GraphNode graphNode = new GraphNode();\n GraphNode graphNodeName = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(60, 20 + 20 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNodeName.addContained(childNode);\n }\n\n graphNode.addContained(graphNodeName);\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create a use case\n UseCase usecase = new UseCaseImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n usecase.addStereotype(stereotype);\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n usecase.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(usecase);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "void createNode(NodeKey key);", "public Node(Integer number){\n this.number = number;\n this.edges = new ArrayList<Edge>();\n }", "public static GeglNode newNode() {\n\t\treturn com.jibee.gegl.priv.Gegl.INSTANCE.gegl_node_new();\n\t}", "public Node() {\n this.nodeMap = new HashMap<>();\n }", "public GraphInfo(){}", "protected SceneGraphObject createNode( Class state ) {\n\tSceneGraphObject ret;\n\n\ttry {\n\t ret = (SceneGraphObject)state.newInstance();\n\n\t //System.err.println(\"Created J3D node for \"+className );\n\t} catch( IllegalAccessException exce ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tstate.getClass().getName()+\" - IllegalAccess\" );\n\t} catch( InstantiationException excep ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tstate.getClass().getName() );\n\t}\n\n\treturn ret;\n }", "Node(int newId)\n {\n connectedNodes = new ArrayList<Node>();\n id = newId;\n weight = 0;\n }", "public Node( String id )\r\n {\r\n initialize(id);\r\n lbl = id;\r\n }", "public Node createNode(String p_name) {\n\t\tNode n = new Node(p_name, this);\n\t\taddNode(n);\n\t\treturn n;\n\t}", "public static GraphNode createGraphNodeForUseCaseConnector() {\n GraphNode graphNode = new GraphNode();\n GraphNode graphNodeName = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(60, 20 + 20 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNodeName.addContained(childNode);\n }\n graphNode.addContained(graphNodeName);\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(-50, -50));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create a use case\n UseCase usecase = new UseCaseImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n usecase.setNamespace(namespace);\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(usecase);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "protected SceneGraphObject createNode( String className ) {\n\tSceneGraphObject ret;\n\n\ttry {\n Class state = Class.forName( className, true, control.getClassLoader() );\n\n\t ret = createNode( state );\n\n\t //System.err.println(\"Created J3D node for \"+className );\n\t} catch(ClassNotFoundException e) {\n if (control.useSuperClassIfNoChildClass())\n ret = createNodeFromSuper( className );\n else\n throw new SGIORuntimeException( \"No Such Class \"+\n\t\t\t\t\t\tclassName );\n\t}\n\n\treturn ret;\n }", "Node(int newX, int newY, int newId)\n {\n connectedNodes = new ArrayList<Node>();\n id = newId;\n x = newX;\n y = newY;\n weight = 1;\n }", "void createNode(String path);", "protected Node createSceneGraph(Entity entity) {\n String name = cell.getCellID().toString();\n\n /* Create the new mesh for the shape */\n TriMesh mesh = new Box(name, new Vector3f(), 0.5f, 0.5f, 0.5f);\n\n /* Create the scene graph object and set its wireframe state */\n node = new Node();\n node.attachChild(mesh);\n node.setModelBound(new BoundingSphere());\n node.updateModelBound();\n node.setName(\"Cell_\"+cell.getCellID()+\":\"+cell.getName());\n\n return node;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic AnalysisGraph createNewInstance() {\n\t\tAnalysisGraph graph = new AnalysisGraph();\n\t\tgraph.currentIndex = currentIndex;\n\t\t\n\t\tgraph.nodes = (HashMap<String, Node>) nodes.clone();\n\t\tgraph.nodeList = (ArrayList<Node>)((ArrayList<Node>) nodeList).clone();\n\t\tgraph.links = (ArrayList<Link>)((ArrayList<Link>) links).clone();\n\t\treturn graph;\n\t}", "public static LabelToNode createScopeByGraph() {\n return new LabelToNode(new GraphScopePolicy(), nodeAllocatorByGraph());\n }", "public GraphNode(D data) {\n successors = new ArrayList<>();\n this.data = data;\n }", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "public Node(String n) {\n\t\tname = n;\n\t\t//connections = new ArrayList<Node>();\n\t\t//connections = new HashSet<String>();\n\t\t\n\t\t//checkRep();\n\t}", "public CassandraNode() {\r\n\t\tthis(null, 0);\r\n\t}", "@Override\n public Graph newInstance(int vertexesCount) {\n return new SimpleGraph();\n }", "Node(String d) {\n data = d;\n }", "NodeConnection createNodeConnection();", "public static GraphNode createGraphNodeForActor() {\n GraphNode graphNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNode.addContained(childNode);\n }\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create an actor\n Actor actor = new ActorImpl();\n\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n actor.addStereotype(stereotype);\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n actor.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(actor);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }", "public Node(String name) {\n this.name = name;\n }", "public Graph()\n\t{\n\t\tthis.map = new HashMap<Object, SinglyLinkedList>();\n\t}", "public NodeInfo() {\n }", "Node(long id, String label) {\n this.id = id;\n this.label = label;\n\n inEdges = new HashMap<>();\n outEdges = new HashMap<>();\n }", "public Node()\n {\n \n name = new String();\n type = new String(\"internal\"); //Initial Node type set to internal\n length = new Double(0); //Set initial branch length to zero\n children = new ArrayList<Node>();\n level = 0;\n treesize = new Double(0);\n depth = 0;\n newicklength = 0;\n startycoord = -1;\n startxcoord = -1;\n endxcoord = -1;\n endycoord = -1;\n standardy = -1;\n selected = false;\n xmultiplier = 0;\n ymultiplier = 0;\n }", "Vertex createVertex();", "public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}", "Vertex(){}", "private Node createNode(EventPair ep, Color c, Node parent) {\n Node node = new Node();\n node.ID = ep.ID;\n node.count = ep.count;\n node.color = c;\n node.left = createNullLeaf(node);\n node.right = createNullLeaf(node);\n node.parent = parent;\n return node;\n }", "Node(int newId, int newWeight)\n {\n connectedNodes = new ArrayList<Node>();\n id = newId;\n weight = newWeight;\n }", "public Node(int x, int y, int food) {\n\t\tthis(x, y);\n\t\tthis.ressourceValue = food;\n\t\n\t\tthis.neighbors = new ArrayList<Edge>();\n\t}", "public Node()\r\n\t{\r\n\t\tnext = null;\r\n\t\tinfo = 0;\r\n\t}", "Node(Vertex x,int w)\n\t{\n\t\tv=x;\n\t\tweight=w;\n\t}", "public Builder() {\n this(Graphs.<N, E>createUndirected());\n }", "public JXGraph() {\r\n this(0.0, 0.0, -1.0, 1.0, -1.0, 1.0, 0.2, 4, 0.2, 4);\r\n }", "public Node(double x, double y, NodeType type) {\n this(new Coordinates(x, y), type);\n }", "public GraphWrapper() {\n\t\tthis.graph = new Graph<T,E>();\n\t}", "public Node(ActivationFunction f) {\n\t\tnodeActivationFunction = f;\n\t}", "Node()\r\n { // constructor for head Node \r\n prev = this;\r\n next = this;\r\n trafficEntry = new TrafficEntry();\r\n }", "public static Graph<Vertex,Edge> createGraphObject()\n\t{\n\t\tGraph<Vertex,Edge> g = new DirectedSparseMultigraph<Vertex, Edge>();\n\t\treturn g;\n\t}", "private SceneGraphObject createNode( String className, Class[] parameterTypes, Object[] parameters ) {\n SceneGraphObject ret;\n Constructor constructor;\n\n try {\n Class state = Class.forName( className );\n constructor = state.getConstructor( parameterTypes );\n ret = (SceneGraphObject)constructor.newInstance( parameters );\n\t} catch(ClassNotFoundException e1) {\n if (control.useSuperClassIfNoChildClass())\n ret = createNodeFromSuper( className, parameterTypes, parameters );\n else\n throw new SGIORuntimeException( \"No State class for \"+\n\t\t\t\t\t\tclassName );\n\t} catch( IllegalAccessException e2 ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName+\" - IllegalAccess\" );\n\t} catch( InstantiationException e3 ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName );\n } catch( java.lang.reflect.InvocationTargetException e4 ) {\n\t throw new SGIORuntimeException( \"InvocationTargetException for \"+\n\t\t\t\t\t\tclassName );\n } catch( NoSuchMethodException e5 ) {\n for(int i=0; i<parameterTypes.length; i++)\n System.err.println( parameterTypes[i].getName() );\n System.err.println(\"------\");\n\t throw new SGIORuntimeException( \"Invalid constructor for \"+\n\t\t\t\t\t\tclassName );\n }\n\n return ret;\n }", "public Node(final String id) {\n super();\n this.id = id;\n }", "public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }", "public Node(IField field) {\n\t\tthis.x = field.getX();\n\t\tthis.y = field.getY();\n\n\t\tthis.growRate = field.getGrowingRate();\n\t\tthis.ressourceValue = field.getFood();\n\t\t\n\t\tthis.neighbors = new ArrayList<Edge>();\n\t}", "protected CreateMachineNodeModel() {\r\n super(0,1);\r\n }", "public Node(String name, String path) {\n this.name = name;\n this.path = path;\n }", "public Graph()\n\t{\n\t\tthis.total_verts = null;\n\t\tthis.total_edges = null;\n\t\tnodes = new HashMap<String, Node>();\n\t}", "protected Node(int xp, int yp) {\n\t\tx = xp;\n\t\ty = yp;\n\t\tEngine.getSingleton().addNode(this);\n\t}", "public Node() {\n\t\tsplithorizon = false;\n\t\troutingTable = new ArrayList<ArrayList<Integer>>();\n\t\troutingTable.add(new ArrayList<Integer>());\n\t\troutingTable.add(new ArrayList<Integer>());\n\t\troutingTable.add(new ArrayList<Integer>());\n\t}", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic Graph() {\r\n \tthis.vertex = new HashMap<T, Vertex>();\r\n \tthis.edge = new HashMap<Integer, Edge>();\r\n }", "public Node()\n {\n this.name=\"/\";\n this.type=0;\n this.stage=0;\n children=new ArrayList<Node>();\n }", "public NetworkNode(String id, String title, String label, String name, String type) {\n super();\n this.id = id;\n this.title = title;\n this.label = label;\n this.name = name;\n this.group = type;\n this.type = type;\n }", "public Node(State state) {\r\n\t\t\tthis.state=state;\r\n\t\t}", "public Node(){\n outgoing = new ArrayList<>();\n //System.out.println(\"Node created!\");\n }", "public NetworkNode(String id, String title, String label, String name, String type, String participant) {\n super();\n this.id = id;\n this.title = title;\n this.label = label;\n this.name = name;\n this.group = type;\n this.type = type;\n this.participant = participant;\n }", "public Node(SimacogoBoard board) {\n nodeType = MAXNODE;\n bestScore = Integer.MIN_VALUE;\n limit = board.getAvailableSlotArray();\n parent = null;\n depth = 0;\n }", "public Node(String data) {\n this.data = data;\n status = Visited.NEW;\n neighbors = new ArrayList();\n }", "public Node(String name, String state) {\n\t\tthis.name = name;\n\t\tthis.state = state;\n\t\tID = (name + state + lon + \"\" + lat).hashCode();\n\n\t\tedgeList = new ArrayList<Edge>();\n\t}", "public Node(Node<D> n) {\n\t\tdata = n.getData();\n\t\tnext = n.getNext();\n\t}", "public Node createNode(int value) {\r\n\t\treturn new Node(value, null, null);\r\n\t}", "public Graph() {\r\n\t\tnodePos = new HashMap<Integer, Vec2D>();\r\n\t\tconnectionLists = new HashMap<Integer, List<Connection>>();\r\n\t\t//screenWidth = Config.SCREEN_WIDTH;\r\n\t}", "public Node(int x, int y, char c, String identifier) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.c = c;\n\t\tthis.identifier = identifier;\n\t\tthis.incidentEdges = new ArrayList<Edge>();\n\t}", "public Graph() {\n\t\tdictionary=new HashMap<>();\n\t}", "public Node() {\n name = null;\n missionDescription = null;\n roles = null;\n stateValueBindings = null;\n nodeRuntime = null;\n isNetworkSingleton = false;\n }", "public static GraphNode createGraphNodeForActorConnector() {\n GraphNode graphNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNode.addContained(childNode);\n }\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(0, 0));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create an actor\n Actor actor = new ActorImpl();\n\n\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n actor.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(actor);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "public SimpleNodeLabel() {\n super();\n }" ]
[ "0.72950745", "0.72950745", "0.7194533", "0.7194533", "0.7194533", "0.7194533", "0.7173509", "0.70947206", "0.6974162", "0.6933513", "0.6869336", "0.6861136", "0.6834029", "0.6824395", "0.6824395", "0.6822533", "0.67881584", "0.6772991", "0.67674166", "0.6748443", "0.6747511", "0.6739966", "0.6719995", "0.66647595", "0.6609763", "0.6603027", "0.6535215", "0.6527926", "0.65242994", "0.65081626", "0.648186", "0.6421411", "0.6414579", "0.63912785", "0.6375303", "0.63434744", "0.6328846", "0.6319333", "0.63141316", "0.63116074", "0.63076484", "0.6301835", "0.62979966", "0.62792945", "0.6272114", "0.6253488", "0.62367207", "0.62349063", "0.61874557", "0.61814994", "0.6179437", "0.61690384", "0.6151715", "0.61295104", "0.6126157", "0.6121611", "0.61213523", "0.61202675", "0.61199284", "0.6109669", "0.6107449", "0.6076661", "0.6073326", "0.60425824", "0.60394657", "0.6030742", "0.6025793", "0.60216224", "0.60184145", "0.60154134", "0.6002334", "0.59943813", "0.59881526", "0.59848595", "0.59840626", "0.5974498", "0.59727263", "0.59718525", "0.59684336", "0.5967947", "0.59564435", "0.5952042", "0.5934764", "0.5928652", "0.59284604", "0.592579", "0.59238523", "0.5921017", "0.5914059", "0.5911483", "0.5908052", "0.5907286", "0.59072006", "0.5906635", "0.5902864", "0.589042", "0.5887971", "0.5886206", "0.58838415", "0.58790404", "0.5874474" ]
0.0
-1
Standard constructor that adds this JacobObject to the memory management pool.
public JacobObject() { ROT.addObject(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ObjectPool() {\n }", "public Memory() {\r\n init();\n ruletables = new RuleTables(this);\n budgetfunctions = new BudgetFunctions(this);\r\n }", "public Memory() {\n this(false);\n }", "Memory() {}", "public PoolBoneCpManager() {\n pool = null;\n }", "private MemoryTest() {\r\n }", "public GraphPool() {\n\t\tmMetadataPool = new PoolNodeMetadata();\n\t\tmIdentifierPool = new PoolNodeIdentifier(mMetadataPool);\n\t\tmLinkPool = new PoolExpandedLink(mIdentifierPool, mMetadataPool);\n\t}", "public MemManager( int poolSize )\n {\n\n this.poolSize = poolSize;\n memoryPool = new byte[poolSize];\n // creates a twoWayLinkedList that will store HashMaps defining the\n // blocks\n // of free space within our pool\n freeBlock = new HashMap<Integer, Integer>( 1 );\n freeBlock.put( 0, poolSize );\n freeBlockList = new TwoWayLinkedList<HashMap<Integer, Integer>>();\n // Initially adds the entire memory\n freeBlockList.add( freeBlock );\n\n }", "ObjectPool() {\n deadTime = DEFAULT_DEADTIME;\n lock = new Hashtable<T, Long>();\n unlock = new Hashtable<T, Long>();\n }", "public MemoryTest()\n {\n }", "public BufferPool(int numPages) {\n // some code goes here\n this.pageNum = numPages;\n this.bufferedPages = new ConcurrentHashMap<PageId, Node>();\n currentTransactions = new ConcurrentHashMap<TransactionId, Long>();\n lockManager = new LockManager();\n }", "private BlocksPool() {\n this(DEFAULT_BLOCK_SIZE_BYTES);\n }", "public MemoryByteArrayOutputStream() {\n\t\tthis(4096, 65536);\n\t}", "public MemoryCache() {\n\t\t// use 25% of available heap size\n\t\tsetLimit(Runtime.getRuntime().maxMemory() / 10);\n\t}", "public BufferPool(int numPages) {\n // some code goes here\n this.numPages = numPages;\n this.bufferPool = new PageBufferPool(numPages);\n }", "public HeapImp() {\n\t\tthis(10000);\n\t}", "public SRWDatabasePool() {\n }", "private IndexBitmapObject() {\n\t}", "private CollectTaskPool() {\n\t\tsuper();\n\t}", "public VMProcess() {\n\t\tsuper();\n\t}", "public VMProcess() \n\t{\n\t\tsuper();\n\t}", "private static BufferPoolMXBean createBufferPoolMXBean(BufferPool paramBufferPool)\n/* */ {\n/* 227 */ new BufferPoolMXBean() {\n/* */ private volatile ObjectName objname;\n/* */ \n/* */ public ObjectName getObjectName() {\n/* 231 */ ObjectName localObjectName = this.objname;\n/* 232 */ if (localObjectName == null) {\n/* 233 */ synchronized (this) {\n/* 234 */ localObjectName = this.objname;\n/* 235 */ if (localObjectName == null) {\n/* 236 */ localObjectName = Util.newObjectName(\"java.nio:type=BufferPool,name=\" + this.val$pool\n/* 237 */ .getName());\n/* 238 */ this.objname = localObjectName;\n/* */ }\n/* */ }\n/* */ }\n/* 242 */ return localObjectName;\n/* */ }\n/* */ \n/* */ public String getName() {\n/* 246 */ return this.val$pool.getName();\n/* */ }\n/* */ \n/* */ public long getCount() {\n/* 250 */ return this.val$pool.getCount();\n/* */ }\n/* */ \n/* */ public long getTotalCapacity() {\n/* 254 */ return this.val$pool.getTotalCapacity();\n/* */ }\n/* */ \n/* */ public long getMemoryUsed() {\n/* 258 */ return this.val$pool.getMemoryUsed();\n/* */ }\n/* */ };\n/* */ }", "public DBPoolImpl()\n {\n }", "public Pool() {\n\t\t// inicializaDataSource();\n\t}", "PackageBuilder() {\n\t\tweightMap = new HashMap<>();\n\t\tcostMap = new HashMap<>();\n\t\tcombinations = new ArrayList<>();\n\t}", "public ForkJoinPoolMgr() {\n }", "public ByteArrayCache() {\n try {\n imm = ImmortalMemory.instance();\n byteBuffers = (Queue) imm.newInstance(Queue.class);\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.WARN, getClass(), \"<init>\", e);\n System.exit(-1);\n }\n }", "public ResourcePoolImpl() {\r\n this((ResourcePool) null);\r\n }", "public MyMemory(int size){\n super(size);\n printSize();\n loadMemory(); //loads memory with instructions to be executed during the instruction cycle\n }", "public HeapSet () {\r\n\t\tsuper ();\r\n\t}", "public Allocation() {\n initComponents();\n }", "public Memory(int cache_size, int associativity, int block_size, boolean protocolIsMSI, int hitPenalty, int missPenalty, int numberOfBanks)\n\t{\n\t\tsuper(cache_size, associativity, block_size, protocolIsMSI);\n\t\tthis.hitPenalty = hitPenalty;\n\t\tthis.missPenalty = missPenalty;\n\t\tthis.numberOfBanks = numberOfBanks;\n\t\tthis.bankFreeAtCycle = new int[this.numberOfBanks];\n\t\tthis.addressesBeingRetrieved = new ArrayList<List<Message>>();\n\t\tfor(int i = 0; i < this.numberOfBanks; i++)\n\t\t{\n\t\t\tthis.addressesBeingRetrieved.add(new LinkedList<Message>());\n\t\t}\n//\t\tthis.bankQueues = new ArrayList<Queue<Message>>();\n//\t\tfor(int i = 0; i < this.numberOfBanks; i++)\n//\t\t{\n//\t\t\tthis.bankQueues.add(new LinkedList<Message>());\n//\t\t}\n\t}", "public MemoryJavaFileManager(M fileManager) {\n super(fileManager);\n classBytes = new HashMap<>();\n }", "public ConstantPool() {\n super(ActionType.CONSTANT_POOL);\n }", "public PlainMemory(String name)\n\t{\n\t\tsuper(name);\n\t\t\t\n\t}", "private Heap() { }", "private Heap() { }", "public RngObject() {\n\t\t\n\t}", "public CostFactoryImpl() {\n\t\tsuper();\n\t}", "public ObjectPool(Class javaBeanClass, String poolName) {\n setObjectFactory(javaBeanClass);\n setName(poolName);\n }", "private ConnectionPool() {\n connections = new LinkedBlockingQueue<>(DEFAULT_POOL_SIZE);\n this.init();\n }", "protected JvmMemoryMeta createJvmMemoryMetaNode(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer) {\n/* 541 */ return new JvmMemoryMeta(this, this.objectserver);\n/* */ }", "protected Recycler()\r\n/* 88: */ {\r\n/* 89:120 */ this(DEFAULT_MAX_CAPACITY_PER_THREAD);\r\n/* 90: */ }", "private Pools() {\n super();\n }", "public BinaryHeap() {\n }", "protected Recycler(int maxCapacityPerThread)\r\n/* 93: */ {\r\n/* 94:124 */ this(maxCapacityPerThread, MAX_SHARED_CAPACITY_FACTOR);\r\n/* 95: */ }", "public PQueue() {\n this(0,null);\n }", "ValueQueue() { super(); }", "protected abstract Object createJvmMemoryMBean(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer);", "public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }", "public MossClone() {\n super();\n }", "public KnowledgeBase() {\r\n super();\r\n this.m_data = new Concept[64 * 1024];\r\n this.m_services = new Service[1024];\r\n }", "public AVRMemory()\n {\n super(32, 256, 4096, 65535);\n }", "protected IBDS()\r\n {\r\n \tthis.modifyBuffer = new StringBuffer(300); // all update operations belong to this only\r\n this.nodeList = new ArrayList<int []>(50);\r\n this.lastUpdated = System.nanoTime();\r\n //this.objectArray = new ArrayList();\r\n }", "public MarkusMachine ()\n {\n fMemory = new Hashtable <String, Object> ();\n }", "public ArrayQueue() {\n this(10);\n }", "protected DenseMatrix()\n\t{\n\t}", "public VRpDyIpbbCpuMemDAOImpl() {\r\n super();\r\n }", "public Process() {\n\t\tthis(null);\n\t}", "public Heap(){\n super();\n }", "public NativePrimitiveArrayStateManagerImpl()\n {\n }", "public AnnotatorPool() {\n this.factories = Generics.newHashMap();\n }", "public Ms2Cluster() { super(); }", "public CheckpointManager() {\n this(new HashMap<>());\n }", "public ClientMBean() {\n }", "public Proc() {\n\t\tpriority = Integer.MIN_VALUE; /*\n\t\t\t\t\t\t\t\t\t * This way new Proc objects will always\n\t\t\t\t\t\t\t\t\t * have a default lowest priority which can\n\t\t\t\t\t\t\t\t\t * be changed later\n\t\t\t\t\t\t\t\t\t */\n\t\tprocID = 0; // Default ID value that will likely be occupied\n\t\theapIndex = -1; // Invalid value for a new Proc, to keep the process from overwriting any used locations\n\t}", "public VMKernel()\n {\n super();\n }", "public Bag() {\n\t\tinstances = new ArrayList<double[]>();\n\t\tname = \"\";\n\t}", "private WeakOrderQueue()\r\n/* 216: */ {\r\n/* 217:245 */ this.owner = null;\r\n/* 218:246 */ this.availableSharedCapacity = null;\r\n/* 219: */ }", "public CachedSubsumptionGraph() {\n }", "public Queue()\r\n\t{\r\n\t\tthis(capacity);\r\n\t}", "protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.clusterId = software.amazon.jsii.Kernel.get(this, \"clusterId\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.instanceType = software.amazon.jsii.Kernel.get(this, \"instanceType\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.autoscalingPolicy = software.amazon.jsii.Kernel.get(this, \"autoscalingPolicy\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.bidPrice = software.amazon.jsii.Kernel.get(this, \"bidPrice\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.configurationsJson = software.amazon.jsii.Kernel.get(this, \"configurationsJson\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.ebsConfig = software.amazon.jsii.Kernel.get(this, \"ebsConfig\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.aws.EmrInstanceGroupEbsConfig.class)));\n this.ebsOptimized = software.amazon.jsii.Kernel.get(this, \"ebsOptimized\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));\n this.instanceCount = software.amazon.jsii.Kernel.get(this, \"instanceCount\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.name = software.amazon.jsii.Kernel.get(this, \"name\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.count = software.amazon.jsii.Kernel.get(this, \"count\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.dependsOn = software.amazon.jsii.Kernel.get(this, \"dependsOn\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ITerraformDependable.class)));\n this.lifecycle = software.amazon.jsii.Kernel.get(this, \"lifecycle\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformResourceLifecycle.class));\n this.provider = software.amazon.jsii.Kernel.get(this, \"provider\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformProvider.class));\n }", "public ObjectPool(PoolObjectFactory factory, String poolName) {\n setObjectFactory(factory);\n setName(poolName);\n }", "public MemoryPool(String id, Configuration config, ThresholdValues thresholdValues) {\n super(id, COMPONENT, config);\n setThresholdValues(thresholdValues);\n monitor = createMeasurableMonitor(id);\n setView(VIEW);\n if(monitor==null) {\n setEnabled(false);\n StringBuilder poolNames = new StringBuilder();\n for(MemoryPoolMXBean mBean : ManagementFactory.getMemoryPoolMXBeans()) {\n if(poolNames.length()>0)\n poolNames.append(\", \");\n poolNames.append(mBean.getName());\n }\n logger.warn(\"Unable to obtain a monitor for {}, available memory pools are [{}]. \" +\n \"Cannot monitor the requested memory pool\", id, poolNames);\n }\n try {\n sampleSize = Config.getIntEntry(config,\n COMPONENT,\n \"sampleSize\",\n 1, /* default */\n 1, /* min */\n 10); /* max */\n setSampleSize(sampleSize);\n } catch (ConfigurationException e) {\n logger.warn(\"Unable to obtain {}.sampleSize from configuration, use default and continue\", COMPONENT);\n }\n\n try {\n long reportRate = Config.getLongEntry(config,\n COMPONENT,\n \"reportRate\",\n DEFAULT_PERIOD, /* default */\n 5000, /* min */\n Integer.MAX_VALUE); /* max */\n setPeriod(reportRate);\n } catch (ConfigurationException e) {\n logger.warn(\"Unable to obtain {}.reportRate from configuration, use default and continue\", COMPONENT);\n }\n }", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "public MyQueue() {\n stack = new LinkedList<Integer>();\n cache = new LinkedList<Integer>();\n }", "public LinkQueue(){\n }", "public ConstantPoolReader() {\n }", "public MemoryInfo(com.google.appinventor.components.runtime.ComponentContainer r7) {\n /*\n r6 = this;\n r1 = r6\n r2 = r7\n r3 = r1\n r4 = r2\n com.google.appinventor.components.runtime.Form r4 = r4.$form()\n r3.<init>(r4)\n r3 = r1\n r4 = 1048576(0x100000, double:5.180654E-318)\n r3.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r4\n r3 = r1\n r4 = r2\n android.app.Activity r4 = r4.$context()\n r3.context = r4\n r3 = r1\n r4 = r2\n r3.container = r4\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.MemoryInfo.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }", "GenericHeap() { // default\r\n\r\n\t}", "@JRubyMethod(name = \"new\")\n public static IRubyObject newObject(ThreadContext ctx, IRubyObject self) {\n return self.rbClone().callMethod(ctx, \"reset\");\n }", "public Memory.Component<SharedMemory> newComponent() {\r\n return this._newComponent(new Memory.Requires<SharedMemory>() {}, true);\r\n }", "protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}", "public VMKernel() {\n }", "public LibraryCache() {\n\t }", "public AssemblerContext(ConstantPool pool)\n {\n assert pool != null;\n m_pool = pool;\n }", "public TestSmallBenchmarkObjectRecord() {\n\t\tsuper(org.sfm.jooq.beans.tables.TestSmallBenchmarkObject.TEST_SMALL_BENCHMARK_OBJECT);\n\t}", "public BitmapMemoryCache() {\r\n //use 25% of available heap size\r\n setLimit(Runtime.getRuntime().maxMemory() / 4);\r\n }", "protected MemObject (int nElem)\n {\n if (nElem > 0) mem = new Object [nElem];\n }", "public MemoryImpl(int size) {\n\t\tif (size < 0) {\n\t\t\tthrow new IllegalArgumentException(\"The size of the memory should be greater than 0!\");\n\t\t}\n\t\tmemory = new Object[size];\n\t}", "public ReplicationObject() {\n }", "public Main() {\n this(DEFAULT_SIZE);\n }", "public Main() {\n this(DEFAULT_SIZE);\n }", "private Moneygraph() {\n super(\"moneygraph\", null);\n }", "public PromoBonusImpl() {\n }", "public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}", "public HeapCacheBuilder() {\n this.name = \"imcache-heap-cache-\" + cacheNumber.incrementAndGet();\n }", "public BbsOperation () {\r\n\t\tsuper();\r\n\t}", "protected abstract Object createJvmCompilationMBean(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer);", "protected SimpleMatrix() {}" ]
[ "0.7101484", "0.66645557", "0.651883", "0.6516652", "0.615242", "0.6136092", "0.6125935", "0.6111598", "0.5994099", "0.5987978", "0.5985403", "0.5961042", "0.5917398", "0.5914178", "0.5898308", "0.5873746", "0.5851454", "0.5848774", "0.5833982", "0.58292186", "0.58224046", "0.5820035", "0.5815803", "0.58134264", "0.58072513", "0.57752883", "0.57545066", "0.57477707", "0.5718865", "0.5712449", "0.5702041", "0.5687919", "0.5658366", "0.5657498", "0.56545997", "0.5648039", "0.5648039", "0.5627374", "0.5617127", "0.5616074", "0.5615813", "0.5606827", "0.56052464", "0.5599762", "0.5597516", "0.55947626", "0.55938464", "0.55921465", "0.55880225", "0.5560725", "0.55485153", "0.55358446", "0.5520762", "0.5519684", "0.5519633", "0.55088055", "0.55006605", "0.54934555", "0.5476894", "0.547569", "0.54744095", "0.5469044", "0.544413", "0.54389805", "0.54339826", "0.5432261", "0.5425136", "0.54242355", "0.54216284", "0.54209787", "0.54169756", "0.5411581", "0.5411356", "0.5406778", "0.5400181", "0.5397063", "0.5384647", "0.53834987", "0.53755885", "0.53752226", "0.5374812", "0.53720915", "0.53611344", "0.53582764", "0.5353552", "0.5352643", "0.5347713", "0.53467315", "0.53440934", "0.5332028", "0.53317124", "0.53286606", "0.53286606", "0.5326963", "0.53246045", "0.5309969", "0.5309838", "0.5302485", "0.52963793", "0.5293658" ]
0.5781665
25
Finalizers call this method. This method should release any COM data structures in a way that it can be called multiple times. This can happen if someone manually calls this and then a finalizer calls it.
public void safeRelease() { // currently does nothing - subclasses may do something if (isDebugEnabled()) { // this used to do a toString() but that is bad for SafeArray debug("SafeRelease: " + this.getClass().getName()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finalize() {\r\n if ( componentHistogram != null ) {\r\n componentHistogram.dispose();\r\n componentHistogram = null;\r\n }\r\n\r\n if ( componentLUT != null ) {\r\n componentLUT.dispose( false );\r\n componentLUT = null;\r\n }\r\n\r\n if ( lutRecorder != null ) {\r\n lutRecorder.setVisible( false );\r\n lutRecorder.dispose();\r\n lutRecorder = null;\r\n }\r\n }", "protected void finalize() {\n this.asClient.close();\n this.asClient = null;\n }", "public void finalize() {\r\n\r\n mask = null;\r\n newMask = null;\r\n newShortMask = null;\r\n System.gc();\r\n }", "public void finalize() {\n AppMethodBeat.i(66593);\n if (this.mJitterBuffer != 0) {\n nativeDestoryJitterBuffer(this.mJitterBuffer);\n this.mJitterBuffer = 0;\n }\n AppMethodBeat.o(66593);\n }", "public void finalize() {\r\n byteBuffer2 = null;\r\n byteBuffer4 = null;\r\n byteBuffer8 = null;\r\n progressBar = null;\r\n tagBuffer = null;\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ioe) {\r\n // Do nothing\r\n }\r\n }\r\n\r\n raFile = null;\r\n }", "@Override()\r\n protected void finalize() {\r\n destroy();\r\n }", "public static void Finalize() {\n isReady = false;\n\n try {\n for (RemoteField f : exported)\n UnicastRemoteObject.unexportObject(f, true);\n if (registry != null)\n UnicastRemoteObject.unexportObject(registry, true);\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }", "@Override\n public void cleanup() {\n \n }", "@Override\n public void cleanup() {\n \n }", "public void finalize() {\n\n if (mBtManager != null) {\n //mBtManager.stop();\n mBtManager.setHandler(null);\n }\n mBtManager = null;\n mContext = null;\n mConnectionInfo = null;\n }", "public void finalize() {\r\n super.finalize();\r\n }", "public void destruct() {\n\t\tif (super.getUsia() == 0) {\n\t\t\t// destructor Singa\n\t\t\tSystem.gc();\n\t\t\ttry {\n\n\t\t\t\tfinalize();\n\t\t\t} catch (Throwable throwable) {\n\t\t\t\tthrowable.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void finalize()\r\n\t{\n\t}", "@Override\r\n public void cleanup() {\n }", "public void dispose() {\r\n\t\tif (ref != null) {\r\n\t\t\tLLVMLibrary.LLVMDisposeGenericValue(ref);\r\n\t\t\tref = null;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "public void finalize() {\r\n srcImage = null;\r\n destImage = null;\r\n buffer = null;\r\n validBuffer = null;\r\n idealBuffer = null;\r\n objectBuffer = null;\r\n super.finalize();\r\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "void finalizeStructure();", "protected void finalize() {\n\t\tdestroyImages();\n\t}", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n sliceBuffer = null;\r\n super.finalize();\r\n }", "public void finalize()\n throws Throwable\n {\n pythonDecRef();\n }", "protected void finalize()\n {\n dispose();\n }", "@Override\n\tprotected void finalize() {\n\t\tif(refcount>0){\n\t\t\tprint(\"Error \"+refcount+\"Shared \"+id+\"objects in use\");\n\t\t}\n\t}", "public void releaseCollection() {\n\t\tcourseDictionary = null;\n\t\t}", "@Override\n public void cleanup() {\n }", "@Override\r\n protected void finalize() throws Throwable {\r\n super.finalize();\r\n RefNative.destroyNativeClassLoader(this);\r\n System.out.println(this + \" finalized\");\r\n }", "public void finalize() throws Throwable {\n delete(this.nativeObj);\n }", "public void finalize() throws Throwable {\n delete(this.nativeObj);\n }", "@Override\n public void release() {\n\n super.release();\n collection = null;\n labelName = null;\n labelProperty = null;\n name = null;\n property = null;\n style = null;\n styleClass = null;\n\n }", "protected void finalize() {\n close();\n }", "public final void cleanUp() {\n\t\tmgdmfunctions = null;\n\t\tmgdmlabels = null;\n\t\theap.finalize();\n\t\theap = null;\n\t\tSystem.gc();\n\t}", "protected void finalize() {\n\t\tclose();\n\t}", "public void close() {\n finalize0();\n }", "@Override\n\tpublic void cleanup() {\n\n\t}", "@Override\n\tpublic void cleanup() {\n\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "@Override\n\tpublic void cleanup() {\n\t\t\n\t}", "public void finalize() {\r\n fileName = null;\r\n fileDir = null;\r\n fileHeader = null;\r\n\r\n fileInfo = null;\r\n image = null;\r\n vr = null;\r\n\r\n if (rawFile != null) {\r\n\r\n try {\r\n rawFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n rawFile.finalize();\r\n }\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n raFile = null;\r\n }\r\n\r\n rawFile = null;\r\n nameSQ = null;\r\n jpegData = null;\r\n\r\n try {\r\n super.finalize();\r\n } catch (final Throwable er) {\r\n // ignore errors during memory cleanup..\r\n }\r\n }", "public void cleanup() {\r\n }", "@Override\r\n\tpublic void dispose() {\r\n\t\tFreeType.doneFace(face);\r\n\t\tFreeType.doneFreeType(library);\r\n\t}", "@Override\n public void destroy() {\n super.destroy();\n mNativePtr = 0;\n }", "protected void releaseReferences() {\r\n\r\n\t}", "protected final void finalize() {\n if (native_lock != null) {\n synchronized(native_lock) {\n String error = native_finalize(); // may be called more than once\n if (error != null)\n debug(error + \" in native_finalize\");\n }\n }\n }", "@Override\n\tpublic void finalize() {\n\t\t\n\t}", "public void m63704a() {\n DisposableHelper.dispose(this.f53847e);\n }", "@Override\n public void cleanUp() {\n }", "public void finalize() {\r\n printToLogFile = null;\r\n selectedFiles = null;\r\n }", "public void dispose() {\r\n\t\t// Nothing to dispose\r\n\t}", "public void finalize(){\r\n srcImage = null;\r\n sigmas = null;\r\n xDataRound = null;\r\n yDataRound = null;\r\n zDataRound = null;\r\n super.finalize();\r\n }", "@VisibleForTesting\n public void cleanup() {\n cleanupNative();\n }", "public void cleanup() {\n\t}", "public void dispose() {\n\t\t// Nothing to dispose\n\t}", "public void finalize() {\n acquire.release();\n }", "public void finalize() {\n acquire.release();\n }", "public void finalize() {\r\n\t\tdestImage = null;\r\n\t\tsrcImage = null;\r\n\t\tsuper.finalize();\r\n\t}", "@Override\r\n protected void finalize() throws Throwable {\r\n super.finalize();\r\n dispose();\r\n }", "protected void finalize() { \n \tstopSelf(); \n }", "public void Finalize()\r\n {orders.add(this.o);\r\n this.o=null; }", "@Override\n protected void finalize() throws Throwable\n {\n finalize(pointer);\n super.finalize();\n }", "public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}", "public void release()\r\n\t{\r\n\t\tsuper.release();\r\n\t\t_href = null;\r\n\t\t_box = null;\r\n\t\t_bracket = null;\r\n\t\t_bracketFont = null;\r\n\r\n\t}", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n super.finalize();\r\n }", "@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void finalize() throws Throwable {\n\t\tzSampleRecord.recycle();\n\t\tySampleRecord.recycle();\n\t\tsuper.finalize();\n\t}", "public void release()\n \t{\n \t\tif( iterator == null )\n \t\t{\n \t\t\tindex = new SpatialIndex();\n \t\t\tedgeAllocator = 0;\n \t\t\tmergeOps = null;\n \t\t\t\n \t\t\tSystem.gc();\n \t\t}\n \t}", "public boolean Finalize() {\n\treturn Finalize(false);\n }", "public void cleanup() {\n\t\tref.removeEventListener(listener);\n\t\tmodels.clear();\n\t\tmodelNames.clear();\n\t\tmodelNamesMapping.clear();\n\t}", "@Override\n protected void onFinalize() throws ACBrException {\n if (getHandle() != 0) {\n int ret = ACBrAACInterop.INSTANCE.AAC_Destroy(getHandle());\n checkResult(ret);\n setHandle(0);\n }\n }", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "protected void cleanupOnClose() {\n\t}", "public void finalize(){\r\n\t\tthis.userInputs.close();\r\n\t}", "@Override\n\tpublic void cleanUp() {\n\t\tofferingStrategy = null;\n\t\tacceptConditions = null;\n\t\topponentModel = null;\n\t\tnegotiationSession = null;\n\t\tutilitySpace = null;\n\t\tdagent = null;\n\t}", "public void finalize() throws Throwable {\n if (this.mObject != 0) {\n nativeDestroy(this.mObject);\n }\n }", "public void finalize();", "public void close() {\n\t\tif(combox != null){\n\t\t\tcombox.close();\n\t\t}\n\t\tcombox = null;\n\t}", "public void dispose()\n {\n getLogger().debug( \"dispose\" );\n }", "void destruct()\n\t{\n\t\t super.destruct();\n\t\tlistenerList = null;\n\t}", "@Override\n protected void cleanup() {\n bundle.setParameter(BundleParameter.NODE_BUNDLE_ELAPSED_PARAM, accumulatedElapsed.get());\n this.dataProvider = null;\n usedClassLoader.dispose();\n usedClassLoader = null;\n //taskNotificationDispatcher.setBundle(this.bundle = null);\n this.taskList = null;\n this.uuidList = null;\n setJobCancelled(false);\n this.taskWrapperList = null;\n timeoutHandler.clear();\n }", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n mask = null;\r\n\r\n if (keepProgressBar == false) {\r\n disposeProgressBar();\r\n }\r\n\r\n try {\r\n super.finalize();\r\n } catch (Throwable er) { }\r\n }", "public void cleanup() {\n }", "public void dispose()\n\t{\n\t\tthis.accessor.dispose();\n\t\tthis.env.close();\n\t}", "protected void finalize() throws Throwable {\n\t\tsuper.finalize();\r\n\t\tthis.globalStaticDataMap.clear();\r\n\t\trowSet = null;\r\n\t}", "public void dispose() {\r\n _isdisposed=true;\r\n try {\r\n _tables.dispose(); _tables=null;\r\n finalize();\r\n DataSet _current=this;\r\n _current=null; System.gc();\r\n }\r\n catch (Throwable ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n }", "public void release() {\r\n pageEL = null;\r\n params = null;\r\n super.release();\r\n }" ]
[ "0.7059561", "0.69709396", "0.68783534", "0.6861403", "0.6835393", "0.67509675", "0.673921", "0.66634953", "0.66634953", "0.6646586", "0.6645432", "0.664313", "0.6631796", "0.66283685", "0.662658", "0.6596812", "0.6596224", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.6579202", "0.65614176", "0.65494764", "0.6537737", "0.65300834", "0.65195435", "0.6517176", "0.6512049", "0.6509903", "0.65030503", "0.6458273", "0.6458273", "0.64521605", "0.6450306", "0.6449082", "0.6444399", "0.6438999", "0.64377046", "0.64377046", "0.6426725", "0.6426725", "0.6426725", "0.64221686", "0.6416106", "0.6412751", "0.64097136", "0.638584", "0.637329", "0.63663745", "0.6359005", "0.63569385", "0.63429224", "0.6341311", "0.6339407", "0.63252836", "0.6321474", "0.63206035", "0.63086826", "0.63086826", "0.63071644", "0.62925303", "0.6289051", "0.6288359", "0.62869644", "0.6286805", "0.62849134", "0.6284792", "0.62808233", "0.6280069", "0.6266621", "0.6258225", "0.62427044", "0.6231086", "0.62283695", "0.6217041", "0.62109137", "0.62022597", "0.619736", "0.61961263", "0.61954737", "0.6192623", "0.6192302", "0.61919254", "0.6190051", "0.61867625", "0.6183957", "0.61820483", "0.61670804", "0.616658" ]
0.0
-1
Loads JacobVersion.Properties and returns the value of version in it
@Deprecated public static String getBuildDate() { return JacobReleaseInfo.getBuildDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBuildVersion() {\n try {\n Properties versionFileProperties = new Properties();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(\"version.properties\");\n if (inputStream != null) {\n versionFileProperties.load(inputStream);\n return versionFileProperties.getProperty(\"version\", \"\") + \" \" + versionFileProperties.getProperty(\"timestamp\", \"\");\n }\n } catch (IOException e) {\n Logger.getLogger(OnStartup.class.getName()).log(Level.SEVERE, null, e);\n }\n return \"\";\n }", "public static String getAppVersion(){\r\n return getProperty(\"version\");\r\n }", "public static String getVersion()\n {\n String result = \"unkown version\";\n InputStream properties = DashboardMojo.class.getResourceAsStream( \n \"/META-INF/maven/\" + GROUP_ID + \"/\" + ARTIFACT_ID + \"/pom.properties\" );\n if ( properties != null )\n {\n try\n {\n Properties props = new Properties();\n props.load( properties );\n result = props.getProperty( \"version\" );\n }\n catch ( IOException e )\n {\n result = \"problem determining version\";\n }\n finally\n {\n IOUtil.close( properties );\n }\n }\n return result;\n }", "private static String getVersionFromPom() {\n\n final String absolutePath = new File(BuildVersion.class.getResource(BuildVersion.class\n .getSimpleName() + \".class\").getPath())\n .getParentFile().getParentFile().getParentFile().getParentFile().getParentFile()\n .getParentFile().getParentFile().getAbsolutePath();\n\n final File file = new File(absolutePath + \"/pom.xml\");\n\n try (InputStreamReader reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)) {\n\n final MavenXpp3Reader xpp3Reader = new MavenXpp3Reader();\n Model model = xpp3Reader.read(reader);\n return model.getVersion();\n\n } catch (NoClassDefFoundError e) {\n // if you want to get the version possibly in development add in to your pom\n // pax-url-aether.jar\n return null;\n } catch (Exception e) {\n return null;\n }\n }", "private static String getProjectVersion() {\n\t\tString version;\n\n\t\ttry {\n\t\t\tfinal Properties pomProperties = new Properties();\n\t\t\tpomProperties.load(Main.class.getResourceAsStream(\n \"/META-INF/MediaPlayer/pom.properties\"));\n\t\t\tversion = pomProperties.getProperty(\"version\");\n\t\t} catch(Exception e) {\n\t\t\tversion = \"RUNNING.IN.IDE.FULL\";\n\t\t}\n\n\t\treturn version;\n\t}", "public static Version getVersion() {\r\n\t\tif (VERSION == null) {\r\n\t\t\tfinal Properties props = new Properties();\r\n\t\t\tint[] vs = { 0, 0, 0 };\r\n\t\t\tboolean stable = false;\r\n\t\t\ttry {\r\n\t\t\t\tprops.load(GoogleCalXPlugin.class.getResourceAsStream(\"/META-INF/maven/de.engehausen/googlecalx/pom.properties\"));\r\n\t\t\t\tfinal String pomVersion = props.getProperty(\"version\");\r\n\t\t\t\tstable = !pomVersion.contains(\"SNAPSHOT\");\r\n\t\t\t\tfinal StringTokenizer tok = new StringTokenizer(pomVersion, \".\");\r\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile (i < 3 && tok.hasMoreTokens()) {\r\n\t\t\t\t\tfinal String str = tok.nextToken();\r\n\t\t\t\t\tfinal int cut = str.indexOf('-');\r\n\t\t\t\t\tif (cut > 0) {\r\n\t\t\t\t\t\tvs[i++] = Integer.parseInt(str.substring(0, cut));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvs[i++] = Integer.parseInt(str);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstable = false;\r\n\t\t\t}\r\n\t\t\tVERSION = new Version(vs[0], vs[1], vs[2], stable);\r\n\t\t}\r\n\t\treturn VERSION;\r\n\t}", "public static String getVersion(String[] properties)\n {\n \t\tif (properties.length > 0)\n \t\t{\n \t\t\tfor (String property : properties)\n \t\t\t{\n \t\t\t\tif (property.startsWith(Constants.VERSION_ATTRIBUTE))\n \t\t\t\t{\n \t\t\t\t\tString[] props = property.split(\"\\\\ |\\\\[|\\\\]|\\\\(|\\\\)|\\\\=|\\\\\\\"\");\n \t\t\t\t\tfor (int i = 1; i < props.length; i++)\n \t\t\t\t\t{\n \t\t\t\t\t\tif (props[i].length() > 0)\n \t\t\t\t\t\t\treturn props[i];\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \treturn null;\n }", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public String getVersionProperty(String propertyName) {\n return this.properties.getProperty(propertyName);\n }", "public VersionProperty getInterpolatorVersion();", "public String getBuildVersion() {\n return buildVersion;\n }", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "public String getVersion(){\r\n return version;\r\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n\t\treturn version;\n\t}", "public static String getVersion() {\n\t\treturn version;\r\n\t}", "java.lang.String getApplicationVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "public static String getVersion() {\n\n try {\n //Open file\n ClassLoader classLoader = new ResourceLoader().getClass().getClassLoader();\n File file = new File(classLoader.getResource(RELEASE_NOTES).getFile());\n //Read File Content\n String content = new String(Files.readAllBytes(file.toPath()));\n content = content.split(\"VERSION \")[1]; //version number comes after VERSION\n content = content.split(\"\\n\")[0]; //and before the next new line\n return content;\n } catch (IOException ex) {\n Logger.getLogger(ResourceLoader.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n\n }", "public String getProductVersion();", "public String getVersion()\n {\n return version;\n }", "public static String getAppVersion() {\n \t\tif (props.containsKey(\"app.version\")) {\n \t\t\treturn props.getProperty(\"app.version\");\n \t\t} else {\n \t\t\treturn \"unspecified\";\n \t\t}\n \t}", "public static String property(String name) {\n if (\"version\".equals(name)) {\n return \"1.0\";\n }\n\n if (\"conformance-level\".equals(name)) {\n // todo: read from config\n return \"basic\";\n }\n\n return null;\n }", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "public static String getStringVersion() throws IOException {\n return \"0.0.1\";//attr.getValue(\"Implementation-Version\");\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\r\n return version;\r\n }", "private String getRevision() {\r\n Properties p = new Properties();\r\n try{\r\n String toolsdir = System.getProperty(Main.TOOLSDIR);\r\n File sourceProp;\r\n if (toolsdir == null || toolsdir.length() == 0) {\r\n sourceProp = new File(SdkConstants.FN_SOURCE_PROP);\r\n } else {\r\n sourceProp = new File(toolsdir, SdkConstants.FN_SOURCE_PROP);\r\n }\r\n FileInputStream fis = null;\r\n try {\r\n fis = new FileInputStream(sourceProp);\r\n p.load(fis);\r\n } finally {\r\n if (fis != null) {\r\n try {\r\n fis.close();\r\n } catch (IOException ignore) {\r\n }\r\n }\r\n }\r\n\r\n String revision = p.getProperty(PkgProps.PKG_REVISION);\r\n if (revision != null) {\r\n return revision;\r\n }\r\n } catch (FileNotFoundException e) {\r\n // couldn't find the file? don't ping.\r\n } catch (IOException e) {\r\n // couldn't find the file? don't ping.\r\n }\r\n\r\n return \"?\";\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}", "public String getVersion () {\r\n return version;\r\n }", "String buildVersion();", "@Test\n public void testGetProperty_String() throws DatabaseException {\n String key = \"version\";\n DatabaseProperties instance = cveDb.getDatabaseProperties();\n String result = instance.getProperty(key);\n \n int major = Integer.parseInt(result.substring(0, result.indexOf('.')));\n \n assertTrue(major >= 5);\n }", "public String getVersion()\n {\n return ver;\n }", "public String getVersion() {\n return this.version;\n }", "public Integer getVersion() {\r\n return version;\r\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getBversion() {\n return bversion;\n }", "public BigDecimal getVersion() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"Version\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "public String getVersion() {\n return version;\n }", "int getCurrentVersion();", "public java.lang.String getVersion() {\r\n return version;\r\n }", "public static String getVersion() {\n ClassLoader classLoader = RatpackVersion.class.getClassLoader();\n URL resource = classLoader.getResource(RESOURCE_PATH);\n if (resource == null) {\n throw new RuntimeException(\"Could not find \" + RESOURCE_PATH + \" on classpath\");\n }\n\n try {\n return Resources.toString(resource, CharsetUtil.UTF_8).trim();\n } catch (Exception e) {\n throw uncheck(e);\n }\n }", "public final String getVersion() {\n return version;\n }", "public String getProjectVersion() {\n\t\treturn projectVersion;\n\t}", "Integer getVersion();", "public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}", "public Version getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public java.lang.String getConfigVersion() {\r\n return configVersion;\r\n }", "@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }", "public String getVersion() {\n return _version;\n }", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "public Integer version() {\n return this.version;\n }" ]
[ "0.69517577", "0.67890567", "0.6442593", "0.621471", "0.6185519", "0.6152811", "0.6011372", "0.59000194", "0.59000194", "0.5892742", "0.5849585", "0.5822764", "0.5807139", "0.5807139", "0.5807139", "0.5807139", "0.5807139", "0.5807139", "0.5807139", "0.5807139", "0.5767599", "0.5757209", "0.5757209", "0.5754654", "0.57406723", "0.57346267", "0.57306474", "0.57306474", "0.57306474", "0.57306474", "0.56747", "0.5664013", "0.5660455", "0.5655689", "0.565129", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56465364", "0.56393236", "0.562904", "0.562904", "0.56270546", "0.5618114", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5607717", "0.5603033", "0.5601294", "0.5600343", "0.5589885", "0.5589456", "0.558641", "0.55661786", "0.55514216", "0.55514216", "0.55514216", "0.55514216", "0.55514216", "0.55514216", "0.5547558", "0.5547558", "0.5547558", "0.5547558", "0.55364656", "0.55364656", "0.5536167", "0.5535987", "0.5531344", "0.55280757", "0.5526444", "0.55245316", "0.55232006", "0.5515474", "0.5515212", "0.55150545", "0.5514744", "0.5509334", "0.5509334", "0.5509334", "0.5509334", "0.55041456", "0.54998195", "0.5485592", "0.54853904", "0.54841435" ]
0.0
-1
Loads JacobVersion.Properties and returns the value of version in it
@Deprecated public static String getBuildVersion() { return JacobReleaseInfo.getBuildVersion(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBuildVersion() {\n try {\n Properties versionFileProperties = new Properties();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(\"version.properties\");\n if (inputStream != null) {\n versionFileProperties.load(inputStream);\n return versionFileProperties.getProperty(\"version\", \"\") + \" \" + versionFileProperties.getProperty(\"timestamp\", \"\");\n }\n } catch (IOException e) {\n Logger.getLogger(OnStartup.class.getName()).log(Level.SEVERE, null, e);\n }\n return \"\";\n }", "public static String getAppVersion(){\r\n return getProperty(\"version\");\r\n }", "public static String getVersion()\n {\n String result = \"unkown version\";\n InputStream properties = DashboardMojo.class.getResourceAsStream( \n \"/META-INF/maven/\" + GROUP_ID + \"/\" + ARTIFACT_ID + \"/pom.properties\" );\n if ( properties != null )\n {\n try\n {\n Properties props = new Properties();\n props.load( properties );\n result = props.getProperty( \"version\" );\n }\n catch ( IOException e )\n {\n result = \"problem determining version\";\n }\n finally\n {\n IOUtil.close( properties );\n }\n }\n return result;\n }", "private static String getVersionFromPom() {\n\n final String absolutePath = new File(BuildVersion.class.getResource(BuildVersion.class\n .getSimpleName() + \".class\").getPath())\n .getParentFile().getParentFile().getParentFile().getParentFile().getParentFile()\n .getParentFile().getParentFile().getAbsolutePath();\n\n final File file = new File(absolutePath + \"/pom.xml\");\n\n try (InputStreamReader reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)) {\n\n final MavenXpp3Reader xpp3Reader = new MavenXpp3Reader();\n Model model = xpp3Reader.read(reader);\n return model.getVersion();\n\n } catch (NoClassDefFoundError e) {\n // if you want to get the version possibly in development add in to your pom\n // pax-url-aether.jar\n return null;\n } catch (Exception e) {\n return null;\n }\n }", "private static String getProjectVersion() {\n\t\tString version;\n\n\t\ttry {\n\t\t\tfinal Properties pomProperties = new Properties();\n\t\t\tpomProperties.load(Main.class.getResourceAsStream(\n \"/META-INF/MediaPlayer/pom.properties\"));\n\t\t\tversion = pomProperties.getProperty(\"version\");\n\t\t} catch(Exception e) {\n\t\t\tversion = \"RUNNING.IN.IDE.FULL\";\n\t\t}\n\n\t\treturn version;\n\t}", "public static Version getVersion() {\r\n\t\tif (VERSION == null) {\r\n\t\t\tfinal Properties props = new Properties();\r\n\t\t\tint[] vs = { 0, 0, 0 };\r\n\t\t\tboolean stable = false;\r\n\t\t\ttry {\r\n\t\t\t\tprops.load(GoogleCalXPlugin.class.getResourceAsStream(\"/META-INF/maven/de.engehausen/googlecalx/pom.properties\"));\r\n\t\t\t\tfinal String pomVersion = props.getProperty(\"version\");\r\n\t\t\t\tstable = !pomVersion.contains(\"SNAPSHOT\");\r\n\t\t\t\tfinal StringTokenizer tok = new StringTokenizer(pomVersion, \".\");\r\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile (i < 3 && tok.hasMoreTokens()) {\r\n\t\t\t\t\tfinal String str = tok.nextToken();\r\n\t\t\t\t\tfinal int cut = str.indexOf('-');\r\n\t\t\t\t\tif (cut > 0) {\r\n\t\t\t\t\t\tvs[i++] = Integer.parseInt(str.substring(0, cut));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvs[i++] = Integer.parseInt(str);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstable = false;\r\n\t\t\t}\r\n\t\t\tVERSION = new Version(vs[0], vs[1], vs[2], stable);\r\n\t\t}\r\n\t\treturn VERSION;\r\n\t}", "public static String getVersion(String[] properties)\n {\n \t\tif (properties.length > 0)\n \t\t{\n \t\t\tfor (String property : properties)\n \t\t\t{\n \t\t\t\tif (property.startsWith(Constants.VERSION_ATTRIBUTE))\n \t\t\t\t{\n \t\t\t\t\tString[] props = property.split(\"\\\\ |\\\\[|\\\\]|\\\\(|\\\\)|\\\\=|\\\\\\\"\");\n \t\t\t\t\tfor (int i = 1; i < props.length; i++)\n \t\t\t\t\t{\n \t\t\t\t\t\tif (props[i].length() > 0)\n \t\t\t\t\t\t\treturn props[i];\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \treturn null;\n }", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public String getVersionProperty(String propertyName) {\n return this.properties.getProperty(propertyName);\n }", "public VersionProperty getInterpolatorVersion();", "public String getBuildVersion() {\n return buildVersion;\n }", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "public String getVersion(){\r\n return version;\r\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n\t\treturn version;\n\t}", "public static String getVersion() {\n\t\treturn version;\r\n\t}", "java.lang.String getApplicationVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "public static String getVersion() {\n\n try {\n //Open file\n ClassLoader classLoader = new ResourceLoader().getClass().getClassLoader();\n File file = new File(classLoader.getResource(RELEASE_NOTES).getFile());\n //Read File Content\n String content = new String(Files.readAllBytes(file.toPath()));\n content = content.split(\"VERSION \")[1]; //version number comes after VERSION\n content = content.split(\"\\n\")[0]; //and before the next new line\n return content;\n } catch (IOException ex) {\n Logger.getLogger(ResourceLoader.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n\n }", "public String getProductVersion();", "public String getVersion()\n {\n return version;\n }", "public static String getAppVersion() {\n \t\tif (props.containsKey(\"app.version\")) {\n \t\t\treturn props.getProperty(\"app.version\");\n \t\t} else {\n \t\t\treturn \"unspecified\";\n \t\t}\n \t}", "public static String property(String name) {\n if (\"version\".equals(name)) {\n return \"1.0\";\n }\n\n if (\"conformance-level\".equals(name)) {\n // todo: read from config\n return \"basic\";\n }\n\n return null;\n }", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "public static String getStringVersion() throws IOException {\n return \"0.0.1\";//attr.getValue(\"Implementation-Version\");\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\r\n return version;\r\n }", "private String getRevision() {\r\n Properties p = new Properties();\r\n try{\r\n String toolsdir = System.getProperty(Main.TOOLSDIR);\r\n File sourceProp;\r\n if (toolsdir == null || toolsdir.length() == 0) {\r\n sourceProp = new File(SdkConstants.FN_SOURCE_PROP);\r\n } else {\r\n sourceProp = new File(toolsdir, SdkConstants.FN_SOURCE_PROP);\r\n }\r\n FileInputStream fis = null;\r\n try {\r\n fis = new FileInputStream(sourceProp);\r\n p.load(fis);\r\n } finally {\r\n if (fis != null) {\r\n try {\r\n fis.close();\r\n } catch (IOException ignore) {\r\n }\r\n }\r\n }\r\n\r\n String revision = p.getProperty(PkgProps.PKG_REVISION);\r\n if (revision != null) {\r\n return revision;\r\n }\r\n } catch (FileNotFoundException e) {\r\n // couldn't find the file? don't ping.\r\n } catch (IOException e) {\r\n // couldn't find the file? don't ping.\r\n }\r\n\r\n return \"?\";\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}", "public String getVersion () {\r\n return version;\r\n }", "String buildVersion();", "@Test\n public void testGetProperty_String() throws DatabaseException {\n String key = \"version\";\n DatabaseProperties instance = cveDb.getDatabaseProperties();\n String result = instance.getProperty(key);\n \n int major = Integer.parseInt(result.substring(0, result.indexOf('.')));\n \n assertTrue(major >= 5);\n }", "public String getVersion()\n {\n return ver;\n }", "public String getVersion() {\n return this.version;\n }", "public Integer getVersion() {\r\n return version;\r\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public BigDecimal getVersion() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"Version\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "public String getBversion() {\n return bversion;\n }", "public String getVersion() {\n return version;\n }", "int getCurrentVersion();", "public java.lang.String getVersion() {\r\n return version;\r\n }", "public static String getVersion() {\n ClassLoader classLoader = RatpackVersion.class.getClassLoader();\n URL resource = classLoader.getResource(RESOURCE_PATH);\n if (resource == null) {\n throw new RuntimeException(\"Could not find \" + RESOURCE_PATH + \" on classpath\");\n }\n\n try {\n return Resources.toString(resource, CharsetUtil.UTF_8).trim();\n } catch (Exception e) {\n throw uncheck(e);\n }\n }", "public final String getVersion() {\n return version;\n }", "public String getProjectVersion() {\n\t\treturn projectVersion;\n\t}", "Integer getVersion();", "public Version getVersion();", "public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public java.lang.String getConfigVersion() {\r\n return configVersion;\r\n }", "@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }", "public String getVersion() {\n return _version;\n }", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "public Integer version() {\n return this.version;\n }" ]
[ "0.6950605", "0.6787974", "0.64420044", "0.62136006", "0.6185172", "0.61526144", "0.6008798", "0.58991975", "0.58991975", "0.58928734", "0.5851231", "0.5821895", "0.5805934", "0.5805934", "0.5805934", "0.5805934", "0.5805934", "0.5805934", "0.5805934", "0.5805934", "0.5767173", "0.57563895", "0.57563895", "0.5753953", "0.57399476", "0.5732578", "0.5730427", "0.5730427", "0.5730427", "0.5730427", "0.5674239", "0.56629527", "0.56599617", "0.5653668", "0.565035", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.5645384", "0.56370986", "0.5628547", "0.5628547", "0.56266093", "0.56174886", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.5607261", "0.56022733", "0.56008524", "0.5599193", "0.5589536", "0.5588532", "0.5586236", "0.5566228", "0.55514705", "0.55514705", "0.55514705", "0.55514705", "0.55514705", "0.55514705", "0.55471134", "0.55471134", "0.55471134", "0.55471134", "0.5536024", "0.5536024", "0.5535059", "0.5534669", "0.5530881", "0.55275774", "0.5525648", "0.5524093", "0.5522582", "0.551523", "0.55151695", "0.55145013", "0.55144674", "0.55085975", "0.55085975", "0.55085975", "0.55085975", "0.5503443", "0.5499287", "0.5485338", "0.548505", "0.54842335" ]
0.0
-1
Very basic debugging function.
protected static void debug(String istrMessage) { if (isDebugEnabled()) { System.out.println(Thread.currentThread().getName() + ": " + istrMessage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void debug() {\n\n }", "public void debug(String msg);", "private void debug(String s) {\r\n\t\tif (debug)\r\n\t\t\tSystem.out.println(s);\r\n\t}", "private static void printDebug(String s)\n {\n }", "public void debug(String comment);", "@Override\r\n\t\t\tpublic void debug(String arg) {\n\t\t\t\t\r\n\t\t\t}", "private void debug(String str) {\n }", "public void debug(String message);", "private void debug(final String msg) {\n \t\tif (debug) System.out.println(msg);\n \t}", "void debug(String msg)\n {\n if (yydebug)\n System.out.println(msg);\n }", "public static void debugInfo() { throw Extensions.todo(); }", "private static void debug()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords:\");\r\n\t\tfor(String word : keywords)\r\n\t\t{\r\n\t\t\tSystem.out.println(word);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"-----------------\");\r\n\t\tSystem.out.println();\r\n\t\tSharedLink.debugLinks();\r\n\t\t\r\n\t\tSystem.out.println(\"-----------------\");\r\n\t\tSystem.out.println();\r\n\t\tSharedPage.debugPages();\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}", "private void debug(String post) {\n if (GameLauncher.isDebugging()) {\n System.out.println(post);\n }\n }", "protected abstract void debug(String msg);", "@SuppressWarnings(\"unused\")\n\tprivate static void printDebug(String p) {\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(PREFIX + p);\n\t\t}\n\t}", "public void debug()\r\n {\n \t\treload();\r\n }", "public abstract void debug(PrintStream console);", "void debug (String msg) throws RootException;", "void debug() {\n\t\tfor( int i = 0; i < N; i++ ) {\t\n\t\t\tSystem.out.print(i+\" \");\n\t\t\tfor( int j = 0; j < N; j++ )\n\t\t\t\tSystem.out.print(j+\":\"+(defined[i][j]?\"T\":\"F\")+\" \"+\n\t\t\t\t\t\tc[i][j]+\" p=\"+path[i][j]+\" f=\"+f[i][j]+\"; \");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void debug(String a, String b) {\n\t\t}", "void debug(String msg)\n{\n if (yydebug)\n System.out.println(msg);\n}", "void debug(String msg)\n{\n if (yydebug)\n System.out.println(msg);\n}", "private void debugPrint(String msg) {\n if (debug) {\n System.out.println(toString() + \": \" + msg);\n }\n }", "private static void debug(String s) {\n if (System.getProperty(\"javafind.debug\") != null)\n System.out.println(\"debug in GnuNativeFind: \" + s);\n }", "public void debug(String word)\n\t{\n\t\tif(debug)\n\t\tSystem.out.println(word);\n\t}", "@Override\n\tpublic void debug(Object message) {\n\n\t}", "public void printForDebug() {\n\t\tif(Globalconstantable.DEBUG)\n\t\t{\n\t\t\tSystem.out.println(this.getSID());\n\t\t\tSystem.out.println(this.getScores());\n\t\t}\n\t}", "@Override\n\tpublic void debug(Message msg) {\n\n\t}", "public void debug(String s)\r\n {\r\n if (DEBUG)\r\n {\r\n System.out.println((debugCounter++) + \": \" + s);\r\n }\r\n }", "static void debug() {\n ProcessRunnerImpl.setGlobalDebug(true);\n }", "protected void debug(String string) {\n\t\tif (DEBUGMODE)\n\t\t\tSystem.out.println(string);\n\t}", "public void print_DEBUG() {\n\t\tSystem.out.println(\"Direction\");\n\t\tSystem.out.println(\"ID: \" + ID);\n\t\tSystem.out.println(\"FROM: \" + from.name() );\n\t\tSystem.out.println(\"TO: \" + to.name() );\n\t\tSystem.out.println(\"dir: \" + dir);\n\t\tSystem.out.println(\"Locked: \" + locked);\n\t\tSystem.out.println(\"LockPattern: \" + lockPattern);\n\t}", "public void debug() {\n\n\t\t// Establecemos el estado\n\t\tsetEstado(Estado.DEBUG);\n\n\t\t// Obtenemos la proxima tarea\n\t\ttarea = planificador.obtenerProximaTarea();\n\t}", "@Override\n\tpublic void debug(String message, Object p0) {\n\n\t}", "private static void dbg(Object... objects) {\n\t\tSystem.out.println(Arrays.deepToString(objects));\r\n\t}", "boolean isDebug();", "boolean isDebug();", "@Override\n\tpublic void debug(String message, Object... params) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, String message, Object p0) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, MessageSupplier msgSupplier) {\n\n\t}", "@Override\n\tpublic void debug(String message, Object p0, Object p1) {\n\n\t}", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n\n\t}", "public void debug(String x) {\n if (isDebugOn()) {\n String out = getClassName() + \"(\" + (new Date()) + \"): \" + x;\n getLogger().info(out);\n }\n }", "public void debug(Object message)\n/* */ {\n/* 118 */ if (message != null) {\n/* 119 */ getLogger().debug(String.valueOf(message));\n/* */ }\n/* */ }", "@Override\n\tpublic void debug(MessageSupplier msgSupplier) {\n\n\t}", "public boolean isDebug();", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "public static void debug(boolean d, String message) {\n \tif(d) {\n \t\tSystem.out.println(message);\n \t}\n }", "public abstract void debug(RobocodeFileOutputStream output);", "public static void printDebugStatement (String givenMessage) \t{\n\t\t\n\t\tSystem.out.println(\"\" + Thread.currentThread().getStackTrace()[2].toString() + \": \" + givenMessage);\n\t\t\n\t}", "@Override\n\tpublic void debug(Marker marker, Message msg) {\n\n\t}", "private static void debug(Context context, String p){\n\t\tToast.makeText(context, p, Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void debug(\n Object obj\n )\n {\n mLogger.fine( obj.toString() );\n }", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2) {\n\n\t}", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, String message) {\n\n\t}", "@Override\n\tpublic void debug(CharSequence message) {\n\n\t}", "public void debug(Scanner s) {\r\n\t\twhile (debugOn) {\r\n\r\n\t\t\tif (bShow) {\r\n\t\t\t\tSystem.out.println(debugStr + s.currentToken);\r\n\t\t\t}\r\n\t\t\tif (bExp) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (bAssign) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void debug(String messageKey, Object... args);", "@Override\n\tpublic void debug(Marker marker, String message, Object... params) {\n\n\t}", "public static void debug(Object s) {\n\t\tif (logger != null) {\n\t\t\tlogger.log(Level.DEBUG, s);\n\t\t}\n\t}", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1) {\n\n\t}", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, Object message) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, Supplier<?> msgSupplier) {\n\n\t}", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7, Object p8) {\n\n\t}", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6) {\n\n\t}", "public static void debug( String msg ) {\n\t\tif( DEBUG_SHOW == 1 )\n\t\t{\n\t\t\tLog.i( DEBUG, DEBUG + \" : \" + msg );\n\t\t}\n\t}", "public String toDebugString();", "@Override\n\tpublic void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7) {\n\n\t}", "void displayDebug(String message) {\n if (this.server.isVerboseDebugEnabled())\n System.out.printf(\"**\\t[%s]\\t\" + name + \":\\t\" + message + \"\\n\", dateFormat.format(new Date()));\n }", "public boolean isDebugEnabled();", "@Override\n\tpublic void debug(String message, Throwable t) {\n\n\t}", "public boolean supportsDebugArgument();", "public static void enableDebugging(){\n DEBUG = true;\n }", "public static void debug(String message) {\n if (mDebug)\n print(message);\n }", "private static void debug(String message, Object... args)\n {\n StatusLogger.getLogger().debug(String.format(message, args));\n }", "@Override\n\tpublic void debug(Marker marker, CharSequence message) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}", "@Override\n public void printDebug(String string) {\n if(allActive && active)\n System.out.println(SC + string + R);\n }", "@Override\n\tpublic void debug(Object message, Throwable t) {\n\n\t}", "private void debugInConsole() {\n String command = \"\";\n do {\n try {\n command = getCommandWithPrompt();\n doDebugCommand(command);\n } catch (Error e) {\n println(e.getMessage());\n }\n } while (!command.equals(\"exit\"));\n }", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "public void debug(final String s) {\n if (!configManager.isDebug()) { return; }\n this.getLogger().info(ChatColor.YELLOW + \"[Debug] \" + s);\n }", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}", "public void enableDebug() {\n this.debug = true;\n }", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}", "private void debug(String msg) {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(msg);\r\n }\r\n }", "@Override\n\tpublic void debug(Supplier<?> msgSupplier) {\n\n\t}", "public static void debug(boolean d) {\n D = d;\n }", "@Override\n\tpublic void setDebugMode(boolean debug) {\n\n\t}", "public static void debug(String msg) {\n\t\tif(DEBUG_ENABLED) {\n\t\t\tinfo(\"[DEBUG] \" + msg);\n\t\t}\n\t}", "private static void debug(@Nullable String s) {\n LOG.debug(s);\n }", "public void debug(String filename) throws IOException {\n\t\tdebug(new FileWriter(filename));\n\t}", "boolean isDebugEnabled();", "@Override\n\tpublic void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6) {\n\n\t}", "public static void debug(String message) {\n if (_debugMode) {\n System.out.println(\"[DEBUG] \" + message);\n }\n }", "public static void debugln(String s) {\n\t if (debugPrintTime) {\n\t System.out.println(s);\n\t }\n\t}", "public void dump()\r\n {\r\n dump(true);\r\n }" ]
[ "0.82197523", "0.775272", "0.7724322", "0.7675034", "0.75877017", "0.75385225", "0.7502887", "0.7488602", "0.74730486", "0.74579513", "0.74384356", "0.7382566", "0.73658025", "0.72464406", "0.72293353", "0.7182977", "0.7160009", "0.7155819", "0.7145224", "0.7133135", "0.71269214", "0.71269214", "0.71071887", "0.7090171", "0.70807487", "0.70642185", "0.6998723", "0.69604343", "0.69472015", "0.69170153", "0.6902834", "0.6882159", "0.6861035", "0.6857277", "0.68297607", "0.6821592", "0.6821592", "0.67961663", "0.679527", "0.67784745", "0.6774096", "0.67396134", "0.6732916", "0.67147756", "0.67122245", "0.67120206", "0.6711853", "0.67095375", "0.6704098", "0.66886663", "0.66829723", "0.6669488", "0.66643935", "0.66548526", "0.6652609", "0.6644374", "0.66342986", "0.6595175", "0.65885115", "0.6586124", "0.6585016", "0.65821266", "0.65787023", "0.65683866", "0.65682304", "0.6563497", "0.65513206", "0.6544432", "0.65373164", "0.65290755", "0.6523071", "0.6508938", "0.6503457", "0.6502309", "0.6498963", "0.648231", "0.6475442", "0.64749", "0.6468324", "0.64683235", "0.6460184", "0.64596885", "0.6459422", "0.6457807", "0.64553547", "0.6440037", "0.6435304", "0.64303666", "0.6430273", "0.64294857", "0.64270496", "0.6418348", "0.6414946", "0.6411828", "0.64009815", "0.63956386", "0.63915324", "0.63900375", "0.63888603", "0.63869876", "0.6376258" ]
0.0
-1
Spring Data Elasticsearch repository for the Activity entity.
public interface ActivitySearchRepository extends ElasticsearchRepository<Activity, Long> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface DashboardSearchRepository extends ElasticsearchRepository<Dashboard, Long> {\n}", "@Repository\npublic interface ArticleRepository extends ElasticsearchRepository<Article, Integer> {\n\n}", "public interface OrderEntitySearchRepository extends ElasticsearchRepository<OrderEntity, Long> {\n}", "public interface PermissionSearchRepository extends ElasticsearchRepository<Permission, Long> {\n}", "public interface EvDiagramSearchRepository extends ElasticsearchRepository<EvDiagram, Long> {\n}", "public interface PaymentTransferHistorySearchRepository extends ElasticsearchRepository<PaymentTransferHistory, Long> {\n}", "public interface MedicalCaseSearchRepository extends ElasticsearchRepository<MedicalCase, Long> {\n}", "public interface ChatMessageSearchRepository extends ElasticsearchRepository<ChatMessage, Long> {\n}", "public interface ResulteventSearchRepository extends ElasticsearchRepository<Resultevent, Long> {\n}", "public interface FollowSearchRepository extends ElasticsearchRepository<Follow, Long> {\n}", "@Repository\npublic interface MovieRepository extends ElasticsearchRepository<Movie, Long> {\n\n List<Movie> findByName(String name);\n List<Movie> findByRatingBetween(Double start, Double end);\n List<Movie> findByDirector(Director director);\n}", "public interface DepositSearchRepository extends ElasticsearchRepository<Deposit, Long> {\n}", "public interface ReportSearchRepository extends ElasticsearchRepository<Report, Long> {\n}", "public interface TicketSearchRepository extends ElasticsearchRepository<Ticket, Long> {\n}", "public interface DataStateSearchRepository extends ElasticsearchRepository<DataState, Long> {\n}", "public interface ContentSearchRepository extends ElasticsearchRepository<Content, Long> {\n}", "public interface AlmLeaveGroupSearchRepository extends ElasticsearchRepository<AlmLeaveGroup, Long> {\n}", "public interface OrderComponentSearchRepository extends ElasticsearchRepository<OrderComponent, Long> {\n}", "public interface OrderConsigneeSearchRepository extends ElasticsearchRepository<OrderConsignee, Long> {\n}", "public interface AreaSearchRepository extends ElasticsearchRepository<Area, Long> {\n}", "public interface ServiceAssuranceSearchRepository extends ElasticsearchRepository<ServiceAssurance, Long> {\n}", "public interface MedCheckDetSearchRepository extends ElasticsearchRepository<MedCheckDet, Long> {\n}", "public interface BoardCustomSearchRepository extends ElasticsearchRepository<CustomBoard, String> {\n}", "public interface FonctionSearchRepository extends ElasticsearchRepository<Fonction, Long> {\n}", "public interface PerCompanySearchRepository extends ElasticsearchRepository<PerCompany, Long> {\n}", "public interface HrDepartmentHeadSetupSearchRepository extends ElasticsearchRepository<HrDepartmentHeadSetup, Long> {\n}", "public interface AssigsSearchRepository extends ElasticsearchRepository<Assigs, Long> {\n}", "public interface HouseUpdateSearchRepository extends ElasticsearchRepository<HouseUpdate, Long> {\n}", "public interface ProductionSearchRepository extends ElasticsearchRepository<Production, Long> {\n}", "public interface SaldoAppSearchRepository extends ElasticsearchRepository<SaldoApp, Long> {\n}", "public interface MetroSearchRepository extends ElasticsearchRepository<Metro, Long> {\n}", "public interface TypeMedicationSearchRepository extends ElasticsearchRepository<TypeMedication, Long> {\n}", "public interface PaymentSettingsSearchRepository extends ElasticsearchRepository<PaymentSettings, Long> {\n}", "public interface TrainingGeneratedSlideNodeSearchRepository extends ElasticsearchRepository<TrainingGeneratedSlideNode, Long> {\n}", "public interface UserSearchRepository extends ElasticsearchRepository<User, Long> {\n}", "public interface RelatedDocumentSearchRepository extends ElasticsearchRepository<RelatedDocument, Long> {\n}", "public interface ShopSearchRepository extends ElasticsearchRepository<Shop, Long> {\n}", "public interface PlaybookcomponentSearchRepository extends ElasticsearchRepository<Playbookcomponent, Long> {\n}", "public interface SemesterSearchRepository extends ElasticsearchRepository<Semester, Long> {\n}", "public interface TemporadaSearchRepository extends ElasticsearchRepository<Temporada, Long> {\n}", "public interface Tbc_clienteSearchRepository extends ElasticsearchRepository<Tbc_cliente, Long> {\n}", "public interface BibliographicEntitySearchRepository extends ElasticsearchRepository<BibliographicEntity, Long> {\n}", "public interface FiltreSearchRepository extends ElasticsearchRepository<Filtre, Long> {\n}", "public interface VeeResponseSearchRepository extends ElasticsearchRepository<VeeResponse, Long> {\n}", "public interface ServicePriceSearchRepository extends ElasticsearchRepository<ServicePrice, Long> {\n}", "public interface OuderSearchRepository extends ElasticsearchRepository<Ouder, Long> {\n}", "public interface SearchTypeSearchRepository extends ElasticsearchRepository<SearchType, Long> {\n}", "public interface UserLoginSearchRepository extends ElasticsearchRepository<UserLogin, Long> {\n}", "public interface WalletWithdrawalSearchRepository extends ElasticsearchRepository<WalletWithdrawal, Long> {\n}", "public interface InsuranceTypeSearchRepository extends ElasticsearchRepository<InsuranceType, Long> {\n}", "public interface Cr_elementSearchRepository extends ElasticsearchRepository<Cr_element, Long> {\n}", "public interface LevelDressageSearchRepository extends ElasticsearchRepository<LevelDressage, Long> {\n}", "public interface OptionTypeSearchRepository extends ElasticsearchRepository<OptionType, Long> {\n}", "public interface SlideTemplateSearchRepository extends ElasticsearchRepository<SlideTemplate, Long> {\n}", "public interface StockTakingItemSearchRepository extends ElasticsearchRepository<StockTakingItem, Long> {\n}", "public interface ChemicalsSearchRepository extends ElasticsearchRepository<Chemicals, Long> {\n}", "public interface LandmarkRepository extends ElasticsearchRepository<Landmark, String> {\n\n List<Landmark> findByName(String name);\n\n}", "public interface LocalitySearchRepository extends ElasticsearchRepository<Locality, Long> {\n}", "public interface CmsSyllabusSearchRepository extends ElasticsearchRepository<CmsSyllabus, Long> {\n}", "public interface POITypeSearchRepository extends ElasticsearchRepository<POIType, Long> {\n}", "public interface ImageManagerSearchRepository extends ElasticsearchRepository<ImageManager, Long> {\n}", "public interface ThinkAloudSearchRepository extends ElasticsearchRepository<ThinkAloud, Long> {\n}", "public interface PricingSearchRepository extends ElasticsearchRepository<Pricing, Long> {\n}", "public interface GroupRateSearchRepository extends ElasticsearchRepository<GroupRate, Long> {\n}", "public interface WorldSearchRepository extends ElasticsearchRepository<World, Long> {\n}", "public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {\n}", "@Repository\npublic interface LocationRepository extends ElasticsearchRepository<Location, Long>, CustomLocationRepository {\n\n}", "public interface ElasticsearchRepository<T, ID extends Serializable> {\n\n /**\n * Searches for records of an entity in elasticsearch using pagination\n * @param pageable the pagination information to request\n * @param query the string query to use (see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-query-string-query.html)\n * @return the paginated list of results\n */\n Page<T> search(Pageable pageable, String query);\n\n /**\n * Searches for records of an entity in elasticsearch using pagination\n * @param pageable the pagination information to request\n * @param query the QueryBuilder query to use (see https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-query-builders.html)\n * @return the paginated list of results\n */\n Page<T> search(Pageable pageable, QueryBuilder query);\n\n /**\n * Searches and aggregates the documents according to the given queries and aggregations\n * Note that this is the raw result from the REST ES client lib : entities are not deserialized\n * @param pageable The page information of the search\n * @param query The search query to use\n * @param aggregation The aggregation to use\n * @return The result of the query\n */\n SearchResponse search(Pageable pageable, QueryBuilder query, AggregationBuilder aggregation);\n\n /**\n * Searches and aggregates the documents according to the given queries and aggregations\n * Note that this is the raw result from the REST ES client lib : entities are not deserialized\n * @param pageable The page information of the search\n * @param query The search query to use\n * @param aggregations The aggregations to use\n * @return The result of the query\n */\n SearchResponse search(Pageable pageable, QueryBuilder query, Collection<AggregationBuilder> aggregations);\n\n /**\n * Searches for records of an entity in elasticsearch using pagination, filters and aggregations\n * @param pageable the pagination information to request\n * @param jsonQuery the Query as Json (see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl.html)\n * @return the Result object with hits and aggregations\n * @deprecated This helper is here to keep retro compatibility with search based on the low level rest API. It will be removed in the next release.\n */\n @Deprecated\n Result<T> searchComplex(Pageable pageable, String jsonQuery);\n\n /**\n * Retrieves an entity by its id.\n *\n * @param id must not be {@literal null}.\n * @return the entity with the given id or {@literal null} if none found\n * @throws IllegalArgumentException if {@code id} is {@literal null}\n */\n T findOne(ID id);\n\n /**\n * Returns whether an entity with the given id exists.\n *\n * @param id must not be {@literal null}.\n * @return true if an entity with the given id exists, {@literal false} otherwise\n * @throws IllegalArgumentException if {@code id} is {@literal null}\n */\n boolean exists(ID id);\n\n /**\n * Returns the number of entities available.\n *\n * @return the number of entities\n */\n long count();\n\n /**\n * Saves a given entity. Use the returned instance for further operations as the save operation might have changed the\n * entity instance completely.\n *\n * @param entity The entity to save\n * @param <S> The entity that inherits T\n * @return the saved entity\n */\n <S extends T> S save(S entity);\n\n /**\n * Saves all given entities.\n *\n * @param entities The list of entities to save\n * @param <S> The entity that inherits T\n * @return the saved entities\n * @throws IllegalArgumentException in case the given entity is {@literal null}.\n */\n <S extends T> Iterable<S> save(Iterable<S> entities);\n\n /**\n * Deletes the entity with the given id.\n *\n * @param id must not be {@literal null}.\n * @throws IllegalArgumentException in case the given {@code id} is {@literal null}\n */\n void delete(ID id);\n\n /**\n * Deletes a given entity.\n *\n * @param entity The entity to delete\n * @throws IllegalArgumentException in case the given entity is {@literal null}.\n */\n void delete(T entity);\n\n /**\n * Deletes the given entities.\n *\n * @param entities The list of entities to delete\n * @throws IllegalArgumentException in case the given {@link Iterable} is {@literal null}.\n */\n void delete(Iterable<? extends T> entities);\n\n /**\n * Deletes all entities managed by the repository.\n */\n void deleteAll();\n\n /**\n * The Document type indexed by this repository\n * @return the class of the document\n */\n Class<T> getIndexedClass();\n\n}", "public interface BlogRepository extends ElasticsearchRepository<Blog, String>{\n\n /**\n * 分页查询博客(去重)\n * @param title\n * @param tag\n * @param content\n * @return\n */\n Page<Blog> findDistinctBlogByTitleContainingOrTagContainingOrContentContaining(String title, String tag, String content, Pageable pageable);\n\n}", "public interface Type_structureSearchRepository extends ElasticsearchRepository<Type_structure, Long> {\n}", "public interface RegistryFieldSearchRepository extends ElasticsearchRepository<RegistryField, Long> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface TActivityRepository extends MongoRepository<TActivity,String> {\n \n}", "public interface ArticleRepository extends ElasticsearchRepository<Article, String> {\n\n Page<Article> findByTitle(String title, Pageable pageable);\n\n @Query(\"{\\\"bool\\\": {\\\"must\\\": [{\\\"match\\\": {\\\"title\\\": \\\"?0\\\"}}]}}\")\n Page<Article> findByAuthorsNameUsingCustomQuery(String title, Pageable pageable);\n}", "@CustomAnnotation(value = \"FIND_ALL_ACTIVITY\")\n\t@RequestMapping(\n\t\t\tvalue=\"/activities\",\n\t\t\tmethod=RequestMethod.GET\n\t\t\n\t\t\t)\n\tpublic ResponseEntity<Set<Activity>> findAcitities(){\n\t\treturn new ResponseEntity<Set<Activity>>(activityService.findAll(), HttpStatus.OK);\n\t}", "public interface DoctorSearchRepository extends ElasticsearchRepository<Doctor, Long> {\n\t @Query(\"{\\\"bool\\\" : {\\\"must\\\" : [{\\\"match\\\" : {\\\"doctorSessionInfos.sessionName\\\" : \\\"?0\\\"}}]}}\")\n\t Set<DoctorSessionInfo> findBySpec(String sessionName);\n\n\t/* @Query(\"{\\\"bool\\\": {\\\"must\\\": [{\\\"match\\\": {\\\"authors.name\\\": \\\"?0\\\"}}]}}\")\n\t Set<Doctor> findBySpeciay(String name, Pageable pageable);*/\n\n}", "public interface ItemRepository extends ReactiveElasticsearchRepository<Item, Long>, ItemSearchRepositoryInternal {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ShipmentActivityRepository extends JpaRepository<ShipmentActivity, Long> {}", "public interface CoveredActivityService {\n\n /**\n * Save a coveredActivity.\n *\n * @param coveredActivityDTO the entity to save\n * @return the persisted entity\n */\n CoveredActivityDTO save(CoveredActivityDTO coveredActivityDTO);\n\n /**\n * Get all the coveredActivities.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<CoveredActivityDTO> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" coveredActivity.\n *\n * @param id the id of the entity\n * @return the entity\n */\n CoveredActivityDTO findOne(Long id);\n\n /**\n * Delete the \"id\" coveredActivity.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n}", "public interface VisitRepository extends CrudRepository<Visit, Long> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface IntroductionStoryRepository extends JpaRepository<IntroductionStory, Long> {\n\t\n\tPage<IntroductionStory> findAllIntroductionStoriesByActivityId(Pageable pageable,Long activityId);\n\n}", "public interface ActivityLogService {\n\n ActivityLog save(ActivityLog activityLog);\n\n void delete(ActivityLog activityLog);\n\n ActivityLog findOne(String id);\n\n List<ActivityLog> findAll();\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface BatchRepository extends JPASearchRepository<Batch, Long> {\n\n}", "@Repository\npublic interface RepositoryOrgTaskTracker extends JpaRepository<OrgTaskTracker, Integer>{\n}", "List<UserActivity> findAllUserActivityInDB() throws DataNotFoundException;", "public interface ActionInstanceRepository extends CrudRepository<ActionInstance, Long> {\n List<ActionInstance> findByAction(Action action);\n}", "public LearningResultHasActivity[] findAll() throws LearningResultHasActivityDaoException;", "public interface AlertsRepository extends CrudRepository<Alert, Long> {\n Alert findByAlertsUuidAndTenantUuid(String alertsUuid, String tenantUuid);\n Page<Alert> findByTenantUuid(String tenantUuid,Pageable pageable);\n}", "public interface ActionRepository extends JpaRepository<Action, Integer> {\n\n}", "@Repository\npublic interface ActivityRep extends JpaRepository<Activity, Long>, JpaSpecificationExecutor<Activity>{\n\n List<Activity> findByMId(Long id);\n\n List<Activity> findByMName(String name);\n\n @Query(\"select a from activity a where a.mName like ?1%\")\n List<Activity> findByLikeName(String likeName);\n}", "public interface ReviewStepMetaRepository extends AbstractEntityRepository<ReviewStepMeta>{\n List<ReviewStepMeta> findBySearchId(String searchId);\n\n\n}", "public interface EmployeeRepository extends ArangoRepository<Employee, String> {}", "public interface MeetingRepository extends JpaRepository<Meeting, Long> {\n}", "public interface Elastic\n{\n /**\n * @return The object's elastic ID.\n */\n @Nullable\n String getElasticId();\n\n /**\n * Sets the object's elastic ID.\n *\n * @param id The object's new elastic ID.\n */\n void setElasticId(@NonNull final String id);\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface LectureRepository extends JPASearchRepository<Lecture, Long> {\n\n}", "public interface DateTrackerRepository extends IRepository<DateTracker,String> {\n Set<DateTracker> getAll();\n}", "public interface CustomerAuditRepository extends JpaRepository<CustomerAudit, Long>{\n\n}", "@RepositoryConfig(cacheName = TENANT_CACHE)\n@Repository\npublic interface TenantRepository extends IgniteRepository<Tenant, Long> {\n\n}", "public interface ElasticSearchClientService {\n\n public void add(TodoItem todoItem);\n\n public String search(String searchString);\n\n public void update(String id, TodoItem todoItem);\n\n public void delete(String id);\n\n}", "public interface AudienceRepository extends JpaRepository<Audience,Long> {\n\n}", "@Repository\npublic interface AlliesRepository extends CrudRepository<AlliesDO, Long> {\n\n}" ]
[ "0.6909409", "0.68812335", "0.67403597", "0.67366284", "0.6728613", "0.6712676", "0.67044693", "0.66577053", "0.664022", "0.66353804", "0.66328764", "0.6606906", "0.6601251", "0.6585675", "0.65562254", "0.6519891", "0.6517794", "0.65165293", "0.65028644", "0.6490124", "0.6475942", "0.647368", "0.64689547", "0.64403224", "0.6428198", "0.6404594", "0.6391667", "0.6382512", "0.63815176", "0.6337825", "0.6318432", "0.63162917", "0.6306519", "0.6297614", "0.6283989", "0.6261242", "0.62490356", "0.62452495", "0.6236487", "0.62130445", "0.6210582", "0.62066597", "0.61963797", "0.6189342", "0.6181179", "0.61503017", "0.61304283", "0.6125573", "0.61229557", "0.61165154", "0.6112737", "0.6110794", "0.6110059", "0.6100877", "0.6048069", "0.604182", "0.60417753", "0.603865", "0.6022712", "0.60209334", "0.6016856", "0.6014156", "0.600462", "0.60003066", "0.5970533", "0.59638363", "0.5933655", "0.5906005", "0.5867731", "0.5813995", "0.5752703", "0.5726699", "0.5705804", "0.5661238", "0.5620689", "0.5613235", "0.56108266", "0.5581088", "0.55167204", "0.54094505", "0.53585064", "0.52592707", "0.5256523", "0.5241539", "0.5232366", "0.521031", "0.5210295", "0.5189722", "0.51670533", "0.5156084", "0.50601983", "0.5055074", "0.5029038", "0.5026663", "0.50171334", "0.5009816", "0.49943635", "0.4949979", "0.49427968", "0.49370983" ]
0.81623656
0
Called when message is received.
@Override public void onMessageReceived(RemoteMessage remoteMessage) { // [START_EXCLUDE] // There are two types of messages data messages and notification messages. Data messages are handled // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app // is in the foreground. When the app is in the background an automatically generated notification is displayed. // When the user taps on the notification they are returned to the app. Messages containing both notification // and data payloads are treated as notification messages. The Firebase console always sends notification // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options // [END_EXCLUDE] // TODO(developer): Handle FCM messages here. // Not getting messages here? See why this may be: https://goo.gl/39bRNJ Log.d(TAG, "From: " + remoteMessage.getFrom()); // Check if message contains a data payload. if (remoteMessage.getData().size() > 0) { int type = Integer.parseInt(remoteMessage.getData().get("type")); Bundle bundle = new Bundle(); ; if (type == 0) { Poll incomingPoll = new Poll(); String sub_contact = remoteMessage.getData().get("sub_contact"); Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class); incomingPoll.subject.setTarget(userBox.query().equal(User_.contact, sub_contact).build().findFirst()); String question = remoteMessage.getData().get("question").replaceAll("<.*>", incomingPoll.subject.getTarget().name); incomingPoll.setQuestion(question); incomingPoll.setType(1); incomingPoll.setPollHash(remoteMessage.getData().get("poll_hash")); String[] options = remoteMessage.getData().get("options").replace("[", "").replace("]", "").split(","); for (String option : options) { incomingPoll.insertOption(option); } Box<Poll> pollBoxBox = App.getInstance().getBoxStore().boxFor(Poll.class); pollBoxBox.put(incomingPoll); EventBus.getDefault().post(new UpdatePoll("You got new poll ")); sendNotification("New question asked to you"); } if (type == 1) { Box<Thread> threadBox = App.getInstance().getBoxStore().boxFor(Thread.class); Thread outgoingthreadCumPoll = threadBox.query().equal(Thread_.threadHash, remoteMessage.getData().get("poll_hash")).build().findFirst(); assert outgoingthreadCumPoll != null; outgoingthreadCumPoll.setUnreadCount(outgoingthreadCumPoll.getUnreadCount() + 1); outgoingthreadCumPoll.increamentVote_counts(); outgoingthreadCumPoll.setResultString(remoteMessage.getData().get("option_count").replace("[", "").replace("]", "")); threadBox.put(outgoingthreadCumPoll); EventBus.getDefault().post(new UpdatePoll("Got an upvote")); EventBus.getDefault().post(new UpdateThread(1, outgoingthreadCumPoll)); sendNotification("Someone anwsered your question"); } if (type == 2) { String contact = remoteMessage.getData().get("user_contact"); Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class); if (!userBox.find(User_.contact, contact).isEmpty()) { User user = userBox.find(User_.contact, contact).get(0); if (!user.getKnows_me()) { ArrayList<String> contacts = new ArrayList<String>(); contacts.add(contact); try { ApiCalls.syncContacts(this, 1, contacts); } catch (JSONException e) { e.printStackTrace(); } } } sendNotification(contact + " added you in his network"); } if (type == 3) { String contact = remoteMessage.getData().get("user_contact"); Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class); if (!userBox.find(User_.contact, contact).isEmpty()) { User user = userBox.find(User_.contact, contact).get(0); user.setKnows_me(true); userBox.put(user); } sendNotification(contact + " accepted your request"); } if (type == 4) { Poll incomingOpenPoll = new Poll(); String question = remoteMessage.getData().get("question"); incomingOpenPoll.setQuestion(question); incomingOpenPoll.setType(1); incomingOpenPoll.setPollHash(remoteMessage.getData().get("poll_hash")); String[] options = remoteMessage.getData().get("options").replace("[", "").replace("]", "").split(","); for (String option : options) { incomingOpenPoll.insertOption(option); } Box<Poll> pollBoxBox = App.getInstance().getBoxStore().boxFor(Poll.class); pollBoxBox.put(incomingOpenPoll); EventBus.getDefault().post(new UpdatePoll("You got new open poll ")); sendNotification("New question asked to you"); } if (type == 5) { Poll incomingThread = new Poll(); String sub_contact = remoteMessage.getData().get("sub_contact"); Box<User> userBox = App.getInstance().getBoxStore().boxFor(User.class); incomingThread.subject.setTarget(userBox.query().equal(User_.contact, sub_contact).build().findFirst()); String question = remoteMessage.getData().get("question").replaceAll("<.*>", incomingThread.subject.getTarget().name); incomingThread.setQuestion(question); incomingThread.setType(1); incomingThread.setSender(remoteMessage.getData().get("passkey")); incomingThread.setThread(true); incomingThread.setPollHash(remoteMessage.getData().get("thread_hash")); Box<Poll> pollBox = App.getInstance().getBoxStore().boxFor(Poll.class); pollBox.put(incomingThread); EventBus.getDefault().post(new UpdatePoll("You received a thread invitation ")); sendNotification("You received a thread invitation"); } if (type == 6) { Poll incomingOpenThread = new Poll(); String question = remoteMessage.getData().get("question"); incomingOpenThread.setQuestion(question); incomingOpenThread.setType(1); incomingOpenThread.setThread(true); incomingOpenThread.setSender(remoteMessage.getData().get("passkey")); incomingOpenThread.setPollHash(remoteMessage.getData().get("thread_hash")); Box<Poll> pollBox = App.getInstance().getBoxStore().boxFor(Poll.class); pollBox.put(incomingOpenThread); EventBus.getDefault().post(new UpdatePoll("You received a thread invitation ")); sendNotification("You received a thread invitation"); } if (type == 7) { Box<Thread> threadBox = App.getInstance().getBoxStore().boxFor(Thread.class); Thread thread = threadBox.query().equal(Thread_.threadHash, remoteMessage.getData().get("thread_hash")).build().findFirst(); assert thread != null; Message message = new Message(remoteMessage.getData().get("message"), remoteMessage.getData().get("passkey") + thread.getPasskey()); thread.setDialogPhoto(remoteMessage.getData().get("passkey") + thread.getPasskey()); thread.setLastMessage(message); thread.setUnreadCount(thread.getUnreadCount() + 1); threadBox.put(thread); EventBus.getDefault().post(new MessageList(message)); EventBus.getDefault().post(new UpdateThread(1, thread)); sendNotification("Message received"); } // if (/* Check if data needs to be processed by long running job */ false) { // // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher. // scheduleJob(); // } else { // // Handle message within 10 seconds // handleNow(); // } } // Check if message contains a notification payload. if (remoteMessage.getNotification() != null) { Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getTitle()); } // Also if you intend on generating your own notifications as a result of a received FCM // message, here is where that should be initiated. See sendNotification method below. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}", "void onMessageReceived(Message message);", "public void messageReceived(Message m) {\n\t\t\r\n\t}", "public void messageReceived() {\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesRecieved, this.getClass()), this\n\t\t.getMessageType(), 1);\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.bytesRecieved, this.getClass()), this\n\t\t.getMessageType(), TrackedMessage.objectSize(this));\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }", "@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}", "@Override\n public void receiveMessage(String message) {\n }", "@Override\n\tpublic void onMessage( String message ) {\n\t\tlog.info(\"received: \" + message);\n\t}", "@Override\n public void handleMessage(Message message) {}", "@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}", "@Override\n\tpublic void receive_message(Message m) {\n\t\t\n\t}", "@Override\n public void onReceive(Object message) throws Exception {\n }", "public void OnMessageReceived(String msg);", "public void messageReceived(Message message) {\n\r\n\t\tLog.info(message.getMsg());\r\n\t}", "public abstract void messageReceived(String message);", "@Override\n\tpublic void onMessageReceived(ACLMessage message) {\n\n\t}", "@Override\r\n public void handleMessage(Message msg) {\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "@Override\n\tpublic void onMessageReceived(Message m) {\n\t\thandle.addMessage(m);\n\t\trefreshMessages();\n\t}", "@Override\n public void onReceive(Object msg) throws Exception {\n }", "void onMessageRead(byte[] data);", "public void onMessage(Message message) {\n lastMessage = message;\n\n }", "public void onDataReceived(byte[] data, String message) {\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttv_read.setText(msg.obj.toString());\n\t\t\t\tToast.makeText(N20PINPadControllerActivity.this, \"recv\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "abstract public boolean onMessageReceived(MMXMessage message);", "void messageReceived(IMSession session, Message message);", "public void onMessage(String message) {\n\t\t\n\t}", "void onReceive(Message message) throws IOException {\n server.onReceive(message);\n }", "public abstract void onTextReceived(String message);", "@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}", "@Override\n\tpublic void receive(String msg) {\n\t\t\n\t}", "@OnMessage\n\n public void onMessage(String message) {\n\n System.out.println(\"Received msg: \" + message);\n\n }", "abstract void onMessage(byte[] message);", "protected void handleMessage(Message msg) {}", "@Override\n\tprotected void doReceiveMessage(Message msg) {\n\t\tdeliverMessage(msg);\n\t}", "public void handleMessage(Message message);", "public void onMessage(String message) {\n\t\t\t\t\tCometMessage msg = deserializeMessage(message);\n\t\t\t\t\tif(msg != null)\n\t\t\t\t\t\tlistener.onMessage(msg);\n\t\t\t\t}", "@Override\n\tpublic void receive(String message) {\n\t\tgetReceiveArea().append(message + \"\\n\");\n\t}", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) pong = true;\n else if (buffer.getPing()) send(\"<pong/>\");\n else {\n try {\n clientController.onReceivedMessage(buffer.get());\n } catch (EmptyBufferException e) {\n System.out.println(\"[CLIENT] The buffer is empty!\");\n }\n }\n }\n\n }", "@Override\n public void onBufferReceived(byte[] buffer) {\n }", "@Override\r\n public void onReceiveResult(Message message) {\r\n switch (message.what) {\r\n //TODO\r\n }\r\n }", "@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}", "@Override\n\tpublic void readMessage(Message message) {\n\t\t\n\t}", "public void messageReceived(String message) {\r\n\t\t// display incoming message to screen.\r\n\t\tthis.chatArea.append(message + \"\\n\");\r\n\t}", "void onNewMessage(String message);", "public interface OnMessageReceived {\n void messageReceived(String message);\n }", "@Override\n\t\t\tpublic void onMessage(Message message) {\n\t\t\t\tTextMessage msg = null;\n\t\t\t\t\n\t\t\t\tif(message instanceof TextMessage){\n\t\t\t\t\tmsg = (TextMessage)message;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Consumer:->Receiving message: \"+ msg.getText());\n\t\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Message of wrong type: \"+message.getClass().getName());\n\t\t\t\t}\n\t\t\t}", "public synchronized void handleMessage(String message) {\n Log.d(TAG, \"incoming message:\" + message);\n OnMessageReceivedListener listener = listenerReference.get();\n if(listener != null) {\n Log.d(TAG, \"listener not null. Handling message..\");\n listener.handleMessage(message);\n }\n else {\n Log.d(TAG, \"listener null!!\");\n }\n }", "@Override\n public void handleMessage(Message msg) {\n Bundle data = msg.getData();\n if (data.containsKey(\"command\")) {\n if (data.getString(\"command\").equalsIgnoreCase(\"get_data\")) {\n mGetDataMessenger = msg.replyTo;\n getData();\n }\n }\n }", "public interface OnMessageReceived {\n\t\tpublic void messageReceived(String message);\n\t}", "@Override\n\t\tpublic void onMessage(Message message) {\n\t\t\tTextMessage msg = null;\n\t\t\t\n\t\t\tif(message instanceof TextMessage){\n\t\t\t\tmsg = (TextMessage)message;\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"Consumer:->Receiving message: \"+ msg.getText());\n\t\t\t\t} catch (JMSException 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}else{\n\t\t\t\tSystem.out.println(\"Message of wrong type: \"+message.getClass().getName());\n\t\t\t}\n\t\t}", "@Override\n public void processMessage(int type, String receivedMsg) {\n }", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "private void receivedMessage(ChannelHandlerContext channelHandlerContext, ByteBuf response) {\n String message = new String(getByteArray(response));\n if (message.contains(\"Heartbeat\")) {\n logger.info(\"Received Heartbeat message\");\n channelHandlerContext.fireUserEventTriggered(response);\n } else {\n clientChannelHandlerObserver.processResponse(getByteArray(response));\n }\n }", "@Override\n\tpublic void addMessageReceivedListener(MessageReceivedListener messageReceivedListener) {\n\n\t}", "public void receiveMessage(String message) {\n\t\tthis.observable.notifyObservers(message);\r\n\t}", "abstract protected void receiveMessage(Message m);", "@Override\n public void receiveMessage(Message m) {\n commReceiver.receiveMessage(m);\n }", "@Override\n\t \t\tpublic void handleMessage(Message msg) {\n\t \t\treceive();\n\t \t\t\t// myTextView.setText(String.valueOf(cnt));\n\t \t\t}", "@Override\n\tpublic void onMessage(Message message) {\n\t\tSystem.out.println(message.getBody());\n\t}", "@Override\r\n\tpublic void receiveMessage(Stanza stanza, Object payload) {\n\t\t\r\n\t}", "public interface OnMessageReceived {\n public void messageReceived(String message);\n }", "@Override\n\t\t\t\tpublic void messageArrived(MqttTopic topicName,\n\t\t\t\t\t\tMqttMessage message) throws Exception {\n\t\t\t\t\tSystem.out.println(\"messageArrived----------\");\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 1;\n\t\t\t\t\tmsg.obj = message.toString();\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}", "@Override\n\tpublic void onChatReceived(ChatEvent arg0) {\n\t\t\n\t}", "@Override\n public void run() {\n Message message = mHandler.obtainMessage(1);\n mHandler.sendMessage(message);\n }", "@Override public void handleMessage(Message msg) {\n super.handleMessage(msg);\n byte[] byteArray = (byte[]) msg.obj;\n int length = msg.arg1;\n byte[] resultArray = length == -1 ? byteArray : new byte[length];\n for (int i = 0; i < byteArray.length && i < length; ++i) {\n resultArray[i] = byteArray[i];\n }\n String text = new String(resultArray, StandardCharsets.UTF_8);\n if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_WRITE) {\n Log.i(TAG, \"we just wrote... [\" + length + \"] '\" + text + \"'\");\n// mIncomingMsgs.onNext(text);\n } else if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_READ) {\n Log.i(TAG, \"we just read... [\" + length + \"] '\" + text + \"'\");\n Log.i(TAG, \" >>r \" + Arrays.toString((byte[]) msg.obj));\n mIncomingMsgs.onNext(text);\n sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// mReadTxt.setText(++ri + \"] \" + text);\n// if (mServerBound && mServerService.isConnected()) {\n// mServerService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// } else if (mClientBound && mClientService.isConnected()) {\n// mClientService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// }\n// mBluetoothStuff.mTalker.write();\n }\n }", "public void onMessage(Message message) {\n gameManager.onMessage(message);\n }", "public void receive(Message message) {\n try {\n if (logObj.isDebugEnabled()) {\n logObj.debug(\"Received Message from: \" + message.getSrc());\n }\n\n CayenneEvent event = messageObjectToEvent((Serializable) message.getObject());\n if (event != null) {\n if (logObj.isDebugEnabled()) {\n logObj.debug(\"Received CayenneEvent: \" + event.getClass().getName());\n }\n\n onExternalEvent(event);\n }\n } catch (Exception ex) {\n logObj.info(\"Exception while processing message: \", ex);\n }\n\n }", "public void onRecieve(RoundTimeMessage message) {\n\n\n }", "@Override\r\n\tpublic void onReceive(Object arg0) throws Exception {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tprocessBluetoothDeviceMessage(msg);\n\t\t\t}", "public void handleMessage(Message msg) {\n switch (msg.what) {\n case handlerState:\n String readMessage = (String) msg.obj; // msg.arg1 = bytes from connect thread\n ReceivedData.setData(readMessage);\n break;\n\n case handlerState1:\n tempSound = Boolean.parseBoolean((String) msg.obj);\n ReceivedData.setSound(tempSound);\n break;\n\n case handlerState5:\n if(\"ACK\".equals ((String) msg.obj ))\n ReceivedData.clearPPGwaveBuffer();\n break;\n\n }\n ReceivedData.Process();\n }", "public void onMessage(Session session, Object message) throws IOException {\n\t}", "public void receive(Message message) {\n\t\t\tappReceiver.getBufferReceive().add(message);\r\n\t\t\t\t\r\n\t\t}", "@Override\n\tpublic void receive() {\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n\n textView.setText(message);\n }", "@Override\n public void onMessageReceived(String from, Bundle data) {\n String message = data.getString(\"message\");\n String key = data.getString(\"key\");\n String value = data.getString(\"value\");\n String enum_text = data.getString(\"enum_text\");\n String extra = data.getString(\"extra\");\n Log.i(TAG, \"From: \" + from);\n Log.i(TAG, \"Message: \" + message);\n\n /**\n * Process the message here.\n * Eg: - Syncing with server.\n * - Store message in local database.\n * - Update UI.\n */\n\n /**\n * In some cases it may be useful to show a notification indicating to the user\n * that a message was received.\n */\n }", "void received() throws ImsException;", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n Log.d(TAG,\"In Handler, Msg = \"+msg.arg1);\n }", "@Override\r\n\t\t\t\t// here the messageReceived method is implemented\r\n\t\t\t\tpublic void messageReceived(String message) {\n\t\t\t\t\tpublishProgress(message);\r\n\t\t\t\t\t// serverMessage[0] = message;\r\n\r\n\t\t\t\t\tserverMessage[count] = message;\r\n\r\n\t\t\t\t\t// count++;\r\n\t\t\t\t\tLog.i(\"TAG\", count + \"辞獄拭辞 閤精 葵: \" + serverMessage[count]);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Log.i(\"TAG\", \"0腰属閤精 葵: \" + serverMessage[0]);\r\n\t\t\t\t\t * Log.i(\"TAG\", \"1腰属 閤精 葵: \" + serverMessage[1]);\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}", "@Override\n public void handleMessage(Message msg) {\n System.out.println(\"recibe mensajes ...\");\n System.out.println(msg.obj);\n }", "@Override\n\tpublic void messageReceived(Message message) {\n\t\tappend(String.format(\"<%s> %s\",message.getSource().getName(),message.getMessage().toString()));\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "@Override\n public void run() {\n Message message = new Message();\n message.what = 4;\n handler.sendMessage(message);\n }", "@Override\n public void onMessageReceived(String receivedMessage) {\n try {\n JSONObject jsonFromString = new JSONObject(receivedMessage);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void onMessageReceived(String message) {\n\t\t\n\t\tILogger logger = LoggerFactory.getLoggerInstance();\n\t\t/** \n\t\t * Create instance of processing module handler and pass message to it. \n\t\t * Processing module handler perform corresponding operation and\n\t\t * compute the changes to be sent to UI\n\t\t */\n\t\tObjectHandler objectHandler = new ObjectHandler();\n\t\tobjectHandler.onMessageReceived(message);\n\t\tlogger.log(ModuleID.PROCESSING, \n\t\t\t\tLogLevel.INFO,\n\t\t\t\t\"Test: Passed the message to processing module ObjectHandler.\");\n\t}", "@SuppressWarnings(\"WeakerAccess\")\n\tprotected abstract void onMessageReceived(@NonNull BroadcastMessage message);", "@Override\n\tpublic void processMessage(byte[] message) {\n\t}", "void systemMessageReceived(IMSession session, Message message);", "@Override\n public void onMessage(Message message) {\n try {\n // Generate data\n QueueProcessor processor = getBean(QueueProcessor.class);\n ServiceData serviceData = processor.parseResponseMessage(response, message);\n\n // If return is a DataList or Data, parse it with the query\n if (serviceData.getClientActionList() == null || serviceData.getClientActionList().isEmpty()) {\n serviceData = queryService.onSubscribeData(query, address, serviceData, parameterMap);\n } else {\n // Add address to client action list\n for (ClientAction action : serviceData.getClientActionList()) {\n action.setAddress(getAddress());\n }\n }\n\n // Broadcast data\n broadcastService.broadcastMessageToUID(address.getSession(), serviceData.getClientActionList());\n\n // Log sent message\n getLogger().log(QueueListener.class, Level.DEBUG,\n \"New message received from subscription to address {0}. Content: {1}\",\n getAddress().toString(), message.toString());\n } catch (AWException exc) {\n broadcastService.sendErrorToUID(address.getSession(), exc.getTitle(), exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n } catch (Exception exc) {\n broadcastService.sendErrorToUID(address.getSession(), null, exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n }\n }", "private Message onMessageReceived(String message, DecentSocket origin) {\n\t\tGson gson = new Gson();\n\t\tJsonObject messageObj = JsonParser.parseString(message).getAsJsonObject();\n\t\t//Timestamp member required for all messages\n\t\tif(messageObj.has(\"timestamp\")) {\n\t\t\tString type = messageObj.get(\"type\").getAsString();\n\t\t\tswitch(type) {\n\t\t\t\tcase \"chat\":\n\t\t\t\t\tchatMessageCallback.apply(gson.fromJson(message, ChatMessage.class), origin);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"peerAsk\":\n\t\t\t\t\treturn onPeerAskMessageReceived(gson.fromJson(message, PeerAskMessage.class), origin);\n\t\t\t\tcase \"peers\":\n\t\t\t\t\treturn onPeersMessageReceived(gson.fromJson(message, PeersMessage.class), origin);\n\t\t\t\tcase \"ping\":\n\t\t\t\t\treturn onPingMessageReceived(gson.fromJson(message, PingMessage.class), origin);\n\t\t\t\tcase \"pong\":\n\t\t\t\t\treturn onPongMessageReceived(gson.fromJson(message, PongMessage.class), origin);\n\t\t\t\tcase \"historyAsk\":\n\t\t\t\t\treturn onHistoryAskMessageReceived(gson.fromJson(message, HistoryAskMessage.class), origin);\n\t\t\t\tcase \"history\":\n\t\t\t\t\treturn onHistoryMessageReceived(gson.fromJson(message, HistoryMessage.class), origin);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public void run() {\n Message message = new Message();\n message.what=1;\n handler.sendMessage(message);\n }", "void onMessage(String message) throws IOException;", "@Override\n public void handleMessage(ACLMessage message) {\n try {\n onMessage(message);\n } catch (Exception e) {\n e.getMessage();\n }\n }", "public void onMessage(Message arg0) {\n\r\n\t}", "public void onReceive(Object message) {\r\n if (message instanceof End) {\r\n End end = (End) message;\r\n \r\n log.debug(\"Message End of file for : \"+end.getFilePath().toString()+\" received!\");\r\n \r\n count++;\r\n \r\n String path = end.getFilePath().toString();\r\n \r\n System.out.println(\"Words count of file : \" + path + \" is \" + wordCount.get(path) + \" words\");\r\n \r\n if (count >= numberOfFiles) {\r\n getContext().system().terminate();\r\n }\r\n } else if (message instanceof Line) {\r\n \t\r\n Line line = (Line) message;\r\n \r\n log.debug(\"Message Line of file for : \"+line.getFilePath().toString()+\" received!\");\r\n\r\n int lineWordsCounts = line.read.split(\" \").length;\r\n \r\n String path = line.getFilePath();\r\n \r\n if (wordCount.containsKey(path)) {\r\n \twordCount.put(path, wordCount.get(path) + lineWordsCounts);\r\n } else {\r\n \twordCount.put(path, lineWordsCounts);\r\n }\r\n \r\n } else if (message instanceof Start) {\r\n Start start = (Start) message;\r\n \r\n log.debug(\"Message Start of file for : \"+start.getFilePath().toString()+\" received!\");\r\n\r\n } else {\r\n\t\t\tlog.error(\"Unexpected object message received: \"+message);\r\n unhandled(message);\r\n }\r\n }" ]
[ "0.81209755", "0.8038442", "0.785025", "0.78344184", "0.7831355", "0.7821942", "0.77962995", "0.77816933", "0.7694074", "0.7620561", "0.75502455", "0.75168604", "0.7508862", "0.7507424", "0.75019807", "0.74520934", "0.7443572", "0.7413645", "0.7413645", "0.7413645", "0.7413645", "0.73494226", "0.73052585", "0.7270996", "0.72665423", "0.72602683", "0.7255077", "0.7238084", "0.72304267", "0.7226918", "0.7213693", "0.7196472", "0.7158908", "0.7150808", "0.7122268", "0.7117301", "0.71077883", "0.70842636", "0.7076596", "0.7064891", "0.7060483", "0.7054305", "0.70438105", "0.70187736", "0.7002418", "0.699722", "0.69876975", "0.69673496", "0.69663864", "0.69626474", "0.69554937", "0.695062", "0.6949023", "0.69289225", "0.6923942", "0.69190454", "0.6901929", "0.6897328", "0.6893842", "0.6891454", "0.68890834", "0.6887799", "0.6887105", "0.68850684", "0.68772924", "0.6871648", "0.687058", "0.6869329", "0.68644786", "0.6863504", "0.6837755", "0.6832137", "0.6831551", "0.68206465", "0.681598", "0.681377", "0.68118006", "0.6811298", "0.68096006", "0.68000555", "0.6793771", "0.67926574", "0.67808336", "0.6773721", "0.67734843", "0.67701435", "0.67681235", "0.67681235", "0.67554283", "0.6733545", "0.6732614", "0.67227906", "0.6720219", "0.6716484", "0.67069227", "0.67043424", "0.6699976", "0.6696301", "0.66809523", "0.6673369", "0.6664135" ]
0.0
-1
Handle time allotted to BroadcastReceivers.
private void handleNow() { Log.d(TAG, "Short lived task is done."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onReceive(Context context, Intent intent) {\n ArrayList<String> key=intent.getStringArrayListExtra(\"time\");\n Calendar calendar = Calendar.getInstance();\n int hours = calendar.get(Calendar.HOUR_OF_DAY);\n int minutes = calendar.get(Calendar.MINUTE);\n Toast.makeText(context, String.valueOf(key.size()), Toast.LENGTH_LONG).show();\n /*if (Data.size()>0) {\n Toast.makeText(context, Data.get(0), Toast.LENGTH_LONG).show();\n /*int hour = Integer.valueOf(Data.get(0).substring(0, Data.get(0).indexOf(\":\")));\n int minute = Integer.valueOf(Data.get(0).substring(Data.get(0).indexOf(\":\")));\n if ((hours == hour) && (minutes == minute))\n try {\n play(context, R.raw.girlfart01);//vibrator.vibrate(2000);Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n Data.remove(0);\n Data.remove(1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }*/\n Log.v(this.getClass().getName(), \"Timed alarm onReceive() started at time: \" + new java.sql.Timestamp(System.currentTimeMillis()).toString());\n }", "private void handleTimeUpdate() {\n Assert.isMainThread();\n Log.d(\"KeyguardUpdateMonitor\", \"handleTimeUpdate\");\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onTimeChanged();\n }\n }\n }", "public void onTimeTick() {\n tick++;\n try {\n sendBeaconLog(10);\n } catch (InterruptedException e) {\n }\n if (tick % 10 == 0) {\n sendDirectedPresence();\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n try {\n float[] message1 = intent.getFloatArrayExtra(\"HR\");\n int message2 = intent.getIntExtra(\"ACCR\", 0);\n int sensorType = intent.getIntExtra(\"SENSOR_TYPE\", 0);\n isRunning = intent.getBooleanExtra(\"IS_RUNNING\",false);\n if (!isRunning) {\n //Thread.sleep(3000);\n isStop = true;\n } else {\n isStop = false;\n }\n if (mSwitch != null) {\n if (isStop) {\n mSwitch.setChecked(isRunning);\n }\n }\n if ((message1 != null ) && (sensorType == 21)) {\n Log.d(\"Receiver\", \"Got HR: \" + message1[0] + \". Got Accuracy: \" + message2);\n int tmpHr = (int)Math.ceil(message1[0] - 0.5f);\n if (tmpHr > 0) {\n //db.getAllUserMonitorDataByLastMeasurementTime(lastMeasurementTime);\n hrTxt.setText(String.valueOf(tmpHr));\n }\n DatabaseHandler db = new DatabaseHandler(getActivity());\n long timeStamp = intent.getLongExtra(\"TIME\", 0)/1000000L;\n lastSyncTxt.setText(String.valueOf(getDate(timeStamp)) + \" / \" + db.getAllUserMonitorDataByLastMeasurementTime(lastMeasurementTime).size() + \" records\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public abstract void broadcastTraceTime(Server s);", "@Override\n\t\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\tString action = arg1.getAction();\n\t\t\tmContext = arg0;\n\t\t\t\n\t\t\tif(action.equals(\"com.example.timeshowactivity.OFF\")){\n\t\t\t mDelayFlag = 0;\n\t\t\t //WhetherSendIntent =false;\n\t\t\t setTimeShowState(false);\n\t\t\t Log.i(TAG,\"qiuyaobo onReceive com.example.timeshowactivity.OFF\");\n\t\t\t}else if(action.equals(\"com.example.timeshowactivity.ON\")){\n\t\t\t mDelayFlag = 1;\n\t\t\t\t//WhetherSendIntent =true;\n\t\t\t setTimeShowState(true);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive00com.example.timeshowactivity.ON***\");\n\t\t\t}else if(action.equals(\"android.intent.action.BOOT_COMPLETED\")){\n\t\t\t\tLog.d(\"ljz\", \"set hall\");\n\t\t\t\t//PowerManager pm = (PowerManager) arg0.getSystemService(Context.POWER_SERVICE);\n\t\t\t\t//pm.setHallSensor(true, 0);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....android.intent.action.BOOT_COMPLETED***\");\n\t\t\t\treturn;\n\t\t }else if (MTK_ACTION_UNREAD_CHANGED.equals(action)){\n\t\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....MTK_ACTION_UNREAD_CHANGED***\");\n\t\t\t\t\t\t\tboolean lidOpen =SystemProperties.getBoolean(\"persist.sys.lidopen\",false);\n\t\t\t\t\t\t\tif(lidOpen){//hal is off ,at the same time a call is arriving,open the hal ,at hal Call interface,hang up the call ,we should display the TimeShow \n\t\t\t\t\t\t\t\t\tmDelayFlag = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tmDelayFlag = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!isIdle()){\n\t\t\t\t\t\t\t\treturn;//when we opened call waiting function ,we hanged up one call ,the other call has been activitied,at this time we cannot update TimeShow actovity if the TimeShow actovity on Background process!\n\t\t\t\t\t\t\t}\n\t\t\t\t\t MainActivity m = MainActivity.getInstance();\n\t\t\t\t\t if(m != null){\n\t\t\t\t\t m.updatetInfo();\n\t }\n\t }\n\t\n\t\t if(!isIdle()){\n\t\t\t\t\t\tIntent updateIncallTouchUi = new Intent(\"UPDATE_INCALLSCREEN_TOUCHUI\");\n\t\t\t\t\t\tmContext.sendBroadcast(updateIncallTouchUi);\n\t\n\t }\n\t\t \n\t\t long milliseconds = SystemClock.elapsedRealtime();\n\t\t long timeSinceLastEvent = milliseconds - mLastReceiveEventTime;\n\t\t mLastReceiveEventTime = milliseconds;\n\t\t mHandler.removeCallbacks(mDelayTimeTask);\n\t\t\t\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ******** flag=\" +mDelayFlag + \" timeSinceLastEvent=\"+timeSinceLastEvent);\n\t\t if(timeSinceLastEvent < DELAY_TIME){\n\t\t\t\t\t\tlong i;\n\t\t\t\t\t\ti= DELAY_TIME - timeSinceLastEvent;\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***timeSinceLastEvent < DELAY_TIME..timeSinceLastEvent=\" +timeSinceLastEvent + \"; DELAY_TIME=\"+DELAY_TIME+\";i=\"+i);\n\t\t mHandler.postDelayed(mDelayTimeTask, DELAY_TIME - timeSinceLastEvent);\n\t\t return;\n\t\t }\n\t\n\t\t\t\tif(mDelayFlag == 0){\n\t\t\t\t\t\tMainActivity m = MainActivity.getInstance();\n\t\t\t\t\t\tLog.i(TAG,\" qiuyaobo onReceive mDelayFlag == 0 m=\" +m);\n\t\t\t\n\t\t\t\t\t\tif(m != null){\n\t\t\t\t\t\t m.finish();\n\t\t\t\t\t\t\t//m.moveTaskToBack(false);\n\t\t\t // m.onBackPressed();\n\t\t\t\t\t\t\t//ActivityManager am = (ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE);\n\t\t\t\t\t\t//\tam.forceStopPackage(\"com.example.timeshowactivity\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(mDelayFlag == 1){\n\t\t\n\t\t /// mTelephonyManager = (TelephonyManager) (mContext.getSystemService(Context.TELEPHONY_SERVICE));//hj\n\t\t // mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); //hj\n\t\t\t\t\n\t\t\t\t\tComponentName cn = new ComponentName(\"com.example.timeshowactivity\",\"com.example.timeshowactivity.MainActivity\");\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tintent.setComponent(cn);\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context, \"Your Task Time Is Over\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n if (!PPApplicationStatic.getApplicationStarted(true, true))\n return;\n\n Calendar now = Calendar.getInstance();\n int gmtOffset = 0; //TimeZone.getDefault().getRawOffset();\n final long _time = now.getTimeInMillis() + gmtOffset;\n\n final String alarmPackageName = intent.getStringExtra(EXTRA_ALARM_PACKAGE_NAME);\n\n if (EventStatic.getGlobalEventsRunning(context)) {\n final Context appContext = context.getApplicationContext();\n //PPApplication.startHandlerThreadBroadcast(/*\"AlarmClockBroadcastReceiver.onReceive\"*/);\n //final Handler __handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n //__handler.post(new PPApplication.PPHandlerThreadRunnable(context.getApplicationContext()) {\n //__handler.post(() -> {\n Runnable runnable = () -> {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", \"START run - from=AlarmClockBroadcastReceiver.onReceive\");\n\n //Context appContext= appContextWeakRef.get();\n\n //if (appContext != null) {\n PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = null;\n try {\n if (powerManager != null) {\n wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, PPApplication.PACKAGE_NAME + \":AlarmClockBroadcastReceiver_onReceive\");\n wakeLock.acquire(10 * 60 * 1000);\n }\n\n// PPApplicationStatic.logE(\"[EVENTS_HANDLER_CALL] AlarmClockBroadcastReceiver.onReceive\", \"sensorType=SENSOR_TYPE_ALARM_CLOCK\");\n EventsHandler eventsHandler = new EventsHandler(appContext);\n eventsHandler.setEventAlarmClockParameters(_time, alarmPackageName);\n eventsHandler.handleEvents(EventsHandler.SENSOR_TYPE_ALARM_CLOCK);\n\n } catch (Exception e) {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", Log.getStackTraceString(e));\n PPApplicationStatic.recordException(e);\n } finally {\n if ((wakeLock != null) && wakeLock.isHeld()) {\n try {\n wakeLock.release();\n } catch (Exception ignored) {\n }\n }\n }\n //}\n }; //);\n PPApplicationStatic.createEventsHandlerExecutor();\n PPApplication.eventsHandlerExecutor.submit(runnable);\n }\n }", "@Override\n\t\tpublic void onReceive(Context c, Intent i) {\n\t\t\t\n\t\t\tint h=i.getIntExtra(\"hrs\", 0);\n\t\t\tint m=i.getIntExtra(\"min\", 0);\n\t\t\tint s=i.getIntExtra(\"sec\", 0);\n\t\t\tLog.d(TAG, Integer.toString(h));\n\t\t\tLog.d(TAG, Integer.toString(m));\n\t\t\tLog.d(TAG, Integer.toString(s));\n\t\t\t\n\t\t\t//Printing Time to Textview\n\t\t\t\n\t\t\tTextView th=(TextView) findViewById(R.id.hr);\n\t\t\tTextView tm=(TextView) findViewById(R.id.mn);\n\t\t\tTextView ts=(TextView) findViewById(R.id.sc);\n\t\t\tif(h>=10)\n\t\t\t\tth.setText(Integer.toString(h)+\":\");\n\t\t\telse\n\t\t\t\tth.setText(\"0\"+Integer.toString(h)+\":\");\n\t\t\tif(m>=10)\n\t\t\t\ttm.setText(Integer.toString(m)+\":\");\n\t\t\telse\n\t\t\t\ttm.setText(\"0\"+Integer.toString(m)+\":\");\n\t\t\tif(s>=10)\n\t\t\t\tts.setText(Integer.toString(s));\n\t\t\telse\n\t\t\t\tts.setText(\"0\"+Integer.toString(s));\n\t\t\t\n\t\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"ALARMA\", \"alarma\");\n AlarmUtils.scheduleAlarmHeartRate();\n BleDevice device = new BleDevice(new DeviceManager().getDevice().getMacAddress());\n\n device.connect();\n /*\n while(!device.readSteps(new StepsListener() {\n @Override\n public void onStepsRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n }\n })){\n }\n */\n\n while(!device.readHeartRate(new HeartRateListener() {\n @Override\n public void onHeartRateRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n\n Measurement measurement = new Measurement(new SessionManager().getId(), value, currentTimeMillis()/1000);\n new ApiHelper().uploadHeartRateMeasure(measurement, new SessionManager().getJWT());\n }\n }));\n }", "@Override\n\tpublic void msgUpdateTime(int time, int day) {\n\t\tlog.add(new LoggedEvent(\"Recieved Time \" + time));\n\t}", "public void onRecieve(RoundTimeMessage message) {\n\n\n }", "private void handleUpdateTimeMessage() {\n invalidate();\n if (shouldTimerBeRunning()) {\n long timeMs = System.currentTimeMillis();\n long delayMs = INTERACTIVE_UPDATE_RATE_MS - (timeMs % INTERACTIVE_UPDATE_RATE_MS);\n mUpdateTimeHandler.sendEmptyMessageDelayed(MSG_UPDATE_TIME, delayMs);\n }\n }", "private void handleUpdateTimeMessage() {\n invalidate();\n if (shouldTimerBeRunning()) {\n long timeMs = System.currentTimeMillis();\n long delayMs = INTERACTIVE_UPDATE_RATE_MS\n - (timeMs % INTERACTIVE_UPDATE_RATE_MS);\n mUpdateTimeHandler.sendEmptyMessageDelayed(MSG_UPDATE_TIME, delayMs);\n }\n }", "private void handleUpdateTimeMessage() {\n invalidate();\n if (shouldTimerBeRunning()) {\n long timeMs = System.currentTimeMillis();\n long delayMs = INTERACTIVE_UPDATE_RATE_MS\n - (timeMs % INTERACTIVE_UPDATE_RATE_MS);\n mUpdateTimeHandler.sendEmptyMessageDelayed(MSG_UPDATE_TIME, delayMs);\n }\n }", "private void handleUpdateTimeMessage() {\n invalidate();\n if (shouldTimerBeRunning()) {\n long timeMs = System.currentTimeMillis();\n long delayMs = INTERACTIVE_UPDATE_RATE_MS\n - (timeMs % INTERACTIVE_UPDATE_RATE_MS);\n mUpdateTimeHandler.sendEmptyMessageDelayed(MSG_UPDATE_TIME, delayMs);\n }\n }", "private void handleUpdateTimeMessage() {\n invalidate();\n if (shouldTimerBeRunning()) {\n long timeMs = System.currentTimeMillis();\n long delayMs = INTERACTIVE_UPDATE_RATE_MS\n - (timeMs % INTERACTIVE_UPDATE_RATE_MS);\n mUpdateTimeHandler.sendEmptyMessageDelayed(MSG_UPDATE_TIME, delayMs);\n }\n }", "private void handleUpdateTimeMessage() {\n invalidate();\n if (shouldTimerBeRunning()) {\n long timeMs = System.currentTimeMillis();\n long delayMs = INTERACTIVE_UPDATE_RATE_MS\n - (timeMs % INTERACTIVE_UPDATE_RATE_MS);\n mUpdateTimeHandler.sendEmptyMessageDelayed(MSG_UPDATE_TIME, delayMs);\n }\n }", "public void mo33398h() {\n String str = \"com.tencent.android.tpush.service.channel.heartbeatIntent.pullup\";\n String str2 = \"TpnsChannel\";\n try {\n if (this.f23285A == null) {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.SCREEN_ON\");\n intentFilter.addAction(\"android.intent.action.SCREEN_OFF\");\n intentFilter.addAction(\"android.intent.action.USER_PRESENT\");\n intentFilter.addAction(str);\n C6973b.m29776f().registerReceiver(this.f23292L, intentFilter);\n this.f23285A = PendingIntent.getBroadcast(C6973b.m29776f(), 0, new Intent(str), 134217728);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23282q > f23278m) {\n f23282q = f23278m;\n }\n if (XGPushConfig.isForeignWeakAlarmMode(C6973b.m29776f())) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"schedulePullUpHeartbeat WaekAlarmMode heartbeatinterval: \");\n sb.append(f23280o);\n sb.append(\" ms\");\n C6864a.m29305f(str2, sb.toString());\n f23282q = f23280o;\n }\n f23282q = C7055h.m30166a(C6973b.m29776f(), \"com.tencent.android.xg.wx.HeartbeatIntervalMs\", f23282q);\n long j = currentTimeMillis + ((long) f23282q);\n mo33391b(true);\n C7045d.m30117a().mo34149a(0, j, this.f23285A);\n } catch (Throwable th) {\n C6864a.m29302d(str2, \"scheduleHeartbeat error\", th);\n }\n }", "@Override\n public void onReceive(final Context context, Intent intent) {\n// PPApplicationStatic.logE(\"[IN_BROADCAST] DashClockBroadcastReceiver.onReceive\", \"xxx\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null) {\n dashClockExtension.updateExtension();\n }\n\n //final boolean refresh = (intent == null) || intent.getBooleanExtra(EXTRA_REFRESH, true);\n\n /*PPApplication.startHandlerThreadBroadcast();\n final Handler handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThread\", \"START run - from=DashClockBroadcastReceiver.onReceive\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null)\n {\n dashClockExtension.updateExtension();\n }\n }\n });*/\n\n }", "@Override\n\t\tpublic void run() {\n\t\t\twhile (!endFlag) {\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tif (endTime - touchStartTime > 6000) {\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.what = 0;\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "boolean hasReceiveTime();", "private void m29985m() {\n String str = \"com.tencent.android.tpush.service.channel.heartbeatIntent\";\n String str2 = \"TpnsChannel\";\n try {\n if (this.f23299z == null) {\n C6973b.m29776f().registerReceiver(new BroadcastReceiver() {\n public void onReceive(Context context, Intent intent) {\n C7005b.m29964a().m29983k();\n }\n }, new IntentFilter(str));\n this.f23299z = PendingIntent.getBroadcast(C6973b.m29776f(), 0, new Intent(str), 134217728);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23279n > f23278m) {\n f23279n = f23278m;\n }\n if (XGPushConfig.isForeignWeakAlarmMode(C6973b.m29776f())) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"scheduleHeartbeat WaekAlarmMode heartbeatinterval: \");\n sb.append(f23280o);\n sb.append(\" ms\");\n C6864a.m29305f(str2, sb.toString());\n f23279n = f23280o;\n }\n f23279n = C7055h.m30166a(C6973b.m29776f(), \"com.tencent.android.xg.wx.HeartbeatIntervalMs\", f23279n);\n C7045d.m30117a().mo34149a(0, currentTimeMillis + ((long) f23279n), this.f23299z);\n } catch (Throwable th) {\n C6864a.m29302d(str2, \"scheduleHeartbeat error\", th);\n }\n }", "@Override protected void doProcess(Time systemTime) {\n }", "public void onReceive(Context context, Intent intent) {\n\n Toast.makeText(context, \"Alarm worked.\", Toast.LENGTH_LONG).show();\n final Calendar c = Calendar.getInstance();\n long mHour = c.get(Calendar.HOUR_OF_DAY);\n long mMinute = c.get(Calendar.MINUTE);\n Log.d(\"myTag\", \"Alarm executed at : \" + mHour + \":\" + mMinute);\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n AppUtils.setMorningAlarm(context);\n }", "@Override\n\tpublic void onMessageReceived(Message msg) {\n\t\tif ( msgSendTimes.containsKey(\"\"+msg.Payload)) {\n\t\t\tlong startTime = msgSendTimes.get((String)msg.Payload);\n\t\t\tlong elapsedTime = System.nanoTime() - startTime;\n\t\t\tmsgSendTimes.remove((String)msg.Payload);\n\t\t\tmsgTimes.add(elapsedTime);\n\t\t\tSystem.out.println(elapsedTime / 1000000000f);\n\t\t}\n\t}", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n @Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context, \"Время поливать свои растения! \", Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\tSystem.out.println(\"ALARM CALLED\");\n\t\t\tsendPostRequest();\n\t\t}", "public void onScheduled(long scheduledTime);", "@Scheduled(fixedRate = 60_000)\n public void checkEventTime() {\n isTimeService.findAll().forEach(event -> {\n if (event.getSchedulledTime().isBefore(LocalDateTime.now())) {\n this.producer.sendReachTimeMessage(new IsTime(event.getMessageId()));\n this.isTimeService.deleteById(event.getSchedulledId());\n }\n });\n// log.info(\"Schedulled time check.\");\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n filterDayWise();\n }", "public void setReceiveTime(Date receiveTime) {\n this.receiveTime = receiveTime;\n }", "public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }", "public void timeout(){\n\t\tDate now = new Date();\n\t\tfor (Broadcast b : this.broadcasts){\n\t\t\tif (b.getTimeout().getTime() < now.getTime()){\n\t\t\t\tthis.remove(b);\n\t\t\t}\n\t\t}\n\t}", "private void informTimeToCross() {\n if (continueAskingTimes) {\n requestTimes();\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String refresh = intent.getStringExtra(MyService.REFRESH_MONEY_PLAYER);\n Log.i(\"II/FullScreen_Juego>\", \" receiver2 > REFRESH : \"+refresh);\n\n try {\n\n //Si lo que recibimos es mayor que lo que habia entonces GANAMOS dinero\n if (Float.parseFloat(refresh) > Float.parseFloat(visorMoneyP1.getText().toString())\n ) {\n //Ejecutamos sonido\n soundGanamosDinero.start();\n //Ejecutar animacion\n visorMoneyP1.startAnimation(aumento);\n //Mostramos el Custom Toast Felicitaciones!\n Toast toast = new Toast(getApplicationContext());\n toast.setDuration(Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);\n toast.setView(layout_ganamos);//setting the view of custom toast layout\n toast.show();\n\n\n //Monstramos imagview/gif confeti\n imageView_gif_confeti.setVisibility(View.VISIBLE);\n //Despues de 6 segundos ocultamos Confeti\n new CountDownTimer(6000, 1000) {\n public void onFinish() {\n // When timer is finished\n // Execute your code here\n\n imageView_gif_confeti.setVisibility(View.INVISIBLE);\n }\n\n public void onTick(long millisUntilFinished) {\n // millisUntilFinished The amount of time until finished.\n }\n }.start();\n\n\n //Si lo que recibimos es MENOR que lo que habia entonces PERDIMOS dinero\n } else if (Float.parseFloat(refresh) < Float.parseFloat(visorMoneyP1.getText().toString())\n ) {\n\n //Ejecutamos sonido\n soundPerdimosDinero.start();\n //Ejecutamos animacion\n visorMoneyP1.startAnimation(sacudir);\n\n //Mostramos el Custom Toast Perdimos :(\n Toast toast = new Toast(getApplicationContext());\n toast.setDuration(Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);\n toast.setView(layout_pierde);//setting the view of custom toast layout\n toast.show();\n }\n\n\n visorMoneyP1.setText(refresh);\n\n\n }catch (Exception e){\n Log.d(\"II/\",\"Error: \"+e);\n }\n\n }", "public void sendMessage(View v) {\n /*\n\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.edit_message);\n String message = editText.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n */\n long time = currentTimeMillis();\n Date d1 = new Date();\n Date d2;\n // d2 = new Date(d1.getYear(),d1.getMonth(),d1.getDate(),d1.getHours(),d1.getMinutes(),d1.getSeconds());\n Toast.makeText(this, \"ALARM ON\", Toast.LENGTH_SHORT).show();\n // Calendar calendar = Calendar.getInstance();\n // calendar.set(Calendar.HOUR_OF_DAY, alarmTimePicker.getCurrentHour());\n // calendar.set(Calendar.MINUTE, alarmTimePicker.getCurrentMinute());\n alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(MainActivity.this, AlarmReceiver.class);\n pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n // Set the alarm's trigger time to 8:30 a.m.\n calendar.set(Calendar.HOUR_OF_DAY, 14);\n calendar.set(Calendar.MINUTE, 58);\n Toast.makeText(MainActivity.this, \"bjr\", Toast.LENGTH_SHORT).show();\n // alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, time + 5, 10000, pendingIntent);\n alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), pendingIntent);\n // Bon manque de prevenir le receiver....!!\n\n }", "public abstract void broadcastTraceTimeCustom(Server s, String prefix);", "@Override\n public void run() {\n NotificationHelper nh = new NotificationHelper(getApplicationContext(), alarmId);\n\n /* AlarmEntity is null for snoozed alarm\n * Get actual alarm time by: CurrentTime - silenceTimeout\n */\n if (isSnoozed) {\n nh.deliverMissedNotification(\n System.currentTimeMillis() - (Long.parseLong(silenceTimeStr) * 60000));\n } else\n nh.deliverMissedNotification(alarmEntity.getAlarmTime());\n\n stopAlarmService();\n }", "public void setReceiveTime(Date receiveTime) {\r\n this.receiveTime = receiveTime;\r\n }", "private synchronized void m16565c() {\n if (!(this.f14719b || this.f14723f.hasMessages(this.f14724g))) {\n this.f14723f.sendMessageDelayed(this.f14723f.obtainMessage(this.f14724g), 2000);\n }\n }", "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\t\tTimer timer = new Timer();\n\t\tTimerTask task = new TimerTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLog.e(\"SERVICE\",\"sulod\");\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setAction(ResponseReceiver.ACTION_RESP);\n\t\t\t\tintent.addCategory(Intent.CATEGORY_DEFAULT);\n\t\t\t\tintent.putExtra(\"MESSAGE\", 100);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}\n\t\t};\n\t\ttimer.schedule(task, 10, SEND_INTERVAL);\n\t}", "@Override\n public void run() {\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e2) {\n // TODO Auto-generated catch block\n e2.printStackTrace();\n }\n if(isTmp!=-1 && MainActivity2.linkLose==-1){\n Message message=new Message();\n message.what=15;\n MainActivity.hReceiver.sendMessage(message);\n\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context, \"Broadcast Received\", Toast.LENGTH_LONG).show();\n /*\n first param is the context\n second param is message to display\n third param is the duration to display the message\n */\n }", "private void setHeartRateMonitor()\n {\n\n Calendar cal = Calendar.getInstance();\n Date now = new Date();\n cal.setTime(now);\n\n long alarm_time = cal.getTimeInMillis();\n\n// if(cal.before(Calendar.getInstance()))\n// alarm_time += 60*1000;\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Intent intent = new Intent(this, HeartRateMonitor.class);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, HEART_RATE_MONITOR_REQUEST_CODE, intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, alarm_time,90000, pendingIntent);\n\n Log.i(\"hrmonitor\",\"hrmonitor alarm set\");\n }", "@Override\r\n\t\tpublic void onReceive(Context arg0, Intent intent) {\n\t\t\tString action=intent.getAction();\r\n\t\t\tif(action.equals(\"update_sportTime_calorie_distance\")){\r\n\t\t\t\tif(isOnTotalSteps){\r\n\t\t\t\t\ttvCalorie.setText(calorie2String(BleService.totalCalorie)+\"k cal\");\r\n\t\t\t\t\ttvSportTime.setText(time2String(BleService.totalSportTime));\r\n\t\t\t\t\ttvDistance.setText(BleService.totalDistance+\"m\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttvCalorie.setText(calorie2String(BleService.intervalCalorie)+\"k cal\");\r\n\t\t\t\t\ttvSportTime.setText(time2String(BleService.intervalSportTime));\r\n\t\t\t\t\ttvDistance.setText(BleService.intervalDistance+\"m\");\r\n\t\t\t\t}\r\n\t\t\t\tdb.execSQL(\"UPDATE sportData SET steps=? WHERE date=?\", new Object[]{BleService.totalSteps, dateString});\r\n\t\t\t\tlayoutChart.removeViewAt(0);\r\n\t\t\t\tlayoutChart.addView(getGraphicalView(), 0);\r\n\t\t\t}\r\n\t\t\tif(action.equals(\"update_steps\")){\r\n\t\t\t\ttvTotalSteps.setText(BleService.totalSteps+\"\");\r\n\t\t\t\ttvIntervalSteps.setText(BleService.intervalSteps+\"\");\r\n\t\t\t\tint currentCount=BleService.totalSteps*100/targetSteps;\r\n\t\t\t\tif(currentCount>100){\r\n\t\t\t\t\tpgTotalSteps.setCurrentCount(100);\r\n\t\t\t\t}else if(currentCount<0){\r\n\t\t\t\t\tpgTotalSteps.setCurrentCount(0);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpgTotalSteps.setCurrentCount(currentCount);\r\n\t\t\t\t}\r\n\t\t\t\tfloat percent=BleService.totalSteps*100f/targetSteps;\r\n\t\t\t\tif(percent>100){\r\n\t\t\t\t\ttvComplete.setText(\"100%\");\r\n\t\t\t\t}else if(percent<0){\r\n\t\t\t\t\ttvComplete.setText(\"0%\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttvComplete.setText(percent2String(percent)+\"%\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n int heartRateWatch = intent.getIntExtra(LiveRecordingActivity.HEART_RATE, -1);\n String s = String.valueOf(heartRateWatch) + \" [BPM]\" ;\n hrTextView.setText(s);\n\n if (hasPlot) {\n // Plot the graph\n xyPlotSeriesList.updateSeries(HR_PLOT_WATCH, heartRateWatch);\n XYSeries hrWatchSeries = new SimpleXYSeries(xyPlotSeriesList.getSeriesFromList(HR_PLOT_WATCH), SimpleXYSeries.ArrayFormat.XY_VALS_INTERLEAVED, HR_PLOT_WATCH);\n LineAndPointFormatter formatterPolar = xyPlotSeriesList.getFormatterFromList(HR_PLOT_WATCH);\n heartRatePlot.clear();\n heartRatePlot.addSeries(hrWatchSeries, formatterPolar);\n heartRatePlot.redraw();\n // And add HR value to HR ArrayList\n hrDataArrayList.add(heartRateWatch);\n hrTimes.add(System.currentTimeMillis()-initialTime);\n }\n }", "private void onCalculatingChargingTime() {\n store.saveString(remainingTimeForBatteryToDrainOrCharge, \"Computing charging time...\");\n }", "protected void processTimer(){\n if(timer != null){\n timer.cancel();\n timer = null;\n }\n // Verificamos si el partido esta en progreso\n if(match.status == Match.STATUS_PENDING || match.status == Match.STATUS_ENDED){\n return;\n }\n // Creamos temporizador 90 * 60 * 1000 = 5.400.000\n timer = new CountDownTimer(5400000, 1000) {\n @Override\n public void onTick(long l) {\n // Calcular los segundos que pasaron\n long seconds = (new Date().getTime() - matchDayLong) / 1000;\n // Calcular los minutos del partido\n long minutes = seconds / 60;\n //long minutes = TimeUnit.MILLISECONDS.toMinutes(uptime);\n if(minutes < 0){\n minutes = 0;\n seconds = 0;\n statusMedium.setText(\"PT\");\n }if(minutes > 45 && minutes < 60){\n minutes = 45;\n seconds = 60;\n }else if(minutes > 90){\n minutes = 90;\n seconds = 60;\n statusMedium.setText(\"ST\");\n }else if(minutes >= 60){\n minutes -= 15;\n statusMedium.setText(\"ST\");\n }else{\n statusMedium.setText(\"PT\");\n }\n\n statusTime.setText(String.format(\"%02d:%02d\", minutes, (seconds%60)));\n }\n\n @Override\n public void onFinish() {\n\n }\n }.start();\n }", "public void setReceiveTime(Date receiveTime) {\n this.receiveTime = receiveTime;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.e(\"i m in Broadcast recive\", \"i m in Broadcast recive\");\n Double latitude = intent.getDoubleExtra(\"latitude\",0.0);\n Double longitude = intent.getDoubleExtra(\"longitude\",0.0);\n int pendingPoints = intent.getIntExtra(\"pendingPoints\",0);\n String timeStamp = intent.getStringExtra(\"lastUpdated\");\n boolean isBulkUpload = intent.getBooleanExtra(\"isBulkUpload\",false);\n\n\n textViewLastUpdatedTime.setText(\"Last Updated On: \"+timeStamp);\n textViewPointsCount.setText(\"Pending Points: \"+pendingPoints);\n if(getAddress(latitude,longitude).isEmpty()){\n textview_tracking_updates.setText(\"Updating Details: \\n\"+latitude+\" / \"+longitude );\n }else{\n textview_tracking_updates.setText(\"Updating Details: \\n\\nLast Updated Location is : \"+getAddress(latitude,longitude));\n }\n\n\n }", "@Override\r\n public void run() {\n d7++;\r\n if (d7 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP7_EXPIRE});\r\n }\r\n }", "public void timeToChallenger() {\n\n\n String c = null;\n for(PlayerInterface p : onlinePlayers){\n if(p.getNickname().equals(getCurrentTurn().getCurrentPlayer().getNickname())){\n c = p.getWorkerRef().get(0).getColor();\n break;\n }\n }\n notifyCards(getCurrentTurn().getCurrentPlayer().getNickname(), c);\n notifyChoose(cardsChosen, this.getAllGods(), this.getCurrentTurn().getCurrentPlayer().getNickname());\n }", "public synchronized void checkTimeoutMessages() {\n SQSMessage SQSMessage;\n String receiptHandler;\n long currentTimeStampDifference;\n for (Map.Entry pairs : receivedMessages.entrySet()) {\n SQSMessage = (SQSMessage) pairs.getValue();\n currentTimeStampDifference = System.currentTimeMillis() - SQSMessage.getReceivedTimeStamp();\n if (currentTimeStampDifference > SQSMessage.getDefaultVisibilityTimeout()) {\n receiptHandler = (String) pairs.getKey();\n SQSMessageQueue.addFirst(SQSMessage);\n receivedMessages.remove(receiptHandler);\n }\n }\n }", "@Override\n public void run() {\n int time = 59;\n while (time >= -1) {\n try {\n Message message = new Message();\n message.what = AppConfig.CHECKCODE;\n message.obj = time;\n handler.sendMessage(message);\n Thread.sleep(1000);\n time--;\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n setAlarm(context);\n }", "private void onCalculatingDischargingTime() {\n store.saveString(remainingTimeForBatteryToDrainOrCharge, \"Computing drain time...\");\n }", "@Override\n \tpublic void handleMessage(Message msg) {\n \t\tswitch (msg.what) {\n\t\t\tcase MSG_BASE:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase MSG_ONESECOND:\n\t onTimeChanged();\n\t invalidate();\n\t mHandler.sendEmptyMessageDelayed(MSG_ONESECOND, ONESECOND);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n \t\tsuper.handleMessage(msg);\n \t}", "protected void timeout(Object data_) \n\t{\n\t\tif ( data_ instanceof DiffTimer )\n\t\t{\n\t\t\tDiffTimer d = (DiffTimer)data_ ;\n\t\t\tint type = d.EVT_Type ;\n\t\t\tif(pendingInterest!=null && type!=DiffTimer.TIMEOUT_DELAY_BROADCAST){\n\t\t\t\tsendPacket(pendingInterest, 0.0) ;\n\t\t\t}\n\t\t\tswitch ( type )\n\t\t\t{\n\t\t\t\tcase DiffTimer.TIMEOUT_SEND_REINFORCEMENT :\n\t\t\t\t\tsendReinforcements() ;\n\n\t\t\t\t\t/*// if the size of the dataCache has become 0, there is no need for the timer. The timer will be set next time dataCache_insert is called. \n\t\t\t\t\tif ( (dataCache.size() == 0) && (reinforcementTimer.handle != null) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcancelTimeout(reinforcementTimer.handle) ;\n\t\t\t\t\t\treinforcementTimer.setObject(null) ;\n\t\t\t\t\t\treinforcementTimer.handle = null ; \n\t\t\t\t\t\treinforcementTimer = null ;\n\t\t\t\t\t}\n\t\t\t\t\telse{*/\n\t\t\t\t\t//\t reset the timer. \n\t\t\t\t\t\treinforcementTimer.handle = setTimeout(reinforcementTimer, REINFORCE_WINDOW) ;\n\t\t\t\t\t//}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase DiffTimer.TIMEOUT_INTEREST_CACHE_PURGE :\n\t\t\t\t\tinterestCachePurge() ;\n\n\t\t\t\t\t/* if the size of the interestCache has become 0, there is no need for the timer. The timer will be set next time interestCache_insert is called. */\n\t\t\t\t\tif ( (interestCache.size() == 0) && (interestCache_purgeTimer.handle != null) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcancelTimeout(interestCache_purgeTimer.handle) ;\n\t\t\t\t\t\tinterestCache_purgeTimer.setObject(null) ;\n\t\t\t\t\t\tinterestCache_purgeTimer.handle = null ; \n\t\t\t\t\t\tinterestCache_purgeTimer = null ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t/* reset the timer. */\n\t\t\t\t\t\tinterestCache_purgeTimer.handle = setTimeout(interestCache_purgeTimer, INTEREST_CACHE_PURGE_INTERVAL) ;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase DiffTimer.TIMEOUT_DELAY_BROADCAST :\n\t\t\t\t\t\n\t\t\t\t\tif ( d.getObject() instanceof InterestPacket )\n\t\t\t\t\t{\n\t\t\t\t\t\tsendPacket((InterestPacket)(d.getObject()), 0.0) ;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( d.getObject() instanceof DataPacket )\n\t\t\t\t\t{\n\t\t\t\t\t\tDataPacket dataPkt = (DataPacket)(d.getObject()) ;\n\t\t\t\t\t\tsendPacket(dataPkt, 0.0) ;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( d.getObject() instanceof ReinforcementPacket )\n\t\t\t\t\t{\n\t\t\t\t\t\tReinforcementPacket pstvReinforcementPkt = (ReinforcementPacket)(d.getObject()) ;\n\t\t\t\t\t\tsendPacket(pstvReinforcementPkt, 0.0) ;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase DiffTimer.TIMEOUT_REFRESH_INTEREST :\n\t\t\t\t\t\n\t\t\t\t\tInteger I = (Integer)(d.getObject()) ;\n\t\t\t\t\tint taskId = I.intValue() ;\n\t\t\t\t\tTaskEntry taskEntry = activeTasksList.get(taskId) ;\n\t\t\t\t\tInterestPacket interest= taskEntry.getInterest();\n\t\t\t\t\t//if ( (getTime() - taskEntry.getStartTime()) <= interest.getDuration()) /* depends on getTime() - interest start time */\n\t\t\t\t\t//{\n\t\t\t\t\t\tif ( isDebugEnabled() )\n\t\t\t\t\t\t\tSystem.out.println(\"DiffApp \" + nid + \": Sending INTEREST packet at time \" + getTime()) ;\n\t\t\t\t\t\tinterest.setTimestamp(getTime());\n\t\t\t\t\t\tsendPacket(interest, 0.0 ) ;\n\t\t\t\t\t\tDiffTimer refresh_EVT = new DiffTimer(DiffTimer.TIMEOUT_REFRESH_INTEREST, new Integer(taskId)); \n\t\t\t\t\t\trefresh_EVT.handle = setTimeout(refresh_EVT, taskEntry.getRefreshPeriod()) ;\n\t\t\t\t\t/*}\n\t\t\t\t\telse if ( d.handle != null )\n\t\t\t\t\t{\n\t\t\t\t\t\t// The task state has to be purged from the node after the time indicated by the duration attribute. \n\t\t\t\t\t\tactiveTasksList.remove(taskId) ;\n\t\t\t\t\t}*/\n\t\t\t\t\tcancelTimeout(d.handle) ;\n\t\t\t\t\td.setObject(null) ;\n\t\t\t\t\td.handle = null ;\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmicroLearner.timeout(data_) ;\n\t\t} \n\t}", "@Override\r\n public void run() {\n d2++;\r\n if (d2 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP2_EXPIRE});\r\n }\r\n }", "public void checkTimes(){\r\n\t\tcal = Calendar.getInstance();\r\n\t\t//if(alarmList.size() != 0){\r\n\t\tfor(int i = 0; i < alarmList.size(); i++){\r\n\t\t\tAlarmTime current = alarmList.get(i);\r\n\t\t\tif(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() == cal.get(Calendar.MONTH)\r\n\t\t\t\t\t&& current.getDay() == cal.get(Calendar.DAY_OF_MONTH) && current.getHour() == cal.get(Calendar.HOUR_OF_DAY)\r\n\t\t\t\t\t&& current.getMinute() <= cal.get(Calendar.MINUTE)){\r\n\t\t\t\t//display alarm / play sound\r\n\t\t\t\t\t//alarmList.get(i).setActive(true);\r\n\t\t\t\t\tcurrent.setActive(true);\r\n\t\t\t\t//if(!alarmList.get(i).isActive){\t\t\t\t\t//this can be removed if it needs to repeatedly go off\r\n\r\n//\t\t\t\t\tif(!(activeAlarms.contains(alarmList.get(i)))){\r\n//\t\t\t\t\t\tactiveAlarms.add(alarmList.get(i));\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tif(!(activeAlarms.contains(current))){\r\n\t\t\t\t\t\tactiveAlarms.add(current);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(alarmList.get(i).getMinute());\r\n\t\t\t\t\t//System.out.println(current.getMinute());\r\n\t\t\t\t\tring = new AlarmRingDesign(alarmList.get(i).getMessage(), this, alarmList.get(i));\r\n\t\t\t\t\tring.init();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t}\r\n\t//}\r\n\t}", "@Override\r\n public void run() {\n d1++;\r\n if (d1 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP1_EXPIRE});\r\n }\r\n if (d1 == 10) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP1_EXPIRE_N});\r\n }\r\n }", "public void onMonitor(double timestamp, double startTime){\n\t\n\t\tif(timestamp < startTime) {\n\t\t\t//don't start lagging before the start time\n\t\t\t//clear the logs\n\t\t\tlog.clear(); \n\t\t\treturn;\n\t\t}\n\n\t\t//count the number of waiting requests\n\t\tdouble w = 0;\n\t\tfor(Request r: queue){\n\t\t\tif(r.isWaiting()) w++;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Monitor Event at time:\" + timestamp);\n\t\tSystem.out.println(\"---------------------\");\n\t\tdouble[] qAndW = new double[2];\n\t\tqAndW[0] = queue.size();\n\t\tqAndW[1] = w;\n\t\t\n\t\tQandW.add(qAndW);\n\t\t\t\t\n\t}", "@Override\n\tprotected void onHandleIntent(final Intent intent) {\n\t\ttimeFromNow = intent.getExtras().getFloat(\"timeFromNow\");\n\t\tLog.i(\"LocalNotification\", \"scheduleNotification -> timeFromNow: \" + timeFromNow);\n \tTimer t = new Timer(); \n\t\tTimerTask task = new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() { \n\t\t\t\tcreateNotif(intent);\n\t\t\t}\n\t\t};\n\t\tt.schedule(task, (long) (timeFromNow*1000));\n\t}", "@Override\n public void run() {\n time_ = (int) (System.currentTimeMillis() - startTime_) / 1000;\n updateUI();\n\n if (time_ >= maxTime_) {\n // Log.v(VUphone.tag, \"TimerTask.run() entering timeout\");\n handler_.post(new Runnable() {\n public void run() {\n report(true);\n }\n });\n }\n }", "private void renewTimes() {\n String time_morgens_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n String time_mittags_new = time_prefs.getString(\"time_mittags\", getResources().getString(R.string.default_mittags));\n String time_abends_new = time_prefs.getString(\"time_abends\", getResources().getString(R.string.default_abends));\n String time_zur_nacht_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n /*comparison of class local time variblaes with new Preferences\n deletes alarms affected medicines and creates new alarms for them\n */\n\n if (!time_morgens.equals(time_morgens_new)) {\n //list all affected Meds and iterate for each\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n\n if (!time_mittags.equals(time_mittags_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Mittags\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_abends.equals(time_abends_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Abends\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_zur_nacht.equals(time_zur_nacht_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n retrieveValues();\n Resources res = getResources();\n\n if(!swearNegative && !swearNeutral && !swearPositive){\n SwearNotification.notify(this, res.getString(R.string.noTypeSelected) + \"No swears will follow!\", -1);\n return;\n }\n\n negative = res.getStringArray(R.array.negative);\n neutral = res.getStringArray(R.array.neutral);\n positive = res.getStringArray(R.array.positive);\n\n rand = new Random();\n\n swearTimer = new Timer(\"swearTimer\", true);\n swearTimer.schedule(new swearTask(), getDelay());\n// SwearNotification.notify(context,\"minTime:\"+Integer.toString(minTime) + \", maxTime:\"+Integer.toString(maxTime)+\",delay:\"+Long.toString(getDelay()),-1);\n\n }", "@Override\n public void run() {\n\n try {\n LocalDateTime now = LocalDateTime.now();\n voda bot = new voda();\n\n List<Integer> notifyTime = Arrays.asList(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23);\n int currentHour = now.getHour();\n\n ArrayList<Integer> consulted = dbmodel.MysqlCon.getFollowers();\n\n for (Integer ntime : notifyTime) {\n if (ntime == currentHour) {\n for (Integer consultedUser : consulted) {\n bot.sendTextToIdMessage(consultedUser, dbmodel.MysqlCon.getEveryDayWaterUserWaterCountView(consultedUser));\n }\n }\n }\n\n\n } catch (Exception e) {\n System.out.println();\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlong nowTime = System.currentTimeMillis();\n\t\t\t\t\t//Logger.debug(\"测试主动回答线程================================系统时间\" + nowTime);\n\t\t\t\t\tif (nowTime - mIStartTime <= timeNum + 1000 && nowTime - mIStartTime >= timeNum) {\n\t\t\t\t\t\tmICount++;\n\t\t\t\t\t\tcall.OnEnd();\n\t\t\t\t\t\tsetStartTime(nowTime);\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public void startTimeLoop() {\n MyLog.log(\"startTimeLoop::\");\n // handler.sendEmptyMessage(5);\n }", "@Override\n public void run() {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"hh:mm aa\",\n Locale.getDefault());\n String formattedTime = sdf.format(System.currentTimeMillis());\n tvAlarmTime.setText(formattedTime);\n\n tvAlarmTitle.setText(R.string.snoozed_alarm);\n }", "public static void registerReceiver(Context context) {\n\n //Get the milliseconds for next hour\n Calendar calendar = Calendar.getInstance(TimeZone.getDefault());\n calendar.setTimeZone(TimeZone.getTimeZone(\"Asia/Calcutta\"));\n calendar.add(Calendar.HOUR_OF_DAY, 1);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n\n //Prepare the pending intent\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,\n REA_CODE_PENDING_INTENT,\n new Intent(context, TimeReminderReceiver.class),\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Set the alarm\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);\n } else {\n alarmManager.setExact(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);\n }\n\n Log.d(TAG, \"registerReceiver: Next alarm registered.\");\n }", "@Override\n\tprotected void onResume() {\n\t\t super.onResume();\n\t\t registerReceiver(timerec, new IntentFilter(\"in.ac.srmuniv.displaytime\"));\n\t}", "public void handleRecordTime(int type, long time) {\n if (type == 4) {\n this.mFingerDown = time;\n } else if (type == 5) {\n this.mFingerSuccess = time;\n } else if (this.mStartTime != 0) {\n if (type != 0) {\n if (type != 1) {\n if (type != 2) {\n if (type != 3) {\n if (type != 6) {\n if (type != 7) {\n if (type == 8 && this.mKeyExitAnim == 0 && this.mKeyGoingAway > 0) {\n this.mKeyExitAnim = time;\n }\n } else if (this.mKeyGoingAway == 0) {\n this.mKeyGoingAway = time;\n }\n } else if (this.mKeyguardDrawn == 0 && this.mBlockScreenOnBegin > 0) {\n this.mKeyguardDrawn = time;\n }\n } else if (this.mBlockScreenOnEnd == 0 && this.mBlockScreenOnBegin > 0) {\n this.mBlockScreenOnEnd = time;\n }\n } else if (this.mBlockScreenOnBegin == 0) {\n this.mBlockScreenOnBegin = time;\n }\n } else if (this.mSetDisplayStateEnd == 0 && this.mSetDisplayStateBegin > 0) {\n this.mSetDisplayStateEnd = time;\n }\n } else if (this.mSetDisplayStateBegin == 0) {\n this.mSetDisplayStateBegin = time;\n }\n }\n }", "public void processTransmissionTimeout() {\n //to be overridden by extending classes\n }", "public void doWork() {\r\n runOnUiThread(new Runnable() {\r\n @SuppressWarnings(\"deprecation\")\r\n public void run() {\r\n try{\r\n TextView txtCurrentTime= (TextView)findViewById(R.id.time);\r\n Date dt = new Date();\r\n int hours = dt.getHours();\r\n int minutes = dt.getMinutes();\r\n int seconds = dt.getSeconds();\r\n\r\n String time = \"AM\";\r\n String min = Integer.toString(minutes);\r\n String sec =Integer.toString(seconds);\r\n\r\n if (hours > 12) {\r\n hours = hours - 12;\r\n time = \"PM\";\r\n }\r\n if (hours == 12)\r\n {\r\n time = \"PM\";\r\n }\r\n if (minutes < 10){\r\n DecimalFormat formatter = new DecimalFormat(\"00\");\r\n min = formatter.format(minutes);\r\n }\r\n if (seconds < 10){\r\n DecimalFormat formatter = new DecimalFormat(\"00\");\r\n sec = formatter.format(seconds);\r\n }\r\n String curTime = hours + \":\" + min + \":\" + sec;\r\n txtCurrentTime.setText(\"Current Time: \" + curTime + \" \" + time);\r\n\r\n int i=0, x=0;\r\n for (String temp [] : stops){\r\n int size = temp.length;\r\n\r\n Log.i(\"StopsActivity_x\", \"x is: \" + x);\r\n for (i=2; i<size; i++){\r\n\r\n if (temp[i].contains (\"AM\") || temp[i].contains (\"PM\")){\r\n\r\n Log.i(\"StopsActivity_x\", \"temp is: \" + temp[i]);\r\n //Log.i(\"StopsActivity_stops\", temp[i]);\r\n String split[] = temp[i].split(\":\");\r\n int stopTime = Integer.parseInt(split[0]);\r\n\r\n if (split[1].contains(\"PM\") && stopTime != 12) {\r\n stopTime = stopTime + 12;\r\n } else if (split[1].contains(\"AM\") && stopTime == 12)\r\n stopTime = 0;\r\n\r\n //Log.i(\"StopsActivity_test\", \"12-hour time is: \" + split[0] + \" 24 hour time is: \" + stopTime);\r\n\r\n int currHour = hours;\r\n\r\n if (time.contains(\"PM\") && currHour != 12) {\r\n currHour = currHour + 12;\r\n } else if (time.contains(\"AM\") && currHour == 12)\r\n currHour = 0;\r\n\r\n //Log.i(\"StopsActivity_test\", \"12-hour current time is: \" + hours + \" 24 hour current time is: \" + currHour);\r\n\r\n Log.i (\"StopsActivity_x\", \"stopTime is: \" + stopTime + \" and currHour is: \" + currHour);\r\n if (stopTime == currHour) {\r\n\r\n String busSplit[] = split[1].split(\" \");\r\n\r\n int curMin = Integer.parseInt(min);\r\n int busMin = Integer.parseInt(busSplit[0]);\r\n\r\n if (busMin > curMin) {\r\n String des = \"Next Bus at: \" + temp[i];\r\n routeItems.get(x).setRouteDescription(des);\r\n //TextView nextTime = (TextView) view.findViewById(R.id.nextbus);\r\n //nextTime.setText(\"Next Bus at: \" + temp[i]);\r\n break;\r\n }\r\n }\r\n else if (stopTime > currHour) {\r\n\r\n //TextView nextTime = (TextView) view.findViewById(R.id.nextbus);\r\n //nextTime.setText(\"Next Bus at: \" + temp[i]);\r\n String des = \"Next Bus at: \" + temp[i];\r\n routeItems.get(x).setRouteDescription(des);\r\n break;\r\n }\r\n }\r\n }\r\n x++;\r\n }\r\n }\r\n catch (Exception e) {}\r\n }\r\n });\r\n }", "public void timeChanged();", "@Override\n\t\t\tpublic void doTimerCheckWork() {\n\n\t\t\t\tif (CommonUtil.isWifiApEnabled(mWifiManager)) {\n\t\t\t\t\tLog.v(TAG, \"Wifi enabled success!\");\n\t\t\t\t\tIntent intentService = new Intent(mContext,\n\t\t\t\t\t\t\tProcessMsgService.class);\n\t\t\t\t\tmContext.startService(intentService);\n\t\t\t\t\tString action = Constants.ACTION_HOTSPOT_AVAILABLE;\n\t\t\t\t\tIntent intent = new Intent(action);\n\t\t\t\t\tmContext.sendBroadcast(intent);\n\t\t\t\t\tthis.exit();\n\t\t\t\t} else {\n\t\t\t\t\tString action = Constants.ACTION_HOTSPOT_UNAVAILABLE;\n\t\t\t\t\tIntent intent = new Intent(action);\n\t\t\t\t\tmContext.sendBroadcast(intent);\n\t\t\t\t\tLog.v(TAG, \"Wifi enabled failed!\");\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void onReceive(final Context context, Intent intent) {\n\t\tLog.i(\"msg\", \"new message\");\n\t\tif (Constants.MoShi==3) {\n\t\t\tnew Thread(){\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsleep(3000);\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\tSmsDao smsdao = new SmsDao(context);\n\t\t\t\t\tMap<String, String> data = smsdao.getSmsData();\n\t\t\t\t\t\n\t\t\t\t\tIntent itent = new Intent(Constants.ACTION_RING);\n\t\t\t\t\tif (data != null) {\n\t\t\t\t\t\titent.putExtra(\"data\", Constants.SMSINFO);\n\t\t\t\t\t\titent.putExtra(\"person\", data.get(\"person\"));\n\t\t\t\t\t\titent.putExtra(\"body\", data.get(\"body\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tcontext.sendBroadcast(itent);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t}.start();\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n\n boolean isAlarmOn = Utils.isAlarmOn();\n PollService.setServiceAlarm(MyApplication.getContext(), isAlarmOn);\n }", "public void buffTimer() {\r\n if (seconds - lastBuffCheck >= 1) {\r\n lastBuffCheck = seconds;\r\n for (int i = 0; i < buffs.size(); i++) {\r\n buffs.set(i, buffs.get(i)-1);\r\n if (buffs.get(i) <= 0) {\r\n buffs.remove(i);\r\n }\r\n }\r\n } else if (seconds < lastBuffCheck) {\r\n lastBuffCheck = 0;\r\n }\r\n }", "private int micRecTime(long freeSpace) {\n\n return (int) (freeSpace / 5898240);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n mContext = context;\n systems = new Systems(context);\n mCalendar = new GregorianCalendar();\n mManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n\n // Check Connected Network\n if(systems.isNetworkAvailable(context))\n {\n try {\n if(!systems.getFarDay(0).equals(systems.getString(\"WheatherAlarmDate\", \"null\"))) {\n // Get Local Weather : Reh\n LocalWeather localWeather = new LocalWeather(context);\n String Reh = localWeather.execute().get();\n\n // Check Reh Value is Valid?\n if (Reh != null) {\n // get Preference Setting Value\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n boolean vibrate = prefs.getBoolean(\"Setting_Vibrate\", true);\n boolean sound = prefs.getBoolean(\"Setting_Sound\", true);\n\n // Set Auto WaterGoal\n if (prefs.getBoolean(\"Setting_AutoGoal\", true)) {\n int recommandAmount = systems.getInt(\"userWeight\", 60) * 30 + (500 - Integer.parseInt(Reh) * 3);\n systems.putString(\"WaterGoal\", String.valueOf(recommandAmount));\n\n // Send Notification\n if (prefs.getBoolean(\"Setting_AutoGoalPush\", true))\n systems.sendNotification(\"물 한잔 해요\", \"오늘의 습도 : \" + Reh + \"%, 목표 섭취량 : \" + recommandAmount + \"ml\", 1, vibrate, sound);\n }\n\n // Save Reh Data\n systems.putString(\"Reh\", Reh);\n\n // Cancel this Alarm\n mManager.cancel(pendingIntent(requestC));\n\n // Set Next Alarm\n mCalendar.set(mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH), 7, 0);\n mCalendar.add(Calendar.DATE, 1);\n mManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, mCalendar.getTimeInMillis(), 1200 * 1000, pendingIntent(requestC));\n\n // Set Preference\n systems.putString(\"WheatherAlarmDate\", systems.getFarDay(0));\n }\n }\n }\n catch (Exception e){\n // Network Error\n }\n }\n }", "@Override\n public void run() {\n if (timerValidFlag)\n gSeconds++;\n Message message = new Message();\n message.what = 1;\n handler.sendMessage(message);\n }", "@Override\r\n public void run() {\n d5++;\r\n if (d5 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP5_EXPIRE});\r\n }\r\n\r\n }", "public void timeToCheckWorker() {\n notifyCanMove(this.getCurrentTurn().getCurrentPlayer());\n }", "private void handleCallKill() {\n Trace.traceBegin(8, \"bufferLowToKill\");\n long curTime = System.currentTimeMillis();\n long j = lastCallKillTime;\n if (curTime < j || curTime - j >= 1000) {\n lastCallKillTime = curTime;\n Slog.i(TAG, \"buffer low too long, zswapd keep fail, call kill\");\n KillDecision.getInstance().killApplicationWithZswapdPresure(false);\n Trace.traceEnd(8);\n return;\n }\n Slog.i(TAG, \"buffer low too long, kill too frequently\" + lastCallKillTime + AwarenessInnerConstants.DASH_KEY + curTime);\n Trace.traceEnd(8);\n }", "public Date getReceiveTime() {\r\n return receiveTime;\r\n }", "@Override\n public void onTimePicked() {\n }", "public Date getReceiveTime() {\n return receiveTime;\n }", "protected void onDestroy(){\n super.onDestroy();\n LocalBroadcastManager.getInstance(this).unregisterReceiver(timeReceiver);\n }", "private void setupMsgBroadcastReceiver() {\n broadcastReceiverLoraMsg = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.MSG_RECEIVED\".equals(intent.getAction())) {\n byte[] bytes = intent.getByteArrayExtra(\"com.example.loravisual.MSG\");\n\n String totalNumber = Integer.toString(bytes[11] + (bytes[10] * multipliers[5])); // + correct total message number calculated from two ble transmitted bytes (#msg number in iteration = [11], (#iteration = [10])\n String msg = new String(bytes).substring(0, 10); // msg = header (ble transmitted from board as string\n\n if (colorToggle) {\n msgTextView.setTextColor(getResources().getColor(R.color.colorPrimaryDark, null));\n } else {\n msgTextView.setTextColor(getResources().getColor(R.color.white, null));\n }\n colorToggle = !colorToggle;\n msgTextView.setText(msg + \" (\" + totalNumber + \")\");\n\n if (dbEntries == null) {\n dbEntries = new String[5];\n dbEntries[0] = totalNumber;\n dbEntries[1] = msg;\n } else {\n dbEntries[0] = totalNumber;\n dbEntries[1] = msg;\n databaseHandler.logReceivedTransmission(Integer.toString(experimentNumber), dbEntries);\n dbEntries = null;\n }\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.MSG_RECEIVED\");\n registerReceiver(broadcastReceiverLoraMsg, filter);\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tVibrator v = (Vibrator) context\r\n\t\t\t\t.getSystemService(Context.VIBRATOR_SERVICE);\r\n\t\tv.vibrate(500);\r\n\r\n\t\t// also display a toast.\r\n\t\tToast.makeText(context, \"Boradcast received successfully\",\r\n\t\t\t\tToast.LENGTH_LONG).show();\r\n\t}", "public void run() {\n\t\t\tCalendar c = new GregorianCalendar();\n\t\t\tcurrHour = c.get(Calendar.HOUR);\n\t\t\tcurrMin = String.valueOf(c.get(Calendar.MINUTE));\n\t\t\tif(currMin.length()==1) {\n\t\t\t\tcurrMin = \"0\"+currMin;\n\t\t\t}\n\t\t\tcheckAlarm();\n\t\t}", "@Override\n\t\tpublic void onReceive(Context arg0, Intent intent) {\n\t\t\tif(intent.getAction().equals(Constants.P2P.ACK_GET_SD_CARD_CAPACITY)){\n\t\t\t\tint result = intent.getIntExtra(\"result\", -1);\n\t\t\t\tif(result==Constants.P2P_SET.ACK_RESULT.ACK_PWD_ERROR){\n\t\t\t\t\t\n\t\t\t\t\tIntent i = new Intent();\n\t\t\t\t\ti.setAction(Constants.Action.CONTROL_SETTING_PWD_ERROR);\n\t\t\t\t\tmContext.sendBroadcast(i);\n\t\t\t\t\t\n\t\t\t\t}else if(result==Constants.P2P_SET.ACK_RESULT.ACK_NET_ERROR){\n\t\t\t\t\tLog.e(\"my\",\"net error resend:get npc time\");\n\t\t\t\t\tP2PHandler.getInstance().getSdCardCapacity(contact.contactId, contact.contactPassword,command);\n\t\t\t\t}\n\t\t\t}else if(intent.getAction().equals(Constants.P2P.RET_GET_SD_CARD_CAPACITY)){\n\t\t\t\tint total_capacity=intent.getIntExtra(\"total_capacity\",-1);\n\t\t\t\tint remain_capacity=intent.getIntExtra(\"remain_capacity\",-1);\n\t\t\t\tint state=intent.getIntExtra(\"state\",-1);\n\t\t\t\tSDcardId=intent.getIntExtra(\"SDcardID\",-1);\n\t\t\t\tString id=Integer.toBinaryString(SDcardId);\n\t\t\t\tLog.e(\"id\",\"msga\"+id);\n\t\t\t\twhile(id.length()<8){\n\t\t\t\t\tid=\"0\"+id;\n\t\t\t\t}\n\t\t\t\tchar index=id.charAt(3);\n\t\t\t\tLog.e(\"id\",\"msgb\"+id);\n\t\t\t\tLog.e(\"id\",\"msgc\"+index);\n\t\t\t\tif(state==1){\n\t\t\t\t\tif(index=='1'){\n\t\t\t\t\t\tsdId=SDcardId;\n\t\t\t\t\t\ttv_total_capacity.setText(String.valueOf(total_capacity)+\"M\");\n\t\t\t\t\t\ttv_sd_remainning_capacity.setText(String.valueOf(remain_capacity)+\"M\");\n\t\t\t\t\t\tshowSDImg();\n\t\t\t\t\t}else if(index=='0'){\n\t\t\t\t\t\tusbId=SDcardId;\n\t\t\t\t\t tv_usb_total_capacity.setText(String.valueOf(total_capacity)+\"M\");\n\t\t\t\t\t\ttv_usb_remainning_capacity.setText(String.valueOf(remain_capacity)+\"M\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n//\t\t\t\t\t count++;\n//\t\t\t\t\t if(contact.contactType==P2PValue.DeviceType.IPC){\n//\t\t\t\t\t \tif(count==1){\n//\t\t\t\t\t \t\tIntent back = new Intent();\n//\t\t\t\t\t\t\t\tback.setAction(Constants.Action.REPLACE_MAIN_CONTROL);\n//\t\t\t\t\t\t\t\tmContext.sendBroadcast(back);\n//\t\t\t\t\t\t\t\tT.showShort(mContext,R.string.sd_no_exist);\n//\t\t\t\t\t \t}\n//\t\t\t\t\t }else{\n//\t\t\t\t\t \tif(count==2){\n//\t\t\t\t\t \t\tIntent back = new Intent();\n//\t\t\t\t\t\t\t\tback.setAction(Constants.Action.REPLACE_MAIN_CONTROL);\n//\t\t\t\t\t\t\t\tmContext.sendBroadcast(back);\n//\t\t\t\t\t\t\t\tT.showShort(mContext,R.string.sd_no_exist);\n//\t\t\t\t\t \t}\n//\t\t\t\t\t }\n\t\t\t\t\tIntent back = new Intent();\n\t\t\t\t\tback.setAction(Constants.Action.REPLACE_MAIN_CONTROL);\n\t\t\t\t\tmContext.sendBroadcast(back);\n\t\t\t\t\tT.showShort(mContext,R.string.sd_no_exist);\n\t\t\t }\n\t\t\t}else if(intent.getAction().equals(Constants.P2P.ACK_GET_SD_CARD_FORMAT)){\n\t\t\t\tint result = intent.getIntExtra(\"result\", -1);\n\t\t\t\tif(result==Constants.P2P_SET.ACK_RESULT.ACK_PWD_ERROR){\n\t\t\t\t\t\n\t\t\t\t\tIntent i = new Intent();\n\t\t\t\t\ti.setAction(Constants.Action.CONTROL_SETTING_PWD_ERROR);\n\t\t\t\t\tmContext.sendBroadcast(i);\n\t\t\t\t\t\n\t\t\t\t}else if(result==Constants.P2P_SET.ACK_RESULT.ACK_NET_ERROR){\n\t\t\t\t\tLog.e(\"my\",\"net error resend:get npc time\");\n\t\t\t\t\tP2PHandler.getInstance().setSdFormat(contact.contactId, contact.contactPassword, sdId);\n\t\t\t\t}\n\t\t\t}else if(intent.getAction().equals(Constants.P2P.RET_GET_SD_CARD_FORMAT)){\n\t\t\t\tint result=intent.getIntExtra(\"result\", -1);\n\t\t\t if(result==Constants.P2P_SET.SD_FORMAT.SD_CARD_SUCCESS){\n\t\t\t \tT.showShort(mContext, R.string.sd_format_success);\n\t\t\t }else if(result==Constants.P2P_SET.SD_FORMAT.SD_CARD_FAIL){\n\t\t\t \tT.showShort(mContext, R.string.sd_format_fail);\n\t\t\t }else if(result==Constants.P2P_SET.SD_FORMAT.SD_NO_EXIST){\n\t\t\t \tT.showShort(mContext,R.string.sd_no_exist);\n\t\t\t }\n\t\t\t showSDImg();\n\t\t\t}else if(intent.getAction().equals(Constants.P2P.RET_GET_USB_CAPACITY)){\n\t\t\t\tint total_capacity=intent.getIntExtra(\"total_capacity\",-1);\n\t\t\t\tint remain_capacity=intent.getIntExtra(\"remain_capacity\",-1);\n\t\t\t\tint state=intent.getIntExtra(\"state\",-1);\n\t\t\t\tSDcardId=intent.getIntExtra(\"SDcardID\",-1);\n\t\t\t\tString id=Integer.toBinaryString(SDcardId);\n\t\t\t\tLog.e(\"id\",\"msga\"+id);\n\t\t\t\twhile(id.length()<8){\n\t\t\t\t\tid=\"0\"+id;\n\t\t\t\t}\n\t\t\t\tchar index=id.charAt(3);\n\t\t\t\tLog.e(\"id\",\"msgb\"+id);\n\t\t\t\tLog.e(\"id\",\"msgc\"+index);\n\t\t\t\tif(state==1){\n\t\t\t\t\tif(index=='1'){\n\t\t\t\t\t\tsdId=SDcardId;\n\t\t\t\t\t\ttv_total_capacity.setText(String.valueOf(total_capacity)+\"M\");\n\t\t\t\t\t\ttv_sd_remainning_capacity.setText(String.valueOf(remain_capacity)+\"M\");\n\t\t\t\t\t\tshowSDImg();\n\t\t\t\t\t}else if(index=='0'){\n\t\t\t\t\t\tusbId=SDcardId;\n\t\t\t\t\t tv_usb_total_capacity.setText(String.valueOf(total_capacity)+\"M\");\n\t\t\t\t\t\ttv_usb_remainning_capacity.setText(String.valueOf(remain_capacity)+\"M\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t count++;\n\t\t\t\t\t if(contact.contactType==P2PValue.DeviceType.IPC){\n\t\t\t\t\t \tif(count==1){\n\t\t\t\t\t \t\tIntent back = new Intent();\n\t\t\t\t\t\t\t\tback.setAction(Constants.Action.REPLACE_MAIN_CONTROL);\n\t\t\t\t\t\t\t\tmContext.sendBroadcast(back);\n\t\t\t\t\t\t\t\tT.showShort(mContext,R.string.sd_no_exist);\n\t\t\t\t\t \t}\n\t\t\t\t\t }else{\n\t\t\t\t\t \tif(count==2){\n\t\t\t\t\t \t\tIntent back = new Intent();\n\t\t\t\t\t\t\t\tback.setAction(Constants.Action.REPLACE_MAIN_CONTROL);\n\t\t\t\t\t\t\t\tmContext.sendBroadcast(back);\n\t\t\t\t\t\t\t\tT.showShort(mContext,R.string.sd_no_exist);\n\t\t\t\t\t \t}\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t}else if(intent.getAction().equals(Constants.P2P.RET_DEVICE_NOT_SUPPORT)){\n\t\t\t\tIntent back = new Intent();\n\t\t\t\tback.setAction(Constants.Action.REPLACE_MAIN_CONTROL);\n\t\t\t\tmContext.sendBroadcast(back);\n\t\t\t\tT.showShort(mContext,R.string.not_support);\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\tString message;\n\t\t//check if facebook object exists? if not recreate it\n\t\t\n\t\tcheckFacebookExists(arg0);\n\t\t\n\t\t\t\t//count for friend to reach 30 ie check every 30 minutes for new friend joining\n\t\tcountForFriend++;\n\t\t\n\t\t\n\t\t//notification preference to store data related to notification , stores if birthdays are given\n\t\t\n\t\tdoBirthdayNotificationPreProcessing(arg0);\n\t\t\n\n\t\tif (isInternetAvailable(arg0)) {\n\t\t\n\t\t\t\tif (BIRTHDAYGIFTNOTGIVEN) {\n\t\t\t\t\tdoBirthdayNotification(arg0);\n\n\t\t\t\t}\n\t\t\t\n\n\t\t\tif (countForFriend == DURATIONFORFRIENDCHECK) {\n\t\t\t\tfriendNotification(arg0);\n\t\t\t}\n\t\t\t/*\n\t\t\t * if (countForEvent == DURATIONFOREVENTCHECK) {\n\t\t\t * \n\t\t\t * message = runCommand(arg0, EVENT); if\n\t\t\t * (!(message.equalsIgnoreCase(lastEventMessage))) { if\n\t\t\t * (!message.equalsIgnoreCase(EMPTYSTRING)) { lastEventMessage =\n\t\t\t * message; String sendmessage = message + BIRTHDAY;\n\t\t\t * \n\t\t\t * \n\t\t\t * makeNotifications(sendmessage, arg0);\n\t\t\t * \n\t\t\t * } } }\n\t\t\t */\n\t\t\tif (countForFriend != 0) {\n\t\t\t\tgiftNotification(arg0);\n\t\t\t}\n\t\t}\n\t}", "public void passTime(){\n growPop();\n growGdp();\n growSocial();\n growLiving();\n }", "void updateNextUnblockTime(int t);", "private void onPingingTimerTick()\r\n {\r\n EneterTrace aTrace = EneterTrace.entering();\r\n try\r\n {\r\n try\r\n {\r\n myConnectionManipulatorLock.lock();\r\n try\r\n {\r\n // Send the ping message.\r\n myUnderlyingOutputChannel.sendMessage(myPreserializedPingMessage);\r\n\r\n // Schedule the next ping.\r\n myPingingTimer.change(myPingFrequency);\r\n }\r\n finally\r\n {\r\n myConnectionManipulatorLock.unlock();\r\n }\r\n }\r\n catch (Exception err)\r\n {\r\n // The sending of the ping message failed - the connection is broken.\r\n cleanAfterConnection(true, true);\r\n }\r\n }\r\n finally\r\n {\r\n EneterTrace.leaving(aTrace);\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile(isrun&&handler!=null){\n\t\t\ttry {\n\t\t\t\tMessage msg=handler.obtainMessage(timeupdate, new Date());\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.65481013", "0.6227563", "0.6119886", "0.609919", "0.60719305", "0.6054735", "0.60473776", "0.60331017", "0.5990248", "0.5901309", "0.5870208", "0.5855878", "0.58536947", "0.58456266", "0.58456266", "0.58456266", "0.58456266", "0.58456266", "0.5836348", "0.58306164", "0.579858", "0.57740307", "0.5736439", "0.5716583", "0.5715945", "0.5672954", "0.56683254", "0.5663367", "0.5648009", "0.5647514", "0.5623811", "0.5581557", "0.55741644", "0.5568206", "0.55652016", "0.5561338", "0.555944", "0.55592877", "0.5548677", "0.55466914", "0.55375975", "0.55290747", "0.5527609", "0.5527301", "0.552507", "0.55137265", "0.551213", "0.5501205", "0.5487549", "0.54829854", "0.54800326", "0.5476598", "0.5456601", "0.54516906", "0.5442713", "0.5434397", "0.5433406", "0.5410124", "0.5407303", "0.5398759", "0.5392638", "0.5390132", "0.5389827", "0.5376094", "0.53728414", "0.53639776", "0.5361145", "0.5346964", "0.5331197", "0.532535", "0.5320706", "0.5319796", "0.531897", "0.5311012", "0.53100544", "0.53002095", "0.52991897", "0.52928776", "0.5287858", "0.5256621", "0.5254444", "0.525313", "0.52440786", "0.5239436", "0.52373433", "0.5233284", "0.5227864", "0.5212965", "0.52117336", "0.5208409", "0.52079016", "0.5207461", "0.52047324", "0.5198508", "0.5194025", "0.51922256", "0.5189738", "0.5187644", "0.51734406", "0.5164817", "0.5162631" ]
0.0
-1
Create and show a simple notification containing the received FCM message.
private void sendNotification(String messageBody) { Log.d(TAG, messageBody); NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel("default", "oqatt", NotificationManager.IMPORTANCE_DEFAULT); channel.setDescription("oqatt_updates"); channel.setImportance(IMPORTANCE_HIGH); assert mNotificationManager != null; mNotificationManager.createNotificationChannel(channel); } Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext(), "default") .setSmallIcon(R.mipmap.oqatt_logo) // notification icon .setContentTitle(messageBody) // title for notification .setSound(defaultSoundUri) // sound notification .setAutoCancel(true); // clear notification after click Intent intent = new Intent(getApplicationContext(), MainActivity.class); PendingIntent pi = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); mBuilder.setContentIntent(pi); assert mNotificationManager != null; mNotificationManager.notify(0, mBuilder.build()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n\n if (remoteMessage.getData().size() > 0) {\n Log.d(\"Remote message\", String.valueOf(remoteMessage.getData()));\n }\n String title = Objects.requireNonNull(remoteMessage.getNotification()).getTitle();\n\n Intent intent = new Intent(this, MainActivity.class);\n PendingIntent pIntent = PendingIntent.getActivity(this, (int) System.currentTimeMillis(), intent, 0);\n\n Notification n = new Notification.Builder(this)\n .setContentTitle(title)\n .setContentIntent(pIntent)\n .setSmallIcon(R.mipmap.ic_launcher_round)\n .build();\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n assert notificationManager != null;\n notificationManager.notify(0, n);\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getNotification().getBody());\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this);\n mBuilder.setSmallIcon(R.drawable.logo);\n mBuilder.setContentTitle(remoteMessage.getNotification().getTitle());\n mBuilder.setContentText(remoteMessage.getNotification().getBody());\n\n NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n // notificationID allows you to update the notification later on.\n mNotificationManager.notify(14, mBuilder.build());\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n\n if (/* Check if data needs to be processed by long running job */ true) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow(remoteMessage);\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n\n // sendNotification(remoteMessage); //not trusted : // TODO: 07/11/2017 redo #later\n //todo https://developer.android.com/guide/topics/ui/notifiers/notifications.html\n //todo https://github.com/firebase/quickstart-android/tree/master/messaging/app/src/main/java/com/google/firebase/quickstart/fcm\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n if (remoteMessage.getNotification() != null) {\n showNotification(remoteMessage); // Create a notification!\n }\n\n if (remoteMessage.getData() != null) {\n showToastMessage(remoteMessage.getData().get(\"title\")); // Show a toast!\n }\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // ...\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n sendCustomNotification(remoteMessage);\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // TODO(developer): Handle FCM messages here.\n // If the application is in the foreground handle both data and notification messages here.\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n //Log.e(TAG, \"From: \" + remoteMessage.getFrom());\n //Log.e(TAG, \"Notification Message Body: \" + remoteMessage.getNotification().getBody());\n MyPreferenceManager prefs = MyApplication.getInstance().getPrefManager();\n if(prefs.getNotificationsEnabled()) // If notifications are enabled, send it\n sendNotification(remoteMessage);\n\n }", "private void generateNotification(Context context, String m) {\n message = m;\n handler.post(new Runnable() {\n public void run() {\n Context context = GCMIntentService.this;\n int icon = getResources().getIdentifier(\"ic_launcher\", \"drawable\", context.getPackageName());//R.drawable.ic_launcher;\n long when = System.currentTimeMillis();\n NotificationManager notificationManager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n Notification notification = new Notification(icon, message, when);\n \n Intent notificationIntent = new Intent(GCMIntentService.this, UnityPlayerActivity.class);\n // set intent so it does not start a new activity\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |\n Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent intent =\n PendingIntent.getActivity(context, 0, notificationIntent, 0);\n notification.setLatestEventInfo(context, NOTIFICATION_TITLE, message, intent);\n \n // Flags\n notification.flags |= Notification.FLAG_AUTO_CANCEL;\n //notification.defaults |= Notification.DEFAULT_SOUND;\n //notification.defaults |= Notification.DEFAULT_VIBRATE; // uncomment and add VIBRATE permissions on manifest to get vibrating notifications\n notificationManager.notify(0, notification);\n }\n });\n \n }", "public void showNotification(String title,\n String message) {\n Intent intent = new Intent(this, MainActivity.class);\n String channel_id = getString(R.string.channel_id);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent\n = PendingIntent.getActivity(\n this, 0, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n NotificationCompat.Builder builder\n = new NotificationCompat\n .Builder(getApplicationContext(),\n channel_id)\n .setSmallIcon(R.drawable.ic_launcher_foreground)\n .setAutoCancel(true)\n .setVibrate(new long[]{1000, 1000, 1000,\n 1000, 1000})\n .setOnlyAlertOnce(true)\n .setContentIntent(pendingIntent);\n\n if (Build.VERSION.SDK_INT\n >= Build.VERSION_CODES.JELLY_BEAN) {\n builder = builder.setContent(\n getCustomDesign(title, message));\n }\n else {\n builder = builder.setContentTitle(title)\n .setContentText(message)\n .setSmallIcon(R.drawable.ic_launcher_foreground);\n }\n\n NotificationManager notificationManager\n = (NotificationManager) getSystemService(\n Context.NOTIFICATION_SERVICE);\n if (Build.VERSION.SDK_INT\n >= Build.VERSION_CODES.O) {\n NotificationChannel notificationChannel\n = new NotificationChannel(\n channel_id, getString(R.string.channel_name),\n NotificationManager.IMPORTANCE_HIGH);\n notificationManager.createNotificationChannel(\n notificationChannel);\n }\n\n notificationManager.notify(0, builder.build());\n }", "private void sendNotification(String msg) {\n mNotificationManager = (NotificationManager) getApplicationContext()\n .getSystemService(Context.NOTIFICATION_SERVICE);\n\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, MainActivity.class),\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(\n this).setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"GCM Notification\")\n .setStyle(new NotificationCompat.BigTextStyle().bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n\n }", "private void displayNotificationMessage(String message)\n\t{\n\n\t\tString CHANNEL_ID = \"my_channel_01\";\n\t\tint NOTIFICATION_ID = 0;\n\n\t\tif (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n\t\t\tCharSequence name = \"my_channel\";\n\t\t\tString Description = \"This is my channel\";\n\t\t\tint importance = NotificationManager.IMPORTANCE_HIGH;\n\t\t\tNotificationChannel mChannel = new NotificationChannel(CHANNEL_ID, name, importance);\n\t\t\tmChannel.setDescription(Description);\n\t\t\tmChannel.enableLights(true);\n\t\t\tmChannel.setLightColor(Color.RED);\n\t\t\tmChannel.enableVibration(true);\n\t\t\tmChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});\n\t\t\tmChannel.setShowBadge(false);\n\t\t\tnotificationManager.createNotificationChannel(mChannel);\n\t\t}\n\n\t\tNotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)\n\t\t\t\t.setSmallIcon(R.drawable.image2)\n\t\t\t\t.setContentTitle(\"Ting skjer!!!\")\n\t\t\t\t.setContentText(message);\n\n\t\tIntent resultIntent = new Intent(this, MyActivity.class);\n\t\tTaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n\t\t//stackBuilder.addParentStack(MainActivity.class);\n\t\tstackBuilder.addNextIntent(resultIntent);\n\t\tPendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\t\tbuilder.setContentIntent(resultPendingIntent);\n\n\t\tnotificationManager.notify(NOTIFICATION_ID, builder.build());\n\t}", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n String message = remoteMessage.getData().get(\"message\");\n String titleMessage = remoteMessage.getData().get(\"title\");\n\n //Calling method to generate notification\n sendNotification(message, titleMessage);\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From:::: \" + remoteMessage.getFrom());\n\n\n //Handle notifications with data payload for your app\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload::: \" + remoteMessage.getData());\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body:::: \" + remoteMessage.getNotification().getBody());\n }\n\n Log.e(\"Msg\", remoteMessage.getData().size()+\"\");\n //sendNotification(remoteMessage.getData());\n\n try {\n sendNotification(remoteMessage.getData());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\n\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }", "public static void displayMessage(Context context, String message) {\r\n Intent intent = new Intent(AppConstants.DISPLAY_MESSAGE_ACTION);\r\n intent.putExtra(AppConstants.EXTRA_NOTIFICATION_MESSAGE, message);\r\n context.sendBroadcast(intent);\r\n }", "private void sendMessageToNews(){\r\n JSONObject jPayload = new JSONObject();\r\n JSONObject jNotification = new JSONObject();\r\n try {\r\n jNotification.put(\"message\", \"Leaderboard Activity\");\r\n jNotification.put(\"body\", \"New high score!\");\r\n jNotification.put(\"sound\", \"default\");\r\n jNotification.put(\"badge\", \"1\");\r\n jNotification.put(\"click_action\", \"OPEN_ACTIVITY_1\");\r\n\r\n // Populate the Payload object.\r\n // Note that \"to\" is a topic, not a token representing an app instance\r\n jPayload.put(\"to\", \"/topics/high_score\");\r\n jPayload.put(\"priority\", \"high\");\r\n jPayload.put(\"notification\", jNotification);\r\n\r\n // Open the HTTP connection and send the payload\r\n URL url = new URL(\"https://fcm.googleapis.com/fcm/send\");\r\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n conn.setRequestMethod(\"POST\");\r\n conn.setRequestProperty(\"Authorization\", SERVER_KEY);\r\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\r\n conn.setDoOutput(true);\r\n\r\n // Send FCM message content.\r\n OutputStream outputStream = conn.getOutputStream();\r\n outputStream.write(jPayload.toString().getBytes());\r\n outputStream.close();\r\n\r\n // Read FCM response.\r\n InputStream inputStream = conn.getInputStream();\r\n final String resp = convertStreamToString(inputStream);\r\n\r\n Handler h = new Handler(Looper.getMainLooper());\r\n h.post(new Runnable() {\r\n @Override\r\n public void run() {\r\n Log.e(TAG, \"run: \" + resp);\r\n Toast.makeText(getActivity(),resp,Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n } catch (JSONException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void sendNotification(String message) {\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_check_circle_black_24dp)\n .setContentTitle(\"Welcome Aboard\")\n .setContentText(message)\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n }", "private void sendNotification(PanicIncidentDTO simpleMessage) {\n// Intent intent = new Intent(this, SimpleMessagingActivity.class);\n// intent.putExtra(\"simpleMessage\",simpleMessage);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this,\n// LOCATION_REQUEST_CODE, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_favorite)\n .setContentTitle(\"Message received\")\n .setContentText(simpleMessage.getPanicType().getName())\n .setAutoCancel(true)\n .setSound(defaultSoundUri);\n// .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n }", "private void sendNotification(final String msg) {\n mNotificationManager = (NotificationManager)\n GcmIntentService.this.getSystemService(Context.NOTIFICATION_SERVICE);\n PendingIntent contentIntent = PendingIntent.getActivity(GcmIntentService.this, 0,\n new Intent(GcmIntentService.this, MainActivity.class), 0);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(GcmIntentService.this)\n .setSmallIcon(R.drawable.pplogo)\n .setAutoCancel(true)\n .setContentTitle(\"PawPads\")\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n }", "public void showNotification(String msg) {\n Notification.show(msg);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(NotificationConfig.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notification\n FirebaseMessaging.getInstance().subscribeToTopic(NotificationConfig.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(NotificationConfig.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n //Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getData());\n\n long[] pattern = {500,500,500,500,500};\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n if (remoteMessage.getData() != null) {\n\n Intent intent;\n intent = new Intent(this, MainActivity.class);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* request code */, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n //NotificationManager notificationManager = new NotificationUtils(this).getManager();\n Notification notification = new Notification();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notification = new NotificationCompat.Builder(this)\n .setDefaults(Notification.DEFAULT_ALL)\n .setContentTitle(remoteMessage.getData().get(\"title\"))\n .setContentText(remoteMessage.getData().get(\"body\"))\n .setChannelId(\"com.example.fakenews.ANDROID\")\n .setSmallIcon(com.google.firebase.R.drawable.notify_panel_notification_icon_bg)\n .setAutoCancel(true)\n .setVibrate(pattern)\n .setLights(Color.BLUE, 1, 1)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent)\n .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)\n .build();\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n //Log.d(TAG, String.valueOf(notificationManager.getImportance()));\n\n //Log.d(TAG, \"notificacion: \" + notificationManager.getActiveNotifications().toString());\n }\n }\n\n NotificationManagerCompat manager = NotificationManagerCompat.from(getApplicationContext());\n manager.notify(new Random().nextInt(), notification);\n //manager.notify(0, notification);\n\n Log.d(TAG,notification.toString());\n Log.d(TAG, String.valueOf(manager.areNotificationsEnabled()));\n Log.d(TAG, String.valueOf(manager.getImportance()));\n\n\n\n }\n }", "private void sendNotification(String msg) {\n mNotificationManager = (NotificationManager)\n ctx.getSystemService(Context.NOTIFICATION_SERVICE);\n\n PendingIntent contentIntent = PendingIntent.getActivity(ctx, 0,\n new Intent(ctx, LLActivity.class), 0);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(ctx)\n .setSmallIcon(R.drawable.ic_stat_gcm)\n .setContentTitle(\"GCM Notification\")\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n txtMessage.setText(message);\n }\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n\n if (/* Check if data needs to be processed by long running job */ true) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow();\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n //Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n// processData(remoteMessage);\n //sendNotification(remoteMessage.getNotification().getBody());\n //Toast.makeText(this, remoteMessage.getNotification().getBody(),Toast.LENGTH_SHORT).show();\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }", "private void sendNotification(RemoteMessage remoteMessage) {\n\n Intent intent = selectIntent(remoteMessage);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(\n this\n , MyFirebaseMessagingServiceRequestCode /* Request code */\n , intent,\n PendingIntent.FLAG_ONE_SHOT\n );\n\n String channelId = getString(R.string.default_notification_channel_id);\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(this, channelId)\n .setSmallIcon(R.drawable.ic_person_24dp) //// TODO: 07/11/2017 app icon\n .setContentTitle(remoteMessage.getNotification().getTitle())\n .setContentText(remoteMessage.getNotification().getBody())\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(getNotificationID()/* ID of notification */, notificationBuilder.build());\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }", "private void showNotification() {\n\t\t\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0, \n\t\t\t\t\t\tnew Intent(this, MainActivity.class), 0);\n\t\t\t\t\n\t\t// Use NotificationCompat.Builder to build the notification, display using mNM\n\t\tNotificationCompat.Builder mNotifyBuilder= new NotificationCompat.Builder(this)\n\t\t\t.setContentTitle(getText(R.string.notificationTitle))\n\t\t\t.setContentText(getText(R.string.notificationText))\n\t\t\t.setSmallIcon(R.drawable.ic_launcher)\n\t\t\t.setContentIntent(contentIntent);\n\t\t\n\t\tmNM.notify(notifyID, mNotifyBuilder.build());\n\t}", "public void showNotification(String title,\n String message) {\n\n Intent intent\n = new Intent(this, HomeActivity.class);\n\n String channel_id = \"CCULife\";\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent\n = PendingIntent.getActivity(\n this, 0, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n // Create a Builder object using NotificationCompat\n // class. This will allow control over all the flags\n NotificationCompat.Builder builder\n = new NotificationCompat\n .Builder(getApplicationContext(),\n channel_id)\n .setSmallIcon(R.drawable.sicon)\n .setAutoCancel(true)\n .setVibrate(new long[]{1000, 1000, 1000,\n 1000, 1000})\n .setOnlyAlertOnce(true)\n .setContentIntent(pendingIntent);\n\n // A customized design for the notification can be\n // set only for Android versions 4.1 and above. Thus\n // condition for the same is checked here.\n if (Build.VERSION.SDK_INT\n >= Build.VERSION_CODES.JELLY_BEAN) {\n builder = builder.setContent(\n getCustomDesign(title, message));\n } // If Android Version is lower than Jelly Beans,\n // customized layout cannot be used and thus the\n // layout is set as follows\n else {\n builder = builder.setContentTitle(title)\n .setContentText(message)\n .setSmallIcon(getNotificationIcon());\n }\n // Create an object of NotificationManager class to\n // notify the\n // user of events that happen in the background.\n NotificationManager notificationManager\n = (NotificationManager) getSystemService(\n Context.NOTIFICATION_SERVICE);\n // Check if the Android Version is greater than Oreo\n if (Build.VERSION.SDK_INT\n >= Build.VERSION_CODES.O) {\n NotificationChannel notificationChannel\n = new NotificationChannel(\n channel_id, \"CCULife\",\n NotificationManager.IMPORTANCE_HIGH);\n notificationManager.createNotificationChannel(\n notificationChannel);\n }\n\n notificationManager.notify(0, builder.build());\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message Data Payload Received\");\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n //buildNotification(remoteMessage);\n Log.d(TAG, \"Message Notification Payload Received\");\n Log.d(TAG, \"Message Notification Title: \" + remoteMessage.getNotification().getTitle());\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n //TODO: this\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = getText(R.string.local_service_started);\n\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, text,\n System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, ServiceActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, getText(R.string.local_service_label),\n text, contentIntent);\n\n // Send the notification.\n mNM.notify(NOTIFICATION, notification);\n }", "private void sendNotification(RemoteMessage remoteMessage) {\n Map<String,String> data = remoteMessage.getData();\n String title = data.get(\"title\");\n String message = data.get(\"message\");\n\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(title)\n .setContentText(message)\n .setAutoCancel(true)\n .setSound(defaultSoundUri);\n\n NotificationManager notif = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);\n notif.notify(new Random().nextInt(),builder.build());\n\n }", "private void showNotificationMessage (Context context, String title, String message, String timeStamp, Intent intent) {\n notificationUtils = new com.actiknow.plothr.gcm.NotificationUtils(context);\n intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage (title, message, timeStamp, intent);\n }", "private void sendNotification(RemoteMessage remoteMessage) {\n// Intent intent = new Intent(this, MainActivity.class);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n//\n// Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n// NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n// .setSmallIcon(R.drawable.ic_stat_ic_notification)\n// .setContentTitle(\"FCM Message\")\n// .setContentText(messageBody)\n// .setAutoCancel(true)\n// .setSound(defaultSoundUri)\n// .setContentIntent(pendingIntent);\n//\n// NotificationManager notificationManager =\n// (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n//\n// notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n //String title = remoteMessage.getNotification().getTitle();\n //String message = remoteMessage.getNotification().getBody();\n String title = remoteMessage.getData().get(\"title\");\n String message = remoteMessage.getData().get(\"text\");\n\n String imageURL = remoteMessage.getData().get(\"imageUrl\");\n long timestamp = remoteMessage.getSentTime();\n String articleID = remoteMessage.getData().get(\"articleID\");\n\n Intent intent = new Intent(this, SplashActivity.class);\n intent.putExtra(\"articleID\", articleID);\n //intent.setAction(\"rs.masinealati.PROCESS_NOTIFICATION\");\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n\n\n showNotificationMessage(getApplicationContext(), title, message, timestamp, intent);\n\n// if (TextUtils.isEmpty(imageURL)) {\n// showNotificationMessage(getApplicationContext(), title, message, timestamp, intent);\n// }else{\n// // Show notification with image\n// Log.e(TAG, \"Notification with image...\");\n// showNotificationMessageWithBigImage(getApplicationContext(), title, message, timestamp, intent, imageURL);\n// }\n\n }", "public void createNotification(Context context, String msg, String msgText, String msgAlert, int notifID) {\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent repeating_intent = new Intent(context, MainMenu.class);\n repeating_intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, notifID, repeating_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setContentIntent(pendingIntent)\n .setSmallIcon(R.drawable.ic_fridge_empty)\n .setContentTitle(msg)\n .setContentText(msgText)\n .setTicker(msgAlert)\n .setColor(0xFFC107) // colour of the circle backgroud\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}) // Vibration\n .setLights(0xFFFF00, 100, 50) // LED\n .setAutoCancel(true);\n\n notificationManager.notify(notifID, builder.build());\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n } else\n if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n invalidateOptionsMenu();//Activity method\n //updateMenuCounts(MyFirebaseMessagingService.count1);\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n //txtMessage.setText(message);\n }\n\n }", "public static void createNotification(MainActivity a, CustomFBProfile profile, IMessagingMetaData meta, HashMap<String, String> loc) {\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(a)\n .setSmallIcon(R.drawable.acba)\n .setContentTitle(\"New Message\")\n .setContentText(meta.getName().toUpperCase()).setTicker(\"New Message!!\");\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n mBuilder.setStyle(inboxStyle);\n mBuilder.setVibrate(new long[]{2000, 2000, 1000});\n mBuilder.setLights(Color.RED, 3000, 3000);\n mBuilder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));\n mBuilder.setAutoCancel(true);\n\n// Creates an explicit intent for an Activity in your app\n Intent resultIntent = a.startMessagingActivityFromAnywhereInApp(profile, meta, loc);\n\n// The stack builder object will contain an artificial back stack for the\n// started Activity.\n// This ensures that navigating backward from the Activity leads out of\n// your application to the Home screen.\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(a);\n// Adds the back stack for the Intent (but not the Intent itself)\n stackBuilder.addParentStack(MainActivity.class);\n// Adds the Intent that starts the Activity to the top of the stack\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager =\n (NotificationManager) a.getSystemService(Context.NOTIFICATION_SERVICE);\n// mId allows you to update the notification later on.\n mNotificationManager.notify(1, mBuilder.build());\n }", "private void sendNotification(String msg) {\n\t\tmNotificationManager = (NotificationManager) this\n\t\t\t\t.getSystemService(Context.NOTIFICATION_SERVICE);\n\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n\t\t\t\tnew Intent(this, MainActivity.class), 0);\n\n\t\tNotificationCompat.Builder mBuilder = new NotificationCompat.Builder(\n\t\t\t\tthis).setContentTitle(\"GCM Notification\")\n\t\t\t\t.setStyle(new NotificationCompat.BigTextStyle().bigText(msg))\n\t\t\t\t.setContentText(msg);\n\n\t\tmBuilder.setContentIntent(contentIntent);\n\t\tmNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"channel\")\n .setSmallIcon(R.drawable.ic_baseline_message_24)\n .setContentTitle(\"You have an upcoming event!!\")\n .setContentText(\"Click on the message to view more\")\n .setPriority(NotificationCompat.PRIORITY_HIGH);\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from( context);\n notificationManager.notify(200,builder.build());\n }", "private void showNotification(String message) {\n // Prepare intent which is triggered if the\n // notification is selected\n Intent intent = new Intent(this, LoginActivity.class);\n int mNotificationId = (int) System.currentTimeMillis();\n PendingIntent pIntent =\n PendingIntent.getActivity(this,\n mNotificationId,\n intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_logo)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(message)\n .setContentIntent(pIntent)\n .setAutoCancel(true);\n\n NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n }", "@Override\r\n public void onMessageReceived(final RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\r\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getNotification().getBody());\r\n Handler handler = new Handler(Looper.getMainLooper());\r\n handler.post(new Runnable() {\r\n public void run() {\r\n Toast.makeText(getApplicationContext(), \"Push notification received:\\n\"\r\n + remoteMessage.getNotification().getBody(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n\r\n }", "@Override\r\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\r\n\r\n // Check if message contains a data payload.\r\n if (remoteMessage.getData().size() > 0) {\r\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\r\n\r\n }\r\n\r\n // Check if message contains a notification payload.\r\n if (remoteMessage.getNotification() != null) {\r\n //Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\r\n\r\n final String msg = remoteMessage.getNotification().getBody();\r\n\r\n Handler handler = new Handler(Looper.getMainLooper());\r\n handler.post(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n Toast.makeText(MyService.this.getApplicationContext(), msg,Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n }\r\n\r\n }", "private void showNotification() {\n CharSequence text = \"Running\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, MainActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n //.setSmallIcon(R.drawable.stat_sample) // the status icon\n .setTicker(text) // the status text\n //.setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"PodcastFTPService\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n mNM.notify(0, notification);\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(\"TAG\", \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(\"TAG\", \"Message data payload: \" + remoteMessage.getData());\n\n if (/* Check if data needs to be processed by long running job */ true) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow();\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(\"TAG\", \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }", "@Override\n protected void onMessage(Context context, Intent intent) {\n Log.i(TAG, \"Received message\");\n String message = intent.getExtras().getString(\"price\");\n \n // notifies user\n generateNotification(context, message);\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage2) {\n Log.i(TAG, \"알림 메시지\" + remoteMessage2);\n\n remoteMessage = remoteMessage2;\n if(remoteMessage.getData().get(\"title\").equals(\"NEW!\")){\n sendNotificationNewDevice(remoteMessage.getData().get(\"body\"));\n }\n //String now = dateFormat.format (System.currentTimeMillis());\n else {\n sendNotificationDangerAlert();\n }\n }", "private void showNotification() throws NullPointerException\n\t{\n\t\tint status;\n//\t\tstatus = mqttClient != null ? R.string.connected_to_server\n//\t\t\t\t: R.string.cannot_connect_to_server;\n//\t\tPendingIntent contentIntent = PendingIntent.getActivity( this, 0,\n//\t\t\t\tnew Intent( this, MainActivity.class ), 0 );\n//\t\tnotification = new Notification.Builder( this )\n//\t\t\t\t.setContentTitle( this.getString( R.string.service_label ) )\n//\t\t\t\t.setContentText( getResources().getString( status ) )\n//\t\t\t\t.setSmallIcon( Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP\n//\t\t\t\t\t\t? R.mipmap.pristine_zen_icon_silhouette : R.mipmap.pristine_zen_icon )\n//\t\t\t\t.setContentIntent( contentIntent )\n//\t\t\t\t.setAutoCancel( false )\n//\t\t\t\t.setOngoing( true )\n//\t\t\t\t.build();\n\t\tmNotificationManager =\n\t\t\t\t(NotificationManager) getApplicationContext().getSystemService( NOTIFICATION_SERVICE );\n\t\t//notification.flags |= Notification.FLAG_ONGOING_EVENT;\n\t\t//notification.flags |= Notification.FLAG_AUTO_CANCEL;\n\n\t\tmNotificationManager.notify( 123321, notification );\n\t}", "private void sendNotificationSample() {\n Intent notificationIntent = new Intent(GCMIntentService.this, AlertActivity.class);\n\n // Get a PendingIntent containing the entire back stack.\n int i = new Random().nextInt(100);\n PendingIntent notificationPendingIntent = PendingIntent.getActivity(GCMIntentService.this, i, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Get a notification builder that's compatible with platform versions >= 4\n NotificationCompat.Builder builder = new NotificationCompat.Builder(GCMIntentService.this);\n\n // Define the notification settings.\n builder.setSmallIcon(R.drawable.icon_v2)\n // In a real app, you may want to use a library like Volley\n // to decode the Bitmap.\n //.setLargeIcon(BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_launcher)).\n .setContentTitle(\"Shang\").setContentText(i + \". This is test mesage from notification\").setContentIntent(notificationPendingIntent);\n\n // Dismiss notification once the user touches it.\n builder.setAutoCancel(true);\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n builder.setSound(alarmSound);\n\n builder.setVibrate(new long[]{0, 2000});\n\n builder.setContentIntent(notificationPendingIntent);\n\n // Get an instance of the Notification manager\n NotificationManager mNotificationManager = (NotificationManager) GCMIntentService.this.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Issue the notification\n mNotificationManager.notify(i, builder.build());\n }", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.service_icon,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tnew Intent(this, stopServiceJ.class), 0);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "private void sendNotificationAPI26(RemoteMessage remoteMessage) {\n Map<String,String> data = remoteMessage.getData();\n String title = data.get(\"title\");\n String message = data.get(\"message\");\n\n //notification channel\n NotificationHelper helper;\n Notification.Builder builder;\n\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n helper = new NotificationHelper(this);\n builder = helper.getHawkerNotification(title,message,defaultSoundUri);\n\n helper.getManager().notify(new Random().nextInt(),builder.build());\n }", "private void postNotification(RoutingContext routingContext) {\n String body = routingContext.getBodyAsString();\n\n String response = \"\";\n \n try {\n // Send FCM message content.\n OutputStream outputStream;\n outputStream = fcmConn.getOutputStream();\n outputStream.write(body.getBytes());\n\n // Read FCM response.\n InputStream inputStream = fcmConn.getInputStream();\n response = IOUtils.toString(inputStream);\n logger.debug(response);\n\n response(routingContext, 201, response);\n\n } catch (IOException e) {\n System.out.println(\"Unable to send FCM message.\");\n System.out.println(\"Please ensure that API_KEY has been replaced by the server \" +\n \"API key, and that the device's registration token is correct (if specified).\");\n logger.debug(e.getMessage());\n \n JsonObject obj = new JsonObject();\n obj.put(\"error\", e.getMessage());\n \n response(routingContext, 404, obj);\n } \n \n }", "private void showSimpleNotification() {\n Notification notification = new NotificationCompat.Builder(getActivity())\n //Title of the notification\n .setContentTitle(getString(R.string.nf_simple_title))\n //Content of the notification once opened\n .setContentText(getString(R.string.nf_simple_message))\n //This bit will show up in the notification area in devices that support that\n .setTicker(getString(R.string.nf_simple_ticker))\n //Icon that shows up in the notification area\n .setSmallIcon(R.drawable.ic_notify)\n //Icon that shows up in the drawer\n .setLargeIcon(BitmapFactory.decodeResource(getActivity().getResources(), R.drawable.ic_launcher))\n //Set the intent\n .setContentIntent(pendingIntentForNotification())\n //Build the notification with all the stuff you've just set.\n .build();\n\n //Add the auto-cancel flag to make it dismiss when clicked on\n //This is a bitmask value so you have to pipe-equals it.\n notification.flags |= Notification.FLAG_AUTO_CANCEL;\n\n //Grab the NotificationManager and post the notification\n NotificationManager notificationManager = (NotificationManager)\n getActivity().getSystemService(Context.NOTIFICATION_SERVICE);\n\n //Set a tag so that the same notification doesn't get reposted over and over again and\n //you can grab it again later if you need to.\n notificationManager.notify(TAG_SIMPLE_NOTIFICATION, notification);\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = \"Siguiendo el trayecto\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, InformacionServicio.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.estrella_full) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"Conductor Serv\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n //mNM.notify(55, notification);\n //startForeground(56,notification);\n\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)\n startMyOwnForeground();\n else\n startForeground(1, notification);\n\n }", "private void sendNotification(String msg) {\n\n mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);\n\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,new Intent(this, ServiceListActivity.class), 0);\n\n NotificationCompat.Builder mBuilder =new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(\"Ruta Plus\")\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n }", "@Override\n public void onMessageReceived(String from, Bundle data) {\n Date now = new Date();\n long uniqueId = now.getTime();\n String message = \"\";\n try {\n message = data.getString(\"message\");\n\n try {\n mJSONObject = new JSONObject(message);\n strMessage = mJSONObject.getString(\"message\");\n\n strArrList.add(strMessage);\n\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"JSONException Cause \" + e.getCause());\n Log.e(LOG_TAG, \"JSONException Error parsing data \" + e.toString());\n }\n sendNotification();\n\n } catch (Exception e) {\n\n Log.e(LOG_TAG, \"Exception : \" + e.toString());\n Rollbar.reportException(e, \"critical\", \"My Gcmlistener services crash\");\n Rollbar.reportMessage(\"GCM String Builder value : \" + strArrList.toString(), \"--GCM Message:-\" + message);\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n Log.e(\"vikas\",\"asklajeuireyqweweyytuiouiouiouiouiouiouiouiouiouio\");\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n new FetchCountTask().execute();\n\n\n // updateNotificationsBadge(cont);\n Log.e(\"vikas\",\"asklajeuireyqweweyytuiouiouiouiouiouiouiouiouiouiozxcvbnmsddff\");\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n //txtMessage.setText(message);\n }\n }", "private void notifyUser(Context context, String message) {\n\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n Intent intent = new Intent(context, MovieActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationManager manager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n android.support.v4.app.NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setContentTitle(\"device is now \" + message + \".\")\n .setOngoing(true)\n .setVibrate(new long[]{0, 500, 500, 500, 500, 500, 500})\n .setSound(soundUri)\n .setContentIntent(pendingIntent)\n .setSmallIcon(android.R.drawable.sym_def_app_icon)\n .setAutoCancel(true);\n\n manager.notify(1001, builder.build());\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"registrationComplete\")) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(\"VaahanMessages\");\n Toast.makeText(vehicle_list.this,\"Subscribed To Notification Server\",Toast.LENGTH_SHORT).show();\n\n } else if (intent.getAction().equals(\"pushNotification\")) {\n\n }\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void showNotification() {\n\t\t// What happens when the notification item is clicked\n\t\tIntent contentIntent = new Intent(this, MainActivity.class);\n\n\t\tPendingIntent pending = PendingIntent.getActivity(\n\t\t\t\tgetApplicationContext(), 0, contentIntent,\n\t\t\t\tandroid.content.Intent.FLAG_ACTIVITY_NEW_TASK);\n\n\t\tNotification nfc = new Notification(R.drawable.ic_launcher, null,\n\t\t\t\tSystem.currentTimeMillis());\n\t\tnfc.flags |= Notification.FLAG_ONGOING_EVENT;\n\n\t\tString contentText = getString(R.string.service_label);\n\n\t\tnfc.setLatestEventInfo(getApplicationContext(), contentText,\n\t\t\t\tcontentText, pending);\n\n\t\tmNM.notify(NOTIFICATION, nfc);\n\t\tSession.setNotificationVisible(true);\n\t}", "int displayNotification(Message message);", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n\n// txtMessage.setText(message);\n getlist();\n adapter.notifyDataSetChanged();\n }\n }", "private static void generateNotification(Context context, Bundle bundle) {\n\t\tint icon = R.drawable.icon;\n\t\tlong when = System.currentTimeMillis();\n\t\tString message = bundle.getString(\"message\");\n\t\tNotificationManager notificationManager = (NotificationManager) context\n\t\t\t\t.getSystemService(Context.NOTIFICATION_SERVICE);\n\t\tNotification notification = new Notification(icon, message, when);\n\t\tString title = context.getString(R.string.app_name);\n\t\tIntent notificationIntent = new Intent(context, NetasDemoActivity.class);\n\n\t\tnotificationIntent.putExtras(bundle);\n\n\t\t// set intent so it does not start a new activity\n\t\tnotificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP\n\t\t\t\t| Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tPendingIntent intent = PendingIntent.getActivity(context, 0,\n\t\t\t\tnotificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\t\tnotification.defaults |= Notification.DEFAULT_SOUND\n\t\t\t\t| notification.DEFAULT_LIGHTS | notification.DEFAULT_VIBRATE;\n\t\t// long[] vibrate = {0,100,200,300};\n\t\t// notification.vibrate = vibrate;\n\t\tnotification.setLatestEventInfo(context, title, message, intent);\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL\n\t\t\t\t| Notification.FLAG_SHOW_LIGHTS;\n\t\tnotification.ledOnMS = 1000; // light on in milliseconds\n\t\tnotification.ledOffMS = 4000; // light off in milliseconds\n\t\tnotificationManager.notify(0, notification);\n\t}", "private void showNotification() {\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n Notification notification = new NotificationCompat.Builder(getApplicationContext())\n .setContentIntent(PendingIntent.getActivity(this, 0, intent, 0))\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentText(getText(R.string.local_service_running))\n .setContentTitle(getText(R.string.local_service_notification)).build();\n notificationManager.notify(NOTIFICATION, notification);\n }", "private void handleNow(RemoteMessage remoteMessage) {\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n String CHANNEL_ID_CHAT = \"myapp-01\";\n String CHANNEL_ID_GENERAL = \"myapp-02\";\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n // Channel 1\n CharSequence chatChannel = \"Chat\";\n String chatChannelDesc = \"Notifications from chat app\";\n int chatImportance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel mChatChannel = new NotificationChannel(CHANNEL_ID_CHAT, chatChannel, chatImportance);\n mChatChannel.setDescription(chatChannelDesc);\n mChatChannel.enableLights(true);\n mChatChannel.setLightColor(Color.BLUE);\n notificationManager.createNotificationChannel(mChatChannel);\n\n // Channel 2\n CharSequence generalChannel = \"General\";\n String generalChannelDesc = \"General notifications\";\n int generalImportance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel mGeneralChannel = new NotificationChannel(CHANNEL_ID_GENERAL, generalChannel, generalImportance);\n mGeneralChannel.setDescription(generalChannelDesc);\n mGeneralChannel.enableLights(true);\n mGeneralChannel.setLightColor(Color.BLUE);\n notificationManager.createNotificationChannel(mGeneralChannel);\n\n }\n\n // Sending push notification to spesific channel\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Intent intent1 = new Intent(getApplicationContext(), MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 123, intent1, PendingIntent.FLAG_UPDATE_CURRENT);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID_CHAT)\n .setSmallIcon(R.drawable.xmen)\n .setBadgeIconType(R.drawable.xmen)\n .setChannelId(CHANNEL_ID_CHAT)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent)\n .setNumber(1)\n .setSound(defaultSoundUri)\n .setColor(ContextCompat.getColor(this, R.color.white))\n .setWhen(System.currentTimeMillis());\n\n if (remoteMessage.getData().size() > 0) {\n notificationBuilder.setContentTitle(remoteMessage.getData().get(\"title\"));\n notificationBuilder.setContentText(remoteMessage.getData().get(\"message\"));\n }\n\n notificationManager.notify(getID(), notificationBuilder.build());\n }", "@Override\n\tpublic void ActOnNotification(String message) {\n\t \tSystem.out.println(\"Sending Event\");\n\t}", "@Override\n public void onMessageReceived(@NotNull final RemoteMessage remoteMessage) {\n showNotification(remoteMessage);\n }", "private void sendNotificationNewDevice(String messageBody) {\n Log.i(TAG, \"new 알림 메시지\"+ messageBody);\n\n\n Intent intentR = new Intent(this, RegisterActivity.class);\n intentR.putExtra(\"newDevice\",messageBody);\n intentR.addFlags(intentR.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntentR = PendingIntent.getActivity(this, 0 /* Request code */, intentR,\n PendingIntent.FLAG_ONE_SHOT);\n\n\n String channelId = getString(R.string.default_notification_channel_id);\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(this, channelId)\n .setSmallIcon(R.drawable.ic_stat_ic_notification)\n .setContentTitle(getString(R.string.fcm_message))\n .setContentText(messageBody)\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntentR);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Since android Oreo notification channel is needed.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(channelId,\n \"Channel human readable title\",\n NotificationManager.IMPORTANCE_HIGH);\n notificationManager.createNotificationChannel(channel);\n }\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onMessageReceived(@NonNull RemoteMessage remoteMessage)\n {\n super.onMessageReceived(remoteMessage);\n /* Get new notification title */\n Context context = getAppContext();\n String title = context.getString(R.string.new_notification_title);\n /* Check if notification is intended for logged in user */\n String currentUserId = getCurrentUserId();\n String receiverUserId = remoteMessage.getData().get(\"ReceiverUserId\");\n if (currentUserId != null && currentUserId.equals(receiverUserId))\n {\n showNotification(title, remoteMessage.getData().get(\"Message\"));\n }\n else\n {\n Log.d(TAG, \"Notification not intended for this device.\");\n }\n }", "@Override\r\n public void onMessageReceived(RemoteMessage remoteMessage) {\n if(remoteMessage.getData().size()>0)\r\n {\r\n Log.d(TAG, \"Mensaje recibido: \"+ remoteMessage.getData());\r\n }\r\n //Checa si el mensaje contiene notificacion\r\n if(remoteMessage.getNotification() != null){\r\n String title = remoteMessage.getNotification().getTitle();\r\n String message = remoteMessage.getNotification().getBody();\r\n\r\n Log.d(TAG, \"Titulo del mensaje de notificación: \"+ title);\r\n Log.d(TAG, \"Cuerpo del mensaje de notificación: \"+message);\r\n\r\n mostrarNotificacion(title, message);\r\n }\r\n\r\n if(remoteMessage.getData() != null) {\r\n Log.d(\"FIREBASE\", \"DATOS RECIBIDOS\");\r\n Log.d(\"FIREBASE\", \"Usuario: \" + remoteMessage.getData().get(\"usuario\"));\r\n Log.d(\"FIREBASE\", \"Estado: \" + remoteMessage.getData().get(\"estado\"));\r\n }\r\n\r\n //super.onMessageReceived(remoteMessage);\r\n /*String from = remoteMessage.getFrom();\r\n String title = remoteMessage.getNotification().getTitle();\r\n String message = remoteMessage.getNotification().getBody();\r\n Log.d(TAG, \"Mensaje Recibido de: \"+ from + \"\\nTitulo:\"+title+\" Mensaje: \"+message);\r\n mostrarNotificacion(title, message);*/\r\n /*if(remoteMessage.getNotification()!=null)\r\n {\r\n Log.d(TAG, \"Notificacion: \"+ remoteMessage.getNotification().getBody());\r\n //mostrarNotificacion(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());\r\n }\r\n if(remoteMessage.getData().size()>0)\r\n {\r\n Log.d(TAG, \"data: \"+ remoteMessage.getData());\r\n }*/\r\n }", "private void ShowNotification()\n {\n Notification n = new Notification.Builder(this)\n .setContentTitle(\"Message from Himanshu\")\n .setContentText(\"Thank you Sir. Enjoyed Your Class!\")\n .setSmallIcon(R.drawable.cloud)\n //.setContentIntent(pIntent)\n .setAutoCancel(true)\n //.addAction(R.drawable.icon, \"Call\", pIntent)\n //.addAction(R.drawable.icon, \"More\", pIntent)\n //.addAction(R.drawable.icon, \"And more\", pIntent)\n .getNotification();\n\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n try {\n notificationManager.notify(0, n);\n }catch (Exception ex) {\n Log.d(\"MyApp\", \"Exception Occured!\");\n }\n }", "void showMessage(@NonNull BaseMessage message);", "@Override\n public void onMessageReceived(String from, Bundle data)\n {\n //FCM Handling start\n// Bundle bundle = data.getParcelable(\"notification\");\n// String message = bundle.getString(\"body\");\n //FCM Handling end\n\n String message = data.getString(\"message\");\n\n Log.d(TAG, \"From: \" + from);\n Log.d(TAG, \"Message: \" + message);\n\n try\n {\n GcmMessage gcmMessage = new Gson().fromJson(message, GcmMessage.class);\n\n ArrayList<String> eventTypes = gcmMessage.getEventTypes();\n\n for(String eventType : eventTypes)\n {\n GcmEventFactory.getEventCommand(eventType).run();\n }\n }\n catch(Exception e)\n {\n Log.d(TAG, \"Failed to process GCM message: \" + e.getMessage());\n }\n }", "void notify(PushMessage m);", "private void showNotification() {\n\n Intent intent = new Intent(this, DashboardActivity.class);\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n stackBuilder.addParentStack(DashboardActivity.class);\n stackBuilder.addNextIntent(intent);\n\n final NotificationCompat.Builder builder = new NotificationCompat.Builder(this);\n\n builder.setSmallIcon(R.drawable.ic_gps);\n builder.setContentText(getText(R.string.local_service_started));\n builder.setContentTitle(getText(R.string.local_service_label));\n builder.setOngoing(true);\n builder.setContentIntent(stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT));\n\n final Notification notification = builder.build();\n\n // Send the notification.\n mNotificationManager.notify(NOTIFICATION, notification);\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n sendNotification(remoteMessage.getNotification().getTitle(),\n remoteMessage.getNotification().getBody());\n\n bodyMessage = remoteMessage.getNotification().getBody();\n Log.d(TAG, \"onMessageReceived: \" + bodyMessage);\n\n Log.d(TAG, \"onMessageReceived: \" + remoteMessage.getNotification().getTitle() + \" vvvvvvvv \" +\n remoteMessage.getNotification().getBody());\n }", "private void sendNotification() {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n String message = intent.getStringExtra(\"message\");\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // TODO(developer): Handle FCM messages here.\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Map<String,String> m = remoteMessage.getData();\n Log.d(TAG, \"Message data payload: \" + m);\n String id = remoteMessage.getMessageId();\n if(id == null)\n id = remoteMessage.getData().get(\"title\");\n handleData(id, m);\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n String id = remoteMessage.getMessageId();\n if(id == null)\n id = remoteMessage.getNotification().getTitle();\n handleNotification(id, remoteMessage.getNotification());\n }\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }", "protected void sendNotification(Bundle messageInfo) {\n mNotificationManager = (NotificationManager)\n this.getSystemService(Context.NOTIFICATION_SERVICE);\n\n Class targetActivity = TCSAppInstance.getInstance().getTargetNotificationClass();\n Intent notificationIntent;\n\n if (targetActivity != null)\n notificationIntent = new Intent(this, targetActivity);\n else\n notificationIntent = getPackageManager().getLaunchIntentForPackage(getApplication().getPackageName());\n\n\n // set intent so it does not start a new activity\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(getApplicationContext())\n .setContentTitle(TCSAppInstance.getInstance().getApplication().getString(R.string.app_name))\n .setContentText(messageInfo.getString(\"message\"))\n .setWhen(System.currentTimeMillis())\n .setStyle(new NotificationCompat.BigTextStyle().bigText(messageInfo.getString(\"message\")))\n .setAutoCancel(true);\n\n if (icon > 0) {\n mBuilder.setSmallIcon(icon);\n }\n\n if (messageInfo.getString(\"alertSound\") != null && messageInfo.getString(\"alertSound\").equals(\"true\")) {\n mBuilder.setDefaults(Notification.DEFAULT_SOUND);\n }\n\n mBuilder.setContentIntent(contentIntent);\n\n int notificationId = TCSUtilities.generateRandomNumber();\n mNotificationManager.notify(notificationId, mBuilder.build());\n\n broadcastMessageIntent.putExtra(MESSAGE_STRING, messageInfo.getString(\"message\"));\n sendBroadcast(broadcastMessageIntent);\n }", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.compass25,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\t\tnotification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tIntent intent = new Intent(this, TaskOverViewActivity.class);\r\n\t\t//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tintent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "private void sendNotification(JSONObject notification, final String staffID) {\r\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(FCM_API, notification,\r\n new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Toast.makeText(BookingListDetails.this, \"\"+ staffID + \" has been Notified!\", Toast.LENGTH_SHORT).show();\r\n Log.i(TAG, \"onResponse: \" + response);\r\n }\r\n },\r\n new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Toast.makeText(BookingListDetails.this, \"Request error\", Toast.LENGTH_LONG).show();\r\n Log.i(TAG, \"onErrorResponse: Didn't work\");\r\n }\r\n }) {\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"Authorization\", serverKey);\r\n params.put(\"Content-Type\", contentType);\r\n return params;\r\n }\r\n };\r\n MySingleton.getInstance(getApplicationContext()).addToRequestQueue(jsonObjectRequest);\r\n }", "private void showNotification() {\n }", "@Override public void onMessageReceived(RemoteMessage remoteMessage) {\n FCMManager.getInstance(getApplicationContext()).onMessage(remoteMessage);\n }", "private void showNotification() {\n\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n System.out.println(\"msg received\");\n Log.d(TAG, \"FCM Message Id: \" + remoteMessage.getMessageId());\n Log.d(TAG, \"FCM Notification Message: \" + remoteMessage.getNotification());\n Log.d(TAG, \"FCM Data Message: \" + remoteMessage.getData());\n System.out.println(\"hm msg recieved\"+remoteMessage.getFrom()+remoteMessage.getMessageType()+remoteMessage.getNotification());\n }", "private void sendNotify(JSONObject notification, String staffID) {\r\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(FCM_API, notification,\r\n new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Toast.makeText(BookingListDetails.this, \"\"+ staffID + \" has been Notified!\", Toast.LENGTH_SHORT).show();\r\n Log.i(TAG, \"onResponse: \" + response);\r\n startActivity(new Intent(getApplicationContext(), AdminBookingList.class));\r\n finish();\r\n }\r\n },\r\n new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Toast.makeText(BookingListDetails.this, \"Request error\", Toast.LENGTH_LONG).show();\r\n Log.i(TAG, \"onErrorResponse: Didn't work\");\r\n }\r\n }) {\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"Authorization\", serverKey);\r\n params.put(\"Content-Type\", contentType);\r\n return params;\r\n }\r\n };\r\n MySingleton.getInstance(getApplicationContext()).addToRequestQueue(jsonObjectRequest);\r\n }", "private void addNotification(String message, GraphObject result, FacebookRequestError error){\n String title = null;\n String alertMessage = null;\n if (error == null) {\n title = getString(R.string.success);\n String id = result.cast(GraphObjectWithId.class).getId();\n alertMessage = getString(R.string.successfully_posted_post, message, id);\n } else {\n title = getString(R.string.error);\n alertMessage = error.getErrorMessage();\n }\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(title)\n .setContentText(alertMessage);\n\n NotificationManager mNotificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n // mId allows you to update the notification later on.\n int mId = 0;\n mNotificationManager.notify(mId, mBuilder.build());\n }", "private void showNotificationMessage(Context context, String title, String message, long timeStamp, Intent intent) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent);\n }", "private void sendNotification(String messageBody, String titleMessage) {\n Intent intent = new Intent(this, HomeMenu.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);\n\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this);\n\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n notificationBuilder.setSmallIcon(R.mipmap.ic_launcher);\n }\n\n notificationBuilder.setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(titleMessage)\n .setContentText(messageBody)\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent)\n .setStyle(new NotificationCompat.BigTextStyle().bigText(messageBody)); //Making the text in big Picture Style\n\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(0, notificationBuilder.build());\n }", "private void sendNotification() {\n int mNotificationId = 001;\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_action_camera)\n .setContentTitle(\"Daily Selfie\")\n .setContentText(\"Time for another selfie\");\n Intent resultIntent = new Intent(this, MainActivity.class);\n PendingIntent resultPendingIntent =\n PendingIntent.getActivity(\n this,\n 0,\n resultIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n // Gets an instance of the NotificationManager service\n NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n // Builds the notification and issues it.\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n // [START_EXCLUDE]\n // There are two types of messages data messages and notification messages. Data messages are handled\n // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type\n // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app\n // is in the foreground. When the app is in the background an automatically generated notification is displayed.\n // When the user taps on the notification they are returned to the app. Messages containing both notification\n // and data payloads are treated as notification messages. The Firebase console always sends notification\n // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options\n // [END_EXCLUDE]\n\n // Not getting messages here? See why this may be: https://goo.gl/39bRNJ\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0)\n {\n if (/* Check if data needs to be processed by long running job */ false) {\n // For long-running tasks (10 seconds or more) use Firebase Job Dispatcher.\n scheduleJob();\n } else {\n // Handle message within 10 seconds\n handleNow(remoteMessage.getData());\n }\n\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null)\n {\n\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }", "@Override\n public void onMessageReceived(String from, Bundle data) {\n Log.i(TAG,\"###### onMessageReceived, data: \" + data.toString());\n String message = data.getString(\"message\");\n if (message != null) {\n Log.d(TAG, \"** GCM message From: \" + from);\n Log.d(TAG, \"Message: \" + message);\n sendNotification(message);\n return;\n }\n// message = data.getString(\"track\");\n// if (message != null) {\n// LocationTrackerDTO m = GSON.fromJson(message, LocationTrackerDTO.class);\n// Log.d(TAG, \"** GCM track message From: \" + from);\n// Log.d(TAG, \"Track: \" + message);\n// sendNotification(m);\n// return;\n// }\n// message = data.getString(\"simpleMessage\");\n// if (message != null) {\n// SimpleMessageDTO m = GSON.fromJson(message, SimpleMessageDTO.class);\n// m.setDateReceived(new Date().getTime());\n// if (m.getLocationRequest() == null) {\n// m.setLocationRequest(Boolean.FALSE);\n// }\n// Log.d(TAG, \"** GCM simpleMessage From: \" + from);\n// Log.d(TAG, \"SimpleMessage: \" + m.getMessage());\n// broadcastMessage(m);\n// return;\n// }\n\n }", "@Override public void onReceiveNotification(Context context, PushMsg msg) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n System.out.println(\"notification!\");\n\n NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);\n Notification.Builder notificationBuilder = new Notification.Builder(context);\n notificationBuilder.setContentText(intent.getStringExtra(\"Content\"))\n .setContentTitle(intent.getStringExtra(\"Title\"))\n .setSmallIcon(R.mipmap.ic_launcher);\n Notification notification = notificationBuilder.build();\n //setContentText(\"hello world\").build();\n Random rand = new Random();\n int x = Integer.parseInt(intent.getStringExtra(\"code\"));\n\n notificationManager.notify(x,notification);\n Intent intent1 = new Intent(context, notificationService.class);\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n if (remoteMessage.getData().size() > 0) {\n\n if(remoteMessage.getData().get(\"preferenceId\")!=null) {\n Intent intent = new Intent(\"preferenceIdMercadoPagoData\");\n intent.putExtra(\"preferenceId\", remoteMessage.getData().get(\"preferenceId\"));\n Log.e(\"firebase service\", \"llega\");\n broadcaster.sendBroadcast(intent);\n }\n\n if (remoteMessage.getData().get(\"aviso_titulo\")!=null\n && remoteMessage.getData().get(\"aviso_mensaje\")!=null\n && remoteMessage.getData().get(\"aviso_tipo\")!=null){\n\n showNotification(remoteMessage.getData().get(\"aviso_titulo\"),\n remoteMessage.getData().get(\"aviso_mensaje\"),\n remoteMessage.getData().get(\"aviso_tipo\"));\n }\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n\n }\n }", "private void showNotificationMessage(Context context, String title, String message, String timeStamp, Intent intent) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent);\n }", "private void showNotificationMessage(Context context, String title, String message, String timeStamp, Intent intent) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent);\n }", "private void showNotificationMessage(Context context, String title, String message, String timeStamp, Intent intent) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent);\n }", "private void AlarmByNotification(String message) {\n\t\tToast.makeText(this, message, Toast.LENGTH_LONG).show();\r\n\t}", "private void showNotification(final CharSequence text) {\n if (DEBUG) {\n Log.v(TAG, \"showNotification:\" + text);\n }\n // Set the info for the views that show in the notification panel.\n final Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(getText(R.string.app_name)) // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(createPendingIntent()) // The intent to send when the entry is clicked\n .build();\n\n startForeground(NOTIFICATION, notification);\n // Send the notification.\n mNotificationManager.notify(NOTIFICATION, notification);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n private void showNotification(String title, String body)\n {\n Intent intent = new Intent(this, LoginActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)\n .setSmallIcon(R.drawable.ic_notification)\n .setContentTitle(title)\n .setContentText(body)\n .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.app_icon))\n .setPriority(NotificationCompat.PRIORITY_HIGH) // for lower than api 26\n .setContentIntent(pendingIntent)\n .setAutoCancel(true) // removes notification on click\n .build();\n\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.notify(new Random().nextInt(), notification);\n }" ]
[ "0.68718606", "0.6866856", "0.6847912", "0.68435824", "0.6824095", "0.6822237", "0.6755915", "0.6726712", "0.672503", "0.67226255", "0.6707804", "0.6693785", "0.6619685", "0.6617067", "0.66154075", "0.66024387", "0.65995663", "0.6591992", "0.656111", "0.654328", "0.65321124", "0.6514865", "0.6496687", "0.64888537", "0.6470276", "0.6449607", "0.6446731", "0.6446049", "0.6438067", "0.6429069", "0.642513", "0.64172786", "0.64142406", "0.6406879", "0.64036185", "0.64035296", "0.6398816", "0.6396085", "0.63953656", "0.6376756", "0.6362355", "0.6354337", "0.63506293", "0.63425", "0.6333337", "0.63327146", "0.6327984", "0.6324517", "0.63168776", "0.6310182", "0.6303367", "0.6271651", "0.6266279", "0.6262535", "0.6250441", "0.6240377", "0.6236804", "0.6226731", "0.622607", "0.62255895", "0.6211996", "0.6199734", "0.6189324", "0.61881006", "0.61859083", "0.61709696", "0.6167158", "0.6161885", "0.6160625", "0.61560583", "0.6149054", "0.6142052", "0.6123399", "0.6118425", "0.6108665", "0.6105044", "0.6097845", "0.6096937", "0.6092169", "0.6082936", "0.6078915", "0.6077265", "0.60624284", "0.6052727", "0.6051389", "0.60198677", "0.60162973", "0.6004412", "0.59998465", "0.59868395", "0.59788966", "0.59704286", "0.5966831", "0.5964993", "0.59613806", "0.59613806", "0.59613806", "0.5949932", "0.59476876", "0.5941503" ]
0.60375756
85
Return a URL to the requested resource.
public URL resolveResource(final String resourcePath) throws MalformedURLException { File resourceFile = new File(getFullPath(resourcePath)); if (resourceFile.exists()) { return resourceFile.toURL(); } if (LOG.isTraceEnabled()) { LOG.trace("Resource at \n\t" + resourceFile.getPath() + " not found."); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getURL();", "Uri getUrl();", "public URL getURL()\n/* */ {\n/* 135 */ return ResourceUtils.getResourceAsURL(this, this);\n/* */ }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "String url();", "URL getUrl();", "@Nullable\n public abstract String url();", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "protected abstract String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "public abstract RestURL getURL();", "public abstract String getURL();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "public abstract String getUrl();", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "java.net.URL getUrl();", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "String getUri();", "String getRequestURL();", "private URL getResourceAsUrl(final String path) throws IOException {\n\t\treturn appContext.getResource(path).getURL();\n\t}", "public String getResourceUrl() {\n\t\treturn resourceUrl;\n\t}", "String getRequestedUrl();", "java.lang.String getResourceUri();", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "public String getURL()\n {\n return getURL(\"http\");\n }", "String getUri( );", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "public URL getUrl() {\n try {\n StringBuilder completeUrlBuilder = new StringBuilder();\n completeUrlBuilder.append(getBaseEndpointPath());\n completeUrlBuilder.append(path);\n if (requestType == HttpRequest.NetworkOperationType.GET && parameters != null) {\n boolean first = true;\n for (String key : parameters.keySet()) {\n if (first) {\n first = false;\n completeUrlBuilder.append(\"?\");\n } else {\n completeUrlBuilder.append(\"&\");\n }\n completeUrlBuilder.append(key).append(\"=\").append(parameters.get(key));\n }\n }\n return new URL(completeUrlBuilder.toString());\n } catch (MalformedURLException exception) {\n LocalizableLog.error(exception);\n return null;\n }\n }", "java.lang.String getApiUrl();", "java.lang.String getUri();", "java.lang.String getUri();", "public String getResourceurl() {\n return resourceurl;\n }", "String getURI();", "String getURI();", "String getURI();", "public static String getResourceEndpointURL(String resource) throws NotFoundException {\n\n return resourceURLBuilder.build(resource);\n }", "public String getUri();", "String getSpecUrl();", "private String getUrlPlanet() {\n return this.url + this.resource;\n }", "@Api(1.2)\n @NonNull\n public String url() {\n return mRequest.buildOkRequest().url().toString();\n }", "@Override\r\n public String getFriendlyURI() {\r\n return createURI(false, false);\r\n }", "public String getResourceUrl() {\n return this.resourceUrl;\n }", "String getServerUrl();", "@Override\r\n public String getURL() {\n return url;\r\n }", "public static URL buildUrl() {\n Uri builtUri = Uri.parse(CONTENT_JSON_URL).buildUpon()\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n return url;\n }", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "public String url() {\n return server.baseUri().toString();\n }", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public abstract String getOutputUrl();", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();", "java.lang.String getBookingURL();", "@java.lang.Override\n public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "public java.lang.String getUrl() {\n return url;\n }", "URI getUri();", "@Schema(description = \"Link to get this item\")\n public String getUrl() {\n return url;\n }", "URL toURL() throws IOException;", "public URL getURL() {\r\n try {\r\n return new URL(\"http://www.bluej.org/doc/writingextensions.html\");\r\n } catch (Exception eee) {\r\n // The link is either dead or otherwise unreachable\r\n System.out.println(\"Simple extension: getURL: Exception=\" + eee.getMessage());\r\n return null;\r\n }\r\n }", "public String getApiUrl();", "String getServiceUrl();", "String getURL(FsItem f);", "public java.lang.String getURL() {\n return URL;\n }", "public String getUrl() { return url; }", "public URL getUrl() throws MalformedURLException {\n StringBuilder pathAndQuery = new StringBuilder(100);\n String path = this.getPath();\n // Hack to allow entire URL to be provided in host field\n if (path.startsWith(HTTP_PREFIX)\n || path.startsWith(HTTPS_PREFIX)){\n return new URL(path);\n }\n String domain = getDomain();\n String protocol = getProtocol();\n if (PROTOCOL_FILE.equalsIgnoreCase(protocol)) {\n domain=null; // allow use of relative file URLs\n } else {\n // HTTP URLs must be absolute, allow file to be relative\n if (!path.startsWith(\"/\")){ // $NON-NLS-1$\n pathAndQuery.append(\"/\"); // $NON-NLS-1$\n }\n }\n pathAndQuery.append(path);\n \n // Add the query string if it is a HTTP GET or DELETE request\n if(HTTPConstants.GET.equals(getMethod()) || HTTPConstants.DELETE.equals(getMethod())) {\n // Get the query string encoded in specified encoding\n // If no encoding is specified by user, we will get it\n // encoded in UTF-8, which is what the HTTP spec says\n String queryString = getQueryString(getContentEncoding());\n if(queryString.length() > 0) {\n if (path.indexOf(QRY_PFX) > -1) {// Already contains a prefix\n pathAndQuery.append(QRY_SEP);\n } else {\n pathAndQuery.append(QRY_PFX);\n }\n pathAndQuery.append(queryString);\n }\n }\n // If default port for protocol is used, we do not include port in URL\n if(isProtocolDefaultPort()) {\n return new URL(protocol, domain, pathAndQuery.toString());\n }\n return new URL(protocol, domain, getPort(), pathAndQuery.toString());\n }", "public Resource getResource(Request request);", "public URL getResourceLocation( String name );", "public String getUrl()\n {\n return url;\n }", "@Nonnull public URL buildURL() throws MalformedURLException {\n installTrustStore();\n \n if (disableNameChecking) {\n final HostnameVerifier allHostsValid = new HostnameVerifier() {\n public boolean verify(final String hostname, final SSLSession session) {\n return true;\n }\n }; \n HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid); \n }\n \n final StringBuilder builder = new StringBuilder(getURL());\n if (getPath() != null) {\n builder.append(getPath());\n }\n\n return new URL(doBuildURL(builder).toString());\n }", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public URL getUrl() throws MalformedURLException {\n StringBuilder pathAndQuery = new StringBuilder(100);\n String path = this.getPath();\n // Hack to allow entire URL to be provided in host field\n if (path.startsWith(HTTP_PREFIX)\n || path.startsWith(HTTPS_PREFIX)) {\n return new URL(path);\n }\n String domain = getDomain();\n String protocol = getProtocol();\n if (PROTOCOL_FILE.equalsIgnoreCase(protocol)) {\n domain = null; // allow use of relative file URLs\n } else {\n // HTTP URLs must be absolute, allow file to be relative\n if (!path.startsWith(\"/\")) { // $NON-NLS-1$\n pathAndQuery.append(\"/\"); // $NON-NLS-1$\n }\n }\n pathAndQuery.append(path);\n \n // Add the query string if it is a HTTP GET or DELETE request\n if (HTTPConstants.GET.equals(getMethod()) || HTTPConstants.DELETE.equals(getMethod())) {\n // Get the query string encoded in specified encoding\n // If no encoding is specified by user, we will get it\n // encoded in UTF-8, which is what the HTTP spec says\n String queryString = getQueryString(getContentEncoding());\n if (queryString.length() > 0) {\n if (path.contains(QRY_PFX)) {// Already contains a prefix\n pathAndQuery.append(QRY_SEP);\n } else {\n pathAndQuery.append(QRY_PFX);\n }\n pathAndQuery.append(queryString);\n }\n }\n // If default port for protocol is used, we do not include port in URL\n if (isProtocolDefaultPort()) {\n return new URL(protocol, domain, pathAndQuery.toString());\n }\n return new URL(protocol, domain, getPort(), pathAndQuery.toString());\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "@Nonnull public String getURL() {\n return url;\n }", "@Override\r\n\tpublic String getUrl() {\n\t\treturn null;\r\n\t}", "public abstract URI target();", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "public String getUrl() {\r\n\t\t\treturn url;\r\n\t\t}", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}" ]
[ "0.72909963", "0.72789896", "0.71878827", "0.71609074", "0.71609074", "0.71609074", "0.71609074", "0.7151074", "0.70675904", "0.70327264", "0.7012294", "0.6978672", "0.6967325", "0.6967325", "0.6967325", "0.6967325", "0.6967325", "0.6967325", "0.6937827", "0.69306576", "0.6926219", "0.6926219", "0.6926219", "0.6926219", "0.6926219", "0.68853635", "0.6861084", "0.682025", "0.6778406", "0.6778406", "0.6761583", "0.6746742", "0.6736354", "0.6730153", "0.6703815", "0.66987544", "0.668194", "0.6668832", "0.6654547", "0.6624432", "0.6624432", "0.66187805", "0.6615223", "0.6614944", "0.6614944", "0.6587597", "0.65679055", "0.65679055", "0.65679055", "0.6566633", "0.65651065", "0.65604323", "0.65571266", "0.65451664", "0.65238786", "0.65232277", "0.6512687", "0.64937294", "0.6486391", "0.64841545", "0.6476473", "0.6435446", "0.6423747", "0.6402224", "0.6398059", "0.63814545", "0.63610274", "0.6356195", "0.6336711", "0.6335128", "0.6324607", "0.63240767", "0.6297149", "0.62916595", "0.62850225", "0.62591755", "0.6250054", "0.6236905", "0.6232147", "0.6225451", "0.6225058", "0.6217871", "0.6217871", "0.6216858", "0.6208576", "0.61996156", "0.61984205", "0.6192708", "0.6190513", "0.6186113", "0.6184084", "0.61818767", "0.61818767", "0.61818767", "0.61818767", "0.61818767", "0.61818767", "0.61818767", "0.61818767", "0.61818767", "0.61798406" ]
0.0
-1
Gets the full file system path to a resource given the partial path.
public abstract String getFullPath(final String resourcePath);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}", "String getRealPath(String path);", "public abstract String getFullPath();", "public static String getResourcePath(String resource) {\n String path = getBaseResourcePath() + resource;\n return path;\n }", "private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}", "public static String getFilePath(Resource resource) {\n\t\treturn getFilePath(resource.getResourceSet(), resource.getURI());\n\t}", "public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }", "String getExternalPath(String path);", "String fullpath(String path) {\n return fullpath(path, null);\n }", "public String resolvePath();", "private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getFullPath()\n {\n return( fullPath );\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "ResourceLocation resolve(String path);", "private static String getFullPath(String pathname) {\n String fullPath = null;\n\n // make sure the path starts with a slash\n if (pathname.startsWith(\"/\"))\n fullPath = pathname;\n else\n fullPath = process.getDir() + \"/\" + pathname;\n return fullPath;\n }", "String getFilepath();", "public String getAbsPath();", "public String getPath();", "public String getPath();", "public String getPath();", "public String fullpath(String path, Args namespace) {\n return path;\n }", "@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}", "public static String getPath(String fn) {\n\t\tif (fn == null) {\n\t\t\treturn null;\n\t\t}\n\t\tint i = fn.lastIndexOf(File.separator);\n\t\treturn (i > -1) ? fn.substring(0, i) : fn;\n\t}", "String getAbsolutePathWithinSlingHome(String relativePath);", "Path getPath();", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public static String getResourcePath( String resource ) throws IllegalArgumentException, IllegalStateException {\n\t\ttry {\n\t\t\t// get all resources by given resource name\n\t\t\tEnumeration<URL> resources = LocalTestsFileSystem.class.getClassLoader().getResources(resource);\n\t\t\t\n\t\t\t// gets first (and only) result\n\t\t\tif (resources.hasMoreElements()) {\n\t\t\t\t// cut first / from /-separated path to convert it to Path object\n\t\t\t\treturn resources.nextElement().getPath().substring(1);\n\t\t\t}\n\t\t\n\t\t\t// if cannot load URLs throws an IllegalStateException of wrong resource\n\t\t} catch (IOException e) { throw new IllegalStateException(e); }\n\t\t\n\t\t// if nothing found throws a IllegalArgumentException\n\t\tthrow new IllegalArgumentException(\"no resources found\");\n\t}", "public String path() {\n return filesystem().pathString(path);\n }", "public String getResourcePath();", "protected static String getObjectPath(URI resource) {\n String objectPath = resource.getPath().isEmpty() ? \"/\" : resource.getPath();\n return String.format(\"%s%s\", resource.getAuthority(),\n objectPath.charAt(0) == '/' ? objectPath : \"/\" + objectPath);\n }", "protected abstract String getResourcePath();", "@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}", "public static String getAbsoluteResourcePath(String resourcePathInPlugin) {\r\n String pluginPath = RichFacesTemplatesActivator.getPluginResourcePath();\r\n IPath pluginFile = new Path(pluginPath);\r\n File file = pluginFile.append(resourcePathInPlugin).toFile();\r\n if (file.exists()) {\r\n return file.getAbsolutePath();\r\n } else {\r\n throw new IllegalArgumentException(\"Can't get path for \" //$NON-NLS-1$\r\n + resourcePathInPlugin);\r\n }\r\n }", "public String getLocationPath();", "public String getRelativePath();", "@DISPID(35)\r\n\t// = 0x23. The runtime will prefer the VTID if present\r\n\t@VTID(40)\r\n\tjava.lang.String fullPath();", "@Nullable String getPath();", "public Path resolve(String part) {\n return Paths.get(part);\n }", "public static String get(String path)\n {\n try\n {\n URI uri = new URI(path);\n String fragment = uri.getFragment();\n if (fragment != null)\n {\n File file = new File(fragment);\n if (file.exists())\n return file.toString();\n }\n\n // remove the fragment\n path = uri.getPath();\n }\n catch (URISyntaxException e)\n {\n // do nothing... fall through to the remaining code\n }\n\n // otherwise, try to load from full path\n\n if (cachedFiles == null)\n return null;\n\n for (Path cachedFile : cachedFiles)\n {\n if (cachedFile.toString().endsWith(path))\n {\n return cachedFile.toString();\n }\n if (cachedFile.getParent().toString().endsWith(path))\n {\n return cachedFile.toString();\n }\n }\n\n return null;\n }", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "@DISPID(77)\r\n\t// = 0x4d. The runtime will prefer the VTID if present\r\n\t@VTID(75)\r\n\tjava.lang.String fullPath();", "private static String getResourcePath(String resPath) {\n URL resource = XmlReaderUtils.class.getClassLoader().getResource(resPath);\n Assert.assertNotNull(\"Could not open the resource \" + resPath, resource);\n return resource.getFile();\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "public abstract String getPath();", "public abstract String getPath();", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "java.lang.String getFilePath();", "public String path(File f) {\r\n int sep = f.toString().lastIndexOf(\"\\\\\");\r\n return f.toString().substring(0, sep);\r\n }", "public String getPath() {\n return (path == null || path.equals(\"\")) ? \"/\" : path;\n }", "protected static String getObjectDirPath(URI resource) {\n String ret = getObjectPath(resource);\n return ret.substring(0, ret.lastIndexOf('/') + 1);\n }", "public static final String makePath(String resource) {\n return BEAKED_ASSETS_FOLDER + \"/\" + resource;\n }", "public static String getAbsoluteWorkspacePath(\r\n \t\t\tString resourcePathInWorkspace, VpePageContext pageContext) {\r\n \r\n \t\tString resolvedValue = resourcePathInWorkspace\r\n \t\t\t\t.replaceFirst(\r\n \t\t\t\t\t\t\"^\\\\s*(\\\\#|\\\\$)\\\\{facesContext.externalContext.requestContextPath\\\\}\", Constants.EMPTY); //$NON-NLS-1$\r\n \r\n\t\tIFile baseFile = null;\r\n \t\tif (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null\r\n \t\t\t\t&&(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {\r\n\t\t\tbaseFile = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()\r\n \t\t\t\t\t.getStorage();\r\n \t\t}\r\n\t\tif (baseFile == null)\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\tresolvedValue = ElServiceUtil.replaceEl(baseFile, resolvedValue);\r\n \r\n \t\tURI uri = null;\r\n \t\ttry {\r\n \t\t\turi = new URI(resolvedValue);\r\n \t\t} catch (URISyntaxException e) {\r\n \t\t}\r\n \r\n \t\tif ((uri != null)\r\n \t\t\t\t&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\t\r\n\t\t\r\n\t\tIFile resolvedFile = FileUtil.getFile(resolvedValue, baseFile);\r\n\t\tif (resolvedFile != null ) {\r\n\t\t\treturn Constants.FILE_PREFIX + resolvedFile.getLocation().toPortableString();\r\n\t\t} else {\r\n\t\t\treturn resolvedValue;\r\n\t\t}\r\n \t}", "IPath getPath();", "public String getPath() {\n\t\treturn file.getPath();\n\t}", "public synchronized String getPath(long entry) throws IOException,\n EOFException {\n long startOfEntry = IDX_START_OF_CONTENT + (entry * bytesPerSlot);\n idx.seek(startOfEntry);\n if (idx.readChar() == '\\n')\n throw new IllegalStateException(\"No data at address \" + entry);\n idx.skipBytes(bytesPerId + bytesPerType - 2);\n \n byte[] bytes = new byte[bytesPerPath];\n idx.read(bytes);\n String line = new String(bytes, \"utf-8\");\n int delimiter = line.indexOf('\\n');\n if (delimiter < 1)\n throw new IllegalStateException(\"Found path without delimiter\");\n return new String(bytes, 0, delimiter - 1);\n }", "CtPath getPath();", "private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}", "public abstract String getResourcePath(Method method);", "java.lang.String getSrcPath();", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "public Path getPath();", "private String getFilename(String path) {\r\n\t\tint slashHere = path.lastIndexOf('/');\r\n\t\tif (slashHere == -1) {\r\n\t\t\treturn path;\r\n\t\t} else {\r\n\t\t\treturn path.substring(slashHere + 1);\r\n\t\t}\r\n\t}", "public static String getPath(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator))//Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return file_path;\n else\n {\n \t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t return ((new File(file_path)).getParent()).replaceAll(\"/\",\"\\\\\\\\\");\n\t }\n\t //Bug Id 81741, End\n\t else\n return (new File(file_path)).getParent();\n }\n }", "@Override\n\t\tpublic List<String> getPathTo(InJarResourceImpl resource) {\n\t\t\t// TODO FD4SG la ligne ci-dessous est vraiment bizarre (getChildren renvoie une liste de RepositoryFolder alors que resource est\n\t\t\t// une ressource\n\t\t\tif (!getRootFolder().getChildren().contains(resource)) {\n\t\t\t\tList<String> pathTo = new ArrayList<>();\n\t\t\t\tStringTokenizer string = new StringTokenizer(/*resource.getURI()*/resource.getEntry().getName(),\n\t\t\t\t\t\tCharacter.toString(ClasspathResourceLocatorImpl.PATH_SEP.toCharArray()[0]));\n\t\t\t\twhile (string.hasMoreTokens()) {\n\t\t\t\t\tString next = string.nextToken();\n\t\t\t\t\tif (string.hasMoreTokens()) {\n\t\t\t\t\t\tpathTo.add(next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn pathTo;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static Path getFile(final String path) throws URISyntaxException {\n final URL resource = classLoader.getResource(path);\n checkIfFound(resource, path);\n final URI uri = resource.toURI();\n checkIfFound(uri, path);\n File file = new File(uri);\n checkIfFound(file, path);\n return file.toPath();\n }", "private static String getResourceName(String uri) {\r\n int p = uri.lastIndexOf('/');\r\n if (p != -1) {\r\n return uri.substring(p + 1);\r\n } else {\r\n return uri;\r\n }\r\n }", "java.lang.String getResourceUri();", "String getPathName();", "String getPathName();", "public final String getPath()\n {\n return path;\n }", "public String getPathName();", "public static String getAbsoluteFilePath(String relativePath) throws URISyntaxException {\n URL fileResource = BCompileUtil.class.getClassLoader().getResource(relativePath);\n String pathValue = \"\";\n if (null != fileResource) {\n Path path = Paths.get(fileResource.toURI());\n pathValue = path.toAbsolutePath().toString();\n }\n return pathValue;\n }", "protected String path() {\n return path(getName());\n }", "protected String getResourceFileParameter() {\n if (resourceFile != null) {\n return \"/resource=\" + resourceFile.toString();\n } else {\n return null;\n }\n }", "public String getResourcePath () {\n return resourcePath;\n }", "String path(Configuration configuration);", "public Blob getResource(String relativePath) throws DocumentNotFoundException;", "public final String getPath() {\n\t return m_path;\n\t}", "String getResource();", "File getTilePathBase();", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }", "protected String getRelativePath(Path path) {\n\t\treturn baseFolderUri.relativize(path.toUri()).toString();\n\t}", "private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }", "public String getRelativePath() {\n if (repository == null) {\n return name;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(name);\n return b.toString();\n }\n }", "public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }", "public String getResourcePath () {\n return resourcePath;\n }", "public String actualPath(final String path, final int val) {\n\t\tString[] pathArr = {};\n\t\tif (!(\"\").equals(path)) {\n\t\t\tpathArr = path.split(\"/\");\n\t\t}\n\t\tString resource = \"\";\n\t\ttry {\n\t\t\tresource = pathArr[pathArr.length - val];\n\t\t} catch (final ArrayIndexOutOfBoundsException boundsException) {\n\t\t\tboundsException.printStackTrace();\n\t\t}\n\t\treturn resource;\n\t}", "public String getResourcePath() {\n\t\treturn resourcePath;\n\t}", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getLookupPathForRequest(HttpServletRequest request) {\n\t\tif (this.alwaysUseFullPath) {\n\t\t\treturn getPathWithinApplication(request);\n\t\t}\n\t\t// Else, use path within current servlet mapping if applicable\n\t\tString rest = getPathWithinServletMapping(request);\n\t\tif (!\"\".equals(rest)) {\n\t\t\treturn rest;\n\t\t}\n\t\telse {\n\t\t\treturn getPathWithinApplication(request);\n\t\t}\n\t}", "public String getProjectRelativeFileName(URI resourceURI, IFileSystemAccess fsa) {\r\n\t\t// @see http://www.eclipse.org/forums/index.php/m/1230878/#msg_1230878\r\n\t\tif (!resourceURI.isPlatformResource())\r\n\t\t\tthrow new IllegalArgumentException(\"Not a Platform Resource URI: \" + resourceURI.toString());\r\n\t\t// This is bit of a hack, but it works...\r\n\t\tString sURI = resourceURI.toPlatformString(true);\r\n\t\tString withoutProject = sURI.substring(sURI.indexOf('/', 1) + 1);\r\n\t\treturn withoutProject;\r\n\t\t// Something like this may be a better use of the API, but is much more difficult to unit test in EFactoryJSONGeneratorTest, so not pursued: \r\n\t\t// URI projectRootURI = ((IFileSystemAccessExtension2)fsa).getURI(\".\");\r\n\t\t// URI resourceWithoutProjectURI = resourceURI.deresolve(projectRootURI);\r\n\t\t// return resourceWithoutProjectURI.toString();\r\n\t}", "private String getFilePath(String sHTTPRequest) {\n return sHTTPRequest.replaceFirst(\"/\", \"\");\n\n }", "Path getFilePath();", "public static String getFullMethodPath () \t{\n\t\t\n\t\treturn Thread.currentThread().getStackTrace()[2].toString();\n\t}", "public String getFullPathName() {\r\n return fullPathName;\r\n }" ]
[ "0.6772", "0.67516905", "0.6553255", "0.64549935", "0.6427456", "0.6340761", "0.62920916", "0.6283988", "0.6257684", "0.62417275", "0.6105489", "0.6073878", "0.6073878", "0.6073878", "0.6073878", "0.6073878", "0.6054361", "0.59878063", "0.59254616", "0.5919315", "0.5882116", "0.58526015", "0.5851936", "0.5851936", "0.5851936", "0.58200264", "0.58005196", "0.5791067", "0.57743514", "0.5773764", "0.5741916", "0.57269967", "0.5706522", "0.57013625", "0.5667358", "0.56617093", "0.56573856", "0.5638684", "0.5622594", "0.55986094", "0.5597829", "0.558828", "0.55741537", "0.5567639", "0.55665994", "0.55650365", "0.55346876", "0.55307525", "0.5530395", "0.5530395", "0.5495782", "0.54858744", "0.54555565", "0.54381496", "0.5435098", "0.54315764", "0.5428423", "0.54223406", "0.540804", "0.5399755", "0.53949326", "0.5380321", "0.5357474", "0.5354272", "0.534639", "0.5344005", "0.5338419", "0.532258", "0.5322335", "0.53055304", "0.53007156", "0.5282626", "0.52808714", "0.52808714", "0.52655953", "0.5264192", "0.52602965", "0.525382", "0.5247496", "0.5246622", "0.5245998", "0.52395856", "0.5236221", "0.52336663", "0.52236277", "0.52232414", "0.5212066", "0.5204296", "0.5203191", "0.51923835", "0.51914054", "0.5189486", "0.5188306", "0.5181398", "0.5178149", "0.5177659", "0.5176335", "0.51589143", "0.51577824", "0.51531804" ]
0.7184833
0
tport home set [player] [TPort name]
@Override public void run(String[] args, Player player) { if (args.length == 2) { if (!emptySetPlayerTPort.hasPermissionToRun(player, true)) { return; } TPortInventories.openHomeEditGUI(player); } else if (args.length == 3) { if (!emptySetPlayerTPort.hasPermissionToRun(player, true)) { return; } String newPlayerName = args[2]; UUID newPlayerUUID = PlayerUUID.getPlayerUUID(newPlayerName, player); if (newPlayerUUID == null) { return; } TPortInventories.openHomeEdit_SelectTPortGUI(newPlayerUUID, player); } else if (args.length == 4) { if (!emptySetPlayerTPort.hasPermissionToRun(player, true)) { return; } String newPlayerName = args[2]; UUID newPlayerUUID = PlayerUUID.getPlayerUUID(newPlayerName, player); if (newPlayerUUID == null) { return; } TPort tport = TPortManager.getTPort(newPlayerUUID, args[3]); if (tport == null) { sendErrorTranslation(player, "tport.command.noTPortFound", args[3]); return; } Home.setHome(player, tport); sendSuccessTranslation(player, "tport.command.home.set.player.tportName.succeeded", asTPort(tport)); } else { sendErrorTranslation(player, "tport.command.wrongUsage", "/tport home set [player] [TPort]"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}", "public static void set_players(){\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\tbat1=PlayBrain1.myteam[0];\n\t\t\tbat2=PlayBrain1.myteam[1];\n\t\t\tStriker=bat1;\n\t\t\tNonStriker=bat2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\tbat1=PlayBrain1.oppteam[0];\n\t\t\t\tbat2=PlayBrain1.oppteam[1];\n\t\t\t\tStriker=bat1;\n\t\t\t\tNonStriker=bat2;\n\n\t\t\t\t}\n\t}", "public static void setup(TableTop table){\n System.out.println(\"Welcome to Owen's Crazy 8's Program!! Lets get Started.\");\n System.out.println(\"Hello, what is your name?\");\n String name = sc.nextLine();\n HumanPlayer rootPlayer = new HumanPlayer(name);\n table.getHumanPlayers().add(rootPlayer);\n table.setComputers();\n System.out.println(\"Default Computer Names: PC, MAC and AI\\n\"+\n \"Would you like to rename the computers? [Y/N]\");\n String response = sc.next().toLowerCase();\n if (response.equals(\"y\") || response.equals(\"yes\")){\n table.renameComputers();\n }\n }", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void cmdSetPlayer(User teller, Player player, String var, StringBuffer setting) throws MalformedURLException, InvalidNameException {\n String value = setting.toString();\n var = var.toLowerCase();\n if (ComparisionHelper.anyEquals(var, \"name\", \"fullname\")) {\n player.setRealName(value);\n } else if (ComparisionHelper.anyEquals(var, \"handle\", \"username\")) {\n String handle = setting.toString();\n player.setHandle(handle);\n } else if (ComparisionHelper.anyEquals(var, \"title\", \"titles\")) {\n Set<Title> titles = player.getTitles();\n titles.clear();\n String[] titleNames = CollectionHelper.split(value);\n List<Title> newTitles = titleService.lookupAll(titleNames);\n titles.addAll(newTitles);\n } else if (\"rating\".equals(var)) {\n Map<RatingCategory, Integer> ratings = player.ratings();\n if (value.isEmpty()) {\n ratings.remove(USCL_RATING);\n } else {\n int r = Integer.parseInt(value);\n ratings.put(USCL_RATING, r);\n }\n } else if (ComparisionHelper.anyEquals(var, \"web\", \"webpage\", \"website\")) {\n player.setWebsite(value);\n } else {\n command.tell(teller, \"Unknown variable: \" + var);\n return;\n }\n cmdShowPlayer(teller, player);\n cmdRefreshProfile(teller, player);\n tournamentService.updatePlayer(player);\n tournamentService.flush();\n }", "boolean teleport(Player p1, Player p2, boolean change);", "@Override\n\tpublic void setDisplayName(TangentPlayer pl) {\n\t\tgetPlayer().setDisplayName(pl.getName());\n\t}", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "boolean setPlayer(String player);", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}", "private void manualCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new HumanPlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }", "public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}", "public void setHost(Player roomHost) {\r\n this.roomHost = roomHost;\r\n }", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public void setPlayer(ViewerManager2 player) {\n this.player = player;\n // the player is needed to be existent befor starting up the remote Server\n //startRemoteServer();\n\n }", "public void setPlayers(Hashtable<Integer, Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "public void setPlayer1Name(String name){\n player1 = name;\n }", "public void setPlayer(int play)\n {\n this.player=play;\n }", "public void setComputerPlayer(ComputerPlayer computer) {\r\n\t\tai = computer;\r\n\t\tsuper.setComputerPlayer();\r\n\t\tsetPlayerName(ai.getName() + \"_\" + getPlayerNum());\r\n\t}", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "public void setP1(ServerPlayer p1) {\r\n\t\tthis.p1 = p1;\r\n\t}", "public static void setup(){\n\t\tfor(int i=0;i<9;i++){\r\n\t\t\tTicTac.place[i]='_';\r\n\t\t}\r\n\t\tdrawBoard();\r\n\t\twhile((TicTac.team != 'X') && (TicTac.team != 'O')){\r\n\t\t\tSystem.out.println(\"\\n\\nselect your team enter X or O below\");\r\n\t\t\tSystem.out.print(\"Enter your selection:\");\r\n\t\t\tScanner input=new Scanner(System.in);\r\n\t\t\tTicTac.usrStr=input.next();\r\n\t\t\tif(TicTac.usrStr.toUpperCase().equals(\"X\")){\r\n\t\t\t\tTicTac.team='X';\r\n\t\t\t\tTicTac.opp='O';\r\n\t\t\t}\r\n\t\t\telse if(TicTac.usrStr.toUpperCase().equals(\"O\")){\r\n\t\t\t\tTicTac.team='O';\r\n\t\t\t\tTicTac.opp='X';\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"You entered :\"+usrStr);{\r\n\t\t\t\t\tSystem.out.println(\"this is not a valid optiuon plase enter either X or O to continue\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"you are team\"+TicTac.team);\r\n\t\tgame();\r\n\t}", "public void setP1(Player p1) {\n this.p1 = p1;\n }", "public void setName(String name)\n {\n playersName = name;\n }", "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "private void transportPara() {\n int[] para = bottom_screen.transportPara();\n Attack_Menu.setHp_1(para[0]);\n Attack_Menu.setHp_2(para[1]);\n Attack_Menu.setDamage_1(para[2]);\n Attack_Menu.setDamage_2(para[3]);\n Attack_Menu.setHit_1(para[4]);\n Attack_Menu.setHit_2(para[5]);\n Attack_Menu.setCrit_1(para[6]);\n Attack_Menu.setCrit_2(para[7]);\n Attack_Menu.setTurn_1(para[8]);\n Attack_Menu.setTurn_2(para[9]);\n }", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "void setPlayerLocation(Player p, int bp) {\n\t\t\tplayerLocationRepo.put(p, bp);\n\t\t}", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "protected abstract void assignTeam(boolean playerR, boolean playerB);", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}", "public static void WorkAtCompany(Player gamer){\r\n gamer.zen = gamer.zen-30;\r\n gamer.money = gamer.money+10;\r\n gamer.turn = gamer.turn+1; \r\n }", "@Override\n\tpublic void setHomeTeam() {\n\t\t\n\t}", "public TapeHead preparePlayer() {\n \treturn this.table.createHead(1);\t\n }", "@Override\r\n public void sendSetUp(PrivateObjectiveCard pr, ArrayList<PublicObjectiveCard> pu, ArrayList<Integer> pa) {\r\n\r\n sendObject(new SetupNetObject(MessageHeaderEnum.SETUP.toString(),pr,pu,pa));\r\n\r\n }", "public void setOwner(Player player) {\n owner = player;\n }", "public void townSet(Player player, String[] split) {\n\t\tif (split.length == 0) {\n\t\t\tplayer.sendMessage(ChatTools.formatTitle(\"/town set\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"board [message ... ]\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"mayor [mayor] *[town]\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"homeblock\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"spawn\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"perm ...\", \"'/town set perm' for help\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"pvp [on/off]\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"taxes [$]\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"plottax [$]\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"plotprice [$]\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"name [name]\", \"\"));\n\t\t\tplayer.sendMessage(ChatTools.formatCommand(\"\", \"/town set\", \"public [on/off]\", \"\"));\n\t\t} else {\n\t\t\tResident resident;\n\t\t\tTown town;\n\t\t\ttry {\n\t\t\t\tresident = plugin.getTownyUniverse().getResident(player.getName());\n\t\t\t\ttown = resident.getTown();\n\t\t\t\tif (!resident.isMayor())\n\t\t\t\t\tif (!town.hasAssistant(resident))\n\t\t\t\t\t\tthrow new TownyException(\"You are not the mayor or an assistant.\");\n\t\t\t} catch (TownyException x) {\n\t\t\t\tplugin.sendErrorMsg(player, x.getError());\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// TODO: Let admin's call a subfunction of this.\n\t\t\tif (split[0].equalsIgnoreCase(\"board\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set board Today's the day!\");\n\t\t\t\telse {\n\t\t\t\t\tString line = split[1];\n\t\t\t\t\tfor (int i = 2; i < split.length; i++)\n\t\t\t\t\t\tline += \" \" + split[i];\n\t\t\t\t\ttown.setTownBoard(line);\n\t\t\t\t\tplugin.getTownyUniverse().sendTownBoard(player, town);\n\t\t\t\t}\n\t\t\t} else if (split[0].equalsIgnoreCase(\"mayor\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set mayor Dumbo\");\n\t\t\t\telse\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString oldMayor = town.getMayor().getName();\n\t\t\t\t\t\tResident newMayor = plugin.getTownyUniverse().getResident(split[1]);\n\t\t\t\t\t\ttown.setMayor(newMayor);\n\t\t\t\t\t\tplugin.deleteCache(oldMayor);\n\t\t\t\t\t\tplugin.deleteCache(newMayor.getName());\n\t\t\t\t\t\tplugin.getTownyUniverse().sendTownMessage(town, TownySettings.getNewMayorMsg(newMayor.getName()));\n\t\t\t\t\t} catch (TownyException e) {\n\t\t\t\t\t\tplugin.sendErrorMsg(player, e.getError());\n\t\t\t\t\t}\n\t\t\t} else if (split[0].equalsIgnoreCase(\"taxes\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set taxes 7\");\n\t\t\t\telse\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttown.setTaxes(Integer.parseInt(split[1]));\n\t\t\t\t\t\tplugin.getTownyUniverse().sendTownMessage(town, player.getName() + \" has set the daily resident tax at \" + split[1]);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tplugin.sendErrorMsg(player, \"Taxes must be an interger.\");\n\t\t\t\t\t}\n\t\t\t} else if (split[0].equalsIgnoreCase(\"plottax\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set plottax 10\");\n\t\t\t\telse\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttown.setPlotTax(Integer.parseInt(split[1]));\n\t\t\t\t\t\tplugin.getTownyUniverse().sendTownMessage(town, player.getName() + \" has set the daily tax of plots at \" + split[1]);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tplugin.sendErrorMsg(player, \"The tax must be an interger.\");\n\t\t\t\t\t}\n\t\t\t} else if (split[0].equalsIgnoreCase(\"plotprice\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set plotprice 50\");\n\t\t\t\telse\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttown.setPlotPrice(Integer.parseInt(split[1]));\n\t\t\t\t\t\tplugin.getTownyUniverse().sendTownMessage(town, player.getName() + \" has set the price of plots at \" + split[1]);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tplugin.sendErrorMsg(player, \"The price must be an interger.\");\n\t\t\t\t\t}\n\t\t\t} else if (split[0].equalsIgnoreCase(\"name\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set name BillyBobTown\");\n\t\t\t\telse\n\t\t\t\t\ttownRename(player, town, split[1]);\n\t\t\t} else if (split[0].equalsIgnoreCase(\"homeblock\")) {\n\t\t\t\tCoord coord = Coord.parseCoord(player);\n\t\t\t\tTownBlock townBlock;\n\t\t\t\ttry {\n\t\t\t\t\tif (plugin.getTownyUniverse().isWarTime())\n\t\t\t\t\t\tthrow new TownyException(\"You cannot do this when the world is at war.\");\n\t\t\t\t\t\n\t\t\t\t\ttownBlock = plugin.getTownyUniverse().getWorld(player.getWorld().getName()).getTownBlock(coord);\n\t\t\t\t\ttown.setHomeBlock(townBlock);\n\t\t\t\t\tplugin.sendMsg(player, \"Successfully changed town's home block to \" + coord.toString());\n\t\t\t\t} catch (TownyException e) {\n\t\t\t\t\tplugin.sendErrorMsg(player, e.getError());\n\t\t\t\t}\n\t\t\t} else if (split[0].equalsIgnoreCase(\"spawn\"))\n\t\t\t\ttry {\n\t\t\t\t\ttown.setSpawn(player.getLocation());\n\t\t\t\t\tplugin.sendMsg(player, \"Successfully changed town's spawn.\");\n\t\t\t\t} catch (TownyException e) {\n\t\t\t\t\tplugin.sendErrorMsg(player, e.getError());\n\t\t\t\t}\n\t\t\telse if (split[0].equalsIgnoreCase(\"perm\")) {\n\t\t\t\tString[] newSplit = StringMgmt.remFirstArg(split);\n\t\t\t\tsetTownBlockOwnerPermissions(player, town, newSplit);\n\t\t\t\tplugin.updateCache();\n\t\t\t} else if (split[0].equalsIgnoreCase(\"pvp\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set pvp [on/off]\");\n\t\t\t\telse\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttown.setPVP(parseOnOff(split[1]));\n\t\t\t\t\t\tplugin.sendMsg(player, \"Successfully changed town's pvp setting.\");\n\t\t\t\t\t\t// TODO: send message to all with town\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t} else if (split[0].equalsIgnoreCase(\"public\")) {\n\t\t\t\tif (split.length < 2)\n\t\t\t\t\tplugin.sendErrorMsg(player, \"Eg: /town set public [on/off]\");\n\t\t\t\telse\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttown.setPublic(parseOnOff(split[1]));\n\t\t\t\t\t\tplugin.sendMsg(player, \"Successfully made town \"+(town.isPublic() ? \"\" : \"not \")+\"public.\");\n\t\t\t\t\t\t// TODO: send message to all with town\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tplugin.sendErrorMsg(player, \"Invalid town property.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tplugin.getTownyUniverse().getDataSource().saveTown(town);\n\t\t}\n\t}", "public void welcomePlayer(Player p);", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "public void manualCommand(Piece p) {\r\n _playing = false;\r\n _players[p.ordinal()] = new HumanPlayer(p, this);\r\n }", "public void setPlayerName(String name) {\n \tplayername = name;\n }", "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "public void setMove(char player, int place) {\n\n playBoard[place] = player;\n }", "public void setPlayer2Name(String name){\n player2 = name;\n }", "void sendPacketToPlayer(Player player, Object packet);", "public void setCurrent(ServerPlayer p) {\n\t\tthis.current = p;\n\t}", "public void setNames() {\n\t\tPlayer1 = \"COMPUTER\";\n\t\tPlayer2 = JOptionPane.showInputDialog(null, \"Enter your Name:\");\n\t\tnames_set = true;\n\t}", "void setUpPlayerNames() {\n playerName.setText(this.player1.getName());\n computerName.setText(this.computer.getName());\n }", "public static void setTeam(UserTeam team) {\n\t\tgame.setTmpTeam(team);\n\t\tint i=0;\n\t\tfor (Iterator<FootballPlayer> iterator = team.getPlayers().values().iterator(); iterator\n\t\t\t\t.hasNext();) {\n\t\t\tFootballPlayer player = iterator.next();\n\t\t\tnamesLabels.get(i).setText(game.getLastName(player.getName()));\n\t\t\tshirtLabels.get(i).setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[i].setText(\"X\");\n\t\t\ti++;\n\t\t}\n\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}", "void makePlay(int player) {\n }", "protected void setFirstPlayer(TennisPlayer tennisPlayer) {\r\n this.firstPlayer = tennisPlayer;\r\n }", "void setPlayerTurn() throws RemoteException;", "public void Slash(Pokemon opponent, boolean isComputer)\r\n {\r\n window.addToTextBox(\"Scyther used Slash!\");\r\n damage = 70;\r\n accuracy = 100;\r\n abilityType = \"Normal\";\r\n useAbility(opponent, damage, accuracy, abilityType, isComputer);\r\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setMove(int hash, Player player) {\n board[hash] = player;\n numMoves++;\n }", "@Override\n public void antidote(Player p) {\n LOG.wtf(this.getClass().getSimpleName(), \"ANTIDOTE SET TO \" + p.toString());\n }", "private void switchPlayer() {\n Player player;\n playerManager.switchPlayer();\n\n if(playerManager.getCurrentPlayer() == 1)\n player = playerManager.getPlayer(1);\n else if(playerManager.getCurrentPlayer() == 2)\n player = playerManager.getPlayer(2);\n else\n player = new Player(\"No Player exists\");\n\n updateLiveComment(\"Turn : \" + player.getName());\n }", "private void autoCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new MachinePlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }", "public void setParty(Pokemon[] team)\n\t{\n\t\tm_pokemon = team;\n\t}", "public abstract void changePlayerAt(ShortPoint2D pos, Player player);", "private void ReplacePlayer()\n {\n String oldPlayer = GetPlayerString(mTeamsComboBox.getSelectedItem().toString(),\n mPositionComboBox.getSelectedItem().toString());\n if( oldPlayer == null )\n return;\n\n String newPlayer = GetPlayerString_UI();\n String team = mTeamsComboBox.getModel().getElementAt(mTeamsComboBox.getSelectedIndex()).toString();\n ReplacePlayer(team, oldPlayer, newPlayer);\n }", "public void switchPlayer() {\r\n\t\tif (player == player1) {\r\n\t\t\tplayer = player2;\r\n\t\t} else {\r\n\t\t\tplayer = player1;\r\n\t\t}\r\n\t}", "public void setUpPlayers(){\n\t\tTreeMap<String,Integer> turnsDetails = new TreeMap<>();\n\t\tint e = 0;\n\t\tfor(Player i : allplayers) {\n\t\t\ti.fillHand();\n\t\t\tturnsDetails.put(i.getFirstLetter()+String.valueOf(e),e);\n\t\t\te++;\n\t\t}\n\t\t// populate the turn list\n //entryset returns a set view of mappings contained\n\t\tfor(Map.Entry<String,Integer> i : turnsDetails.entrySet())\n\t\t\tturns.add(i.getValue());\n\t}", "void setPosition(Tile t);", "public void setToPlayer(Player player)\n \t{\n \t\t// Define the inventory\n \t\tPlayerInventory inventory = player.getInventory();\n \n \t\t// Clear it all first\n \t\tinventory.clear();\n \t\tinventory.setHelmet(new ItemStack(Material.AIR));\n \t\tinventory.setChestplate(new ItemStack(Material.AIR));\n \t\tinventory.setLeggings(new ItemStack(Material.AIR));\n \t\tinventory.setBoots(new ItemStack(Material.AIR));\n \n \t\t// Set the armor contents\n \t\tif(this.helmet != null) inventory.setHelmet(this.helmet.toItemStack());\n \t\tif(this.chestplate != null) inventory.setChestplate(this.chestplate.toItemStack());\n \t\tif(this.leggings != null) inventory.setLeggings(this.leggings.toItemStack());\n \t\tif(this.boots != null) inventory.setBoots(this.boots.toItemStack());\n \n \t\t// Set items\n \t\tfor(int i = 0; i < 35; i++)\n \t\t{\n\t\t\tinventory.setItem(i, this.items[i].toItemStack());\n \t\t}\n \n \t\t// Delete\n \t\tDemigodsData.jOhm.delete(PlayerCharacterInventory.class, id);\n \t}", "public void setPhase(String newPhase,Player newPlayer) {\n\t\tthis.phase = newPhase;\n\t\tthis.p = newPlayer;\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t\tthis.action=\"\";\t//Cleaning up the previous action after it has been displayed\n\t}", "public void turnToPlay(Player opponent) {\n\n }", "public static void AutoTransferForTeam(Team t, Team playersTeam, Library library) {\n\t\t\n\t\tArrayList<Player> allplayers = new ArrayList<Player>();\n\t\tfor (int i=0;i<library.getLibrary().size();i++) {\n\t\t\tTeam team = library.getLibrary().get(i);\n\t\t\tfor (int j=0;j<team.getTeam().size();j++) {\n\t\t\t\tallplayers.add(team.getTeam().get(j));\n\t\t\t}\n\t\t}\n\t\t\n\t\tString type=\"\";\n\t\tTeamRating tr = TeamRating.calculateTeamRating(t);\n\t\tif (tr.getFinishing()<=tr.getDribbling() && tr.getFinishing()<=tr.getDefending() && tr.getFinishing()<=tr.getStamina() && tr.getFinishing() <=tr.getGoalkeeping()) {\n\t\t\ttype=\"Attacker\";\n\t\t}\n\t\telse if (tr.getDefending()<=tr.getFinishing() && tr.getDefending()<=tr.getStamina() && tr.getDefending()<=tr.getDribbling() && tr.getDefending()<=tr.getGoalkeeping()) {\n\t\t\ttype=\"Defender\";\n\t\t}\n\t\telse if (tr.getGoalkeeping()<=tr.getFinishing() && tr.getGoalkeeping()<=tr.getDribbling() && tr.getGoalkeeping()<=tr.getStamina() && tr.getGoalkeeping()<=tr.getDefending()) {\n\t\t\ttype=\"Goalkeeper\";\n\t\t} else {\n\t\t\ttype = \"Midfielder\";\n\t\t}\n\t\t\n\t\tArrayList<Player> options = new ArrayList<Player>();\n\t\tfor (Player p:allplayers) {\n\t\t\tif ((!(playersTeam.getTeam().contains(p) || t.getTeam().contains(p)) && p.getPlayerType().equals(type) && p.getPrice().doubleValue()*1.1<=t.getBudget())) {\n\t\t\t\toptions.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\tPlayer[] players = new Player[options.size()];\n\t\tfor (int i=0;i<players.length;i++) {\n\t\t\tplayers[i]=options.get(i);\n\t\t}\n\t\t\n\t\tPlayer temp;\n\t\tif(players.length==0) {\n\t\t\t\n\t\t}\n\t\tfor (int j=0;j<players.length;j++) {\n\t\t\tfor (int i=1;i<players.length;i++) {\n\t\t\t\tif (players[i-1].getPrice().doubleValue()>players[i].getPrice().doubleValue()) {\n\t\t\t\t\ttemp=players[i];\n\t\t\t\t\tplayers[i]=players[i-1];\n\t\t\t\t\tplayers[i-1]=temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tPlayer[] players2 = new Player[players.length];\n\t\tfor (int i=0;i<players2.length;i++) {\n\t\t\tplayers2[i]=players[players.length-1-i];\n\t\t}\n\t\t\n\t\tif (players2.length!=0) {\n\t\t\n\t\t\tPlayer theplayer = null;\n\t\t\tint random = GameLogic.randomGenerator(1, 1000);\n\t\t\tint random2=0;\n\t\t\tif (random<=500) {\n\t\t\t\trandom2=GameLogic.randomGenerator(0,(int) (players2.length*0.2));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer = players2[random2];\n\t\t\t} if (random >500 && random <=750) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.2), (int) (players2.length*0.4));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t} if (random>750 && random<=875) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.4), (int) (players2.length*0.7));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t} if (random>875) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.7), (int) (players2.length-1));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t}\n\t\t\t\n\t\t\tTeam t2 = library.getTeamForName(theplayer.getTeam());\n\t\t\tTransferLogic.requestTransfer(theplayer, t, 1.1*theplayer.getPrice().doubleValue(), library, new TransferList());\n\t\t\t\n\t\t}\n\t}", "public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }", "public void cmdSetTeam(User teller, Team team, String var, StringBuffer setting) throws MalformedURLException, InvalidNameException {\n String value = setting.toString();\n var = var.toLowerCase();\n if (\"name\".equals(var)) {\n team.setRealName(value);\n } else if (ComparisionHelper.anyEquals(var, \"loc\", \"loc.\", \"location\")) {\n team.setLocation(value);\n } else if (ComparisionHelper.anyEquals(var, \"web\", \"webpage\", \"website\")) {\n team.setWebsite(value);\n } else if (ComparisionHelper.anyEquals(var, \"div\", \"division\")) {\n team.setDivision(value);\n } else {\n command.tell(teller, \"Unknown variable: \" + var);\n return;\n }\n cmdShowTeam(teller, team);\n tournamentService.updateTeam(team);\n tournamentService.flush();\n }", "public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}", "public void saveHumanMove(String s, int m, int numPlayer){}", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}", "default void interactWith(Teleporter tp) {\n\t}", "public void setValue(Player player, T value) {\n\t\tsetValue(player.getUniqueId(), value);\n\t}", "Player(String name){\n\t\tthis.name = name;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void sendFakeTeam(Player player) {\n\t\tPacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);\n\t\tpacket.getStrings().write(0, FakeTeamName);\n\t\tpacket.getIntegers().write(1, 0); // Set create mode\n\t\tpacket.getStrings().write(5, \"never\"); // Push type\n\t\t\n\t\tCollection<String> names = packet.getSpecificModifier(Collection.class).read(0);\n\t\tnames.add(player.getName());\n\t\t\n\t\ttry {\n\t\t\tProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// Should never happen unless packet changes\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "@Override\n\tpublic void transferTo(Player player) {\n\t\tSystem.out.println(\"Hey you are in snake mouth, Now got to tail\");\n\t\tplayer.move(getTransferFactor()); \n\t\t\n\t\t\n\t}", "private void swapTeamMembers() {\n // GUI call\n String[] argsArray = new String[0];\n SwapTeamGUI.main(argsArray);\n }", "public void setPlayerAttributes(String title, Player p) {\t\n\t\tname_Class.setText(title);\n\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\tString outDMG = Integer.toString(p.getDMG());\n\t\tgdmg.setText(outDMG);\n\t\tString outEV = Integer.toString(p.getEV());\n\t\tgev.setText(outEV);\n\t\tthis.p=p.copy();\n\t}", "public void autoCommand(Piece p) {\r\n _playing = false;\r\n _players[p.ordinal()] = new MachinePlayer(p, this);\r\n }", "public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }", "void sendPacket(Player player, Object packet);", "@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}", "public void teleport(boolean penalty) { \n\t\tPublisher teleport_h = new Publisher(\"/ariac_human/go_home\", \"std_msgs/Bool\", bridge);\n\t\tif(penalty)\t\n\t\t\tteleport_h.publish(new Bool(true));\t\n\t\telse\n\t\t\tteleport_h.publish(new Bool(false));\t\n\n\t\t// Reset \"smart\" orientation variables\n\t\tlastHumanState_MsgT = System.currentTimeMillis();\n\t\tlastUnsafeD_MsgT = System.currentTimeMillis();\n\t\tpreviousDistance = 50.0;\n\t\tisAproximating = false;\n\t}", "private void setCurrentTurnpike(Point t){\n\t\t\n\t\t_currentTurnpikeStart = t;\n\t\n\t}", "public void setPlayboard(Playboard playboard);", "public void setPC(PDAction pc) {\n/* 296 */ this.actions.setItem(\"PC\", (COSObjectable)pc);\n/* */ }", "void fireShellAtOpponent(int playerNr);", "public void setPlayers(int theCompPlayer) throws Exception {\r\n\t\tswitch(theCompPlayer) {\r\n\t\t\tcase 1:\r\n\t\t\t\tcompPlayer = 1;\r\n\t\t\t\totherPlayer = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tcompPlayer = 2;\r\n\t\t\t\totherPlayer = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception(\"That player number is invalid\");\r\n\t\t}\r\n\t}", "public void setTeam(String team) {\n\t\tthis.teamOfPlayer = team;\n\t}" ]
[ "0.64553744", "0.6415346", "0.6128763", "0.61122054", "0.60337377", "0.59925973", "0.59869283", "0.5976126", "0.59162533", "0.5884636", "0.58499694", "0.5844439", "0.5817372", "0.5792887", "0.57808506", "0.5765065", "0.5757662", "0.57481205", "0.57436585", "0.5742053", "0.5736491", "0.5713188", "0.5700702", "0.5699033", "0.56911683", "0.56554335", "0.5653301", "0.5652903", "0.56487453", "0.56405586", "0.5640049", "0.5639605", "0.56314886", "0.5584699", "0.5584405", "0.55822223", "0.5542283", "0.55378705", "0.5537782", "0.55199146", "0.5518302", "0.5512322", "0.55122507", "0.55105585", "0.54996586", "0.54970866", "0.549483", "0.5489114", "0.5484209", "0.54751414", "0.54708874", "0.54485637", "0.54408205", "0.54396623", "0.54359686", "0.5422989", "0.54227453", "0.5422216", "0.54154277", "0.5412853", "0.54113406", "0.5404989", "0.53980213", "0.5396905", "0.539087", "0.5383108", "0.53823215", "0.53766733", "0.5374194", "0.5370776", "0.53603774", "0.53569114", "0.5347118", "0.5343567", "0.53379244", "0.53336275", "0.5333511", "0.5330265", "0.53274643", "0.5327419", "0.5312546", "0.5312144", "0.5298629", "0.5295651", "0.5287171", "0.5286239", "0.5284457", "0.52797204", "0.5279689", "0.5270476", "0.5266835", "0.5265822", "0.5265472", "0.5265282", "0.52646875", "0.5244926", "0.5243496", "0.52431536", "0.5240643", "0.52357733" ]
0.681559
0
final Position posit1 = new Position(3207,3220,2); final Position posit2 = new Position(3207,3219,2); final Position posit3 = new Position(3207,3218,2); final Position posit4 = new Position(3208,3220,2); final Position posit5 = new Position(3208,3219,2); final Position posit6 = new Position(3208,3218,2); final Position posit7 = new Position(3209,3220,2); final Position posit8 = new Position(3209,3219,2); final Position posit9 = new Position(3209,3218,2);
public int onLoop() throws InterruptedException{ if(inventory.isFull()) { inventory.dropAll("Logs"); sleep(random(2500,4000)); shortTermAntiban(); }else { cutTree(); sleep(random(500,1000)); } return 500; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void parsePosition(String[] pos){\n\t\tint x,y;\n\t\tleftScale=Double.parseDouble(pos[3])/(leftBitmap.getWidth()*1.0/2);\n\t\tscale(ib_analog_l,leftBitmap,leftScale);\n\t\tint i=0;\n\t\tsetMode(Integer.parseInt(pos[i++]));\n\t\tif(isMode(MODE1)){\n\t\t\tbutton_mode1.setChecked(true);\n\t\t}\n\t\tif(isMode(MODE2)){\n\t\t\trightScale=Double.parseDouble(pos[22])/(rightBitmap.getWidth()*1.0/2);\n\t\t\tscale(ib_analog_r,rightBitmap,rightScale);\n\t\t\tbutton_mode2.setChecked(true);\n\t\t\t\n\t\t}\n\t\tx=Integer.parseInt(pos[i++]);\n\t\ty=Integer.parseInt(pos[i++]);\n\t\tmoveView(ib_analog_l, x, y);\n\t\tleftEnable.setChecked(x>0&&y>0?true:false);\n\t\ti++;\n\t\tmoveView(button_a, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_b, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_x, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_y, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tif(isMode(MODE1))\n\t\t\tmoveView(button_l, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\telse\n\t\t\tmoveView(button_xl, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tif(isMode(MODE1))\n\t\t\tmoveView(button_r, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\telse\n\t\t\tmoveView(button_xr, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tif(isMode(MODE1))\n\t\t\tmoveView(button_l2, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\telse\n\t\t\tmoveView(button_xl2, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tif(isMode(MODE1))\n\t\t\tmoveView(button_r2, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\telse\n\t\t\tmoveView(button_xr2, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\t\n\t\tif(isMode(MODE1)){\n\t\t\tsetCheckedVisual2(Integer.parseInt(pos[i++]));\n\t\t\tx=Integer.parseInt(pos[i++]);\n\t\t\ty=Integer.parseInt(pos[i++]);\n\t\t\t//moveView(ib_analog_view, x, y);\n\t\t\tmoveView(ib_analog_view, width*3/4, height/2);\n\t\t\tviewEnable.setChecked(x>0&&y>0?true:false);\n\t\t\tmovePosition(ib_analog_r,x,y);\n\t\t}else if(isMode(MODE2)){\n\t\t\tx=Integer.parseInt(pos[i++]);\n\t\t\ty=Integer.parseInt(pos[i++]);\n\t\t\tmoveView(ib_analog_r, x, y);\n\t\t\trightEnable.setChecked(x>0&&y>0?true:false);\n\t\t\ti++;\n\t\t\tmovePosition(ib_analog_view, width*3/4, height/2);\n\t\t}else if(isMode(MODE_NULL)){\n\t\t\ti+=3;\n\t\t}\n\t\tmoveView(button_left, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_right, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_up, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_down, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_l3, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_r3, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_start, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t\tmoveView(button_select, Integer.parseInt(pos[i++]), Integer.parseInt(pos[i++]));\n\t}", "@Test\n public void testGeneratePositionsFrom() {\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n Position position = new Position(line, column);\n assertNotNull(this.board.generatePositionsFrom(position));\n }\n }\n }", "@Test\n public void testGetPosition() {\n assertEquals(r1.getPosition(), new Position2D(50, 75));\n assertEquals(r2.getPosition(), new Position2D(-50, 75));\n assertEquals(r3.getPosition(), new Position2D(50, -75));\n assertEquals(r4.getPosition(), new Position2D(-50, -75));\n }", "Position_Position createPosition_Position();", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "Position getNewPosition();", "Position createPosition();", "public void testBoardAvailablePositions() {\n \tassertTrue(board6.hasAvailablePositionsForTile());\n \tList<PlacementLocation> expected = new ArrayList<PlacementLocation>();\n \tboard6.place(new Placement(Color.RED, 5, 21, Color.RED, 4, 16));\n \tboard6.place(new Placement(Color.RED, 4, 12, Color.RED, 5, 14));\n \tboard6.place(new Placement(Color.RED, 4, 8, Color.RED, 5, 11));\n \tboard6.place(new Placement(Color.RED, 5, 4, Color.RED, 4, 4));\n \tboard6.place(new Placement(Color.RED, 5, 1, Color.RED, 4, 0));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(5, 26))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 20))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(5, 24))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 29))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 30))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(6, 31))));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(5, 23))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(3, 15))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(5, 27))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 33))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 35))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 37))));\n \t\n \t\n \tfor (PlacementLocation location : board6.getAvailablePositionsForTile()) {\n \t\tif (!expected.contains(location))\n \t\t\tSystem.out.println(\"expected does not contain location: \" + location);\n \t}\n \tSet<PlacementLocation> locations = board6.getAvailablePositionsForTile();\n \tfor (PlacementLocation location : locations) {\n \t\tSystem.out.println(location);\n \t}\n \tfor (PlacementLocation location : expected) {\n \t\tif (!locations.contains(location))\n \t\t\tSystem.out.println(\"expected2 does not contain location: \" + location);\n \t}\n \t\n \tassertEquals(expected, board6.getAvailablePositionsForTile());\n \t\n \t\n }", "public void setCoordinates(int pos){\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE-pos;}\n else{\n this.coordinates[0]=pos;}\n if(this.pIndex%3==0){\n this.coordinates[1]=pos;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE-pos;}\n }", "public void case4_Position() {\r\n Position testPosition = new Position(0,0);\r\n\r\n }", "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 }", "public int mo8466a(int position) {\n int size = this.f3532b.size();\n for (int i = 0; i < size; i++) {\n C1070b op = (C1070b) this.f3532b.get(i);\n int i2 = op.f3539a;\n if (i2 != 1) {\n if (i2 == 2) {\n int i3 = op.f3540b;\n if (i3 <= position) {\n int i4 = op.f3542d;\n if (i3 + i4 > position) {\n return -1;\n }\n position -= i4;\n } else {\n continue;\n }\n } else if (i2 == 8) {\n int i5 = op.f3540b;\n if (i5 == position) {\n position = op.f3542d;\n } else {\n if (i5 < position) {\n position--;\n }\n if (op.f3542d <= position) {\n position++;\n }\n }\n }\n } else if (op.f3540b <= position) {\n position += op.f3542d;\n }\n }\n return position;\n }", "private int[] defineStartingPos() {\n\t\tint[] positions = new int[4];\n\t\tif(initPos.equals(UP)) {\n\t\t\tpositions[0] = 0;\n\t\t\tpositions[1] = (size-1)/2;\n\t\t\tpositions[2] = 1;\n\t\t}else if(initPos.equals(DOWN)) {\n\t\t\tpositions[0] = size-1;\n\t\t\tpositions[1] = (size-1)/2;\n\t\t\tpositions[2] = -1;\n\t\t}else if(initPos.equals(LEFT)) {\n\t\t\tpositions[0] = (size-1)/2;\n\t\t\tpositions[1] = 0;\n\t\t\tpositions[3] = 1;\n\t\t}else if(initPos.equals(RIGHT)) {\n\t\t\tpositions[0] = (size-1)/2;\n\t\t\tpositions[1] = size-1;\n\t\t\tpositions[3] = -1;\n\t\t}\n\t\treturn positions;\n\t}", "void position(double x, double y, double z);", "public void initPos(){\r\n for (int i=0; i< MAX_LENGTH; i++){\r\n pos[i] = i;\r\n }\r\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 static int[] posNos(String position)\n\t{\n\t\tint[] pos = new int[2];\n\t\tfor(int rows = 0; rows < 8; rows++)\n\t\t{\n\t\t\tfor(int cols = 0; cols < 8; cols++)\n\t\t\t{\n\t\t\t\tif(posMap[rows][cols].equals(position))\n\t\t\t\t{\n\t\t\t\t\tpos[0] = rows; pos[1] = cols;\n\t\t\t\t\treturn pos;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}", "Position_abscisse createPosition_abscisse();", "private PositionGroup generatePositionGroupAt(int pos){\n PositionGroup pg = new PositionGroup();\n if (isTokenInterruptable(pos)){\n RegexGroup rg1 = ParseLeft(pos);\n RegexGroup rg2 = ParseRight(pos);\n for (int i = 0; i < rg1.getSize(); i++)\n for (int j = 0; j < rg2.getSize(); j++){\n Regex r1 = rg1.getRegexAt(i);\n Regex r2 = rg2.getRegexAt(j);\n if (r1.isVoid() && r2.isVoid())\n continue;\n Regex r12;\n if (r1.isVoid()){\n r12 = r2.clone();\n }else if (r2.isVoid()){\n r12 = r1.clone();\n }else {\n r12 = r1.clone();\n r12.addRegex(r2);\n }\n RegexOccurrence occur = getOccurrenceNumber(r12, pos);\n int occur_num = occur.occur_num;\n int appear = occur.appear;\n pg.AddPosition(new Pos(r1, r2, appear));\n pg.AddPosition(new Pos(r1, r2, appear-occur_num-1));\n }\n }\n //pg.AddPosition(new CPos(pos));\n //pg.AddPosition(new CPos(-(Input.length()-pos+1)));\n if (pg.getSize() == 0)\n return null;\n return pg;\n }", "public static void main(String[] args) {\r\n\t\tPosition p2 = new Position(47.984393, 0.236012);\r\n\t\t/*graine*/\r\n\t\tPosition p1 = new Position(47.987444,0.253475);\r\n\t\t\r\n\t\tFourmi fourmi = new Fourmi();\r\n\t\tChemin trackAllerGraine1;\r\n\t\tChemin trackRetourGraine1;\r\n\t\t\r\n\t\tChemin c = new Chemin();\r\n\t\tChemin c1 = new Chemin();\r\n\t\ttry {\r\n\t\t\tc.calculItineraire(p2,p1);\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\tc.add(p1);\r\n\t\ttrackAllerGraine1 = fourmi.creerTrack(c);\r\n\t\r\n\t\t\r\n\r\n\t\tfor(int i=0;i<trackAllerGraine1.size()-1;i++) {\r\n\t\t\tSystem.out.println(\"\\np\"+i+\" : \"+trackAllerGraine1.get(i).lat+\",\"+trackAllerGraine1.get(i).lon);\r\n\t\t\tSystem.out.println(trackAllerGraine1.get(i).getTimestamp());\r\n\t\t\tSystem.out.println(\"La distance entre ces deux points est de \"+p1.longueurEnM(trackAllerGraine1.get(i),trackAllerGraine1.get(i+1))+\"m\");\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"p\"+(trackAllerGraine1.size()-1)+\" : \"+trackAllerGraine1.get(trackAllerGraine1.size()-1).lat+\",\"+trackAllerGraine1.get(trackAllerGraine1.size()-1).lon);\r\n\t\tSystem.out.println(trackAllerGraine1.get(trackAllerGraine1.size()-1).getTimestamp());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tc1.calculItineraire(p1, p2);\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\tc1.add(p2);\r\n\t\ttrackRetourGraine1=fourmi.creerTrack(c1);\r\n\t\t\r\n\t\tfor(int i=0;i<trackRetourGraine1.size()-1;i++) {\r\n\t\t\tSystem.out.println(\"\\np\"+i+\" : \"+trackRetourGraine1.get(i).lat+\",\"+trackRetourGraine1.get(i).lon);\r\n\t\t\tSystem.out.println(trackRetourGraine1.get(i).getTimestamp());\r\n\t\t\tSystem.out.println(\"La distance entre ces deux points est de \"+p1.longueurEnM(trackRetourGraine1.get(i),trackRetourGraine1.get(i+1))+\"m\");\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"p\"+(trackRetourGraine1.size()-1)+\" : \"+trackRetourGraine1.get(trackRetourGraine1.size()-1).lat+\",\"+trackRetourGraine1.get(trackRetourGraine1.size()-1).lon);\r\n\t\tSystem.out.println(trackRetourGraine1.get(trackRetourGraine1.size()-1).getTimestamp());\r\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) {\n\t\tField field = new Field(0,6);\n\t\tArrayList<TileOnPositionEX> move = new ArrayList<TileOnPositionEX>();\n\t\t\n\t\t// Colors\n\t\tint blue \t= 1;\n\t\tint green \t= 5;\n\t\tint purple \t= 4;\n\t\tint orange \t= 3;\n\t\tint red \t= 0;\n\t\tint yellow \t= 2;\n\t\t// Shapes\n\t\tint circle\t= 0;\n\t\tint club \t= 11;\n\t\tint diamond\t= 3;\n\t\tint square\t= 1;\n\t\tint star\t= 7;\n\t\tint sun\t\t= 4;\n\t\t\n\t\t/* TEST CASE\tTILEONPOSITION(X,Y,TILE)\tTILE(COLOR,SHAPE,UNIQUEID) */\n\t\t// CAUTION: EVERY TILEONPOSITION WITH THE SAME TILE HAS CURRENTLY THE SAME UNIQUEID!\n\t\t\n\t\t// BLUE\n\t\tTile blueCircle\t\t= new Tile(blue,circle,0);\n\t\tTile blueClub\t\t= new Tile(blue,club,1);\n\t\tTile blueDiamond\t= new Tile(blue,diamond,2);\n\t\tTile blueSquare\t\t= new Tile(blue,square,3);\n\t\tTile blueStar\t\t= new Tile(blue,star,4);\n\t\tTile blueSun\t\t= new Tile(blue,sun,5);\n\t\t// GREEN\n\t\tTile greenCircle\t= new Tile(green,circle,6);\n\t\tTile greenClub\t\t= new Tile(green,club,7);\n\t\tTile greenDiamond\t= new Tile(green,diamond,8);\n\t\tTile greenSquare\t= new Tile(green,square,9);\n\t\tTile greenStar\t\t= new Tile(green,star,10);\n\t\tTile greenSun\t\t= new Tile(green,sun,11);\n\t\t// PURPLE\n\t\tTile purpleCircle\t= new Tile(purple,circle,12);\n\t\tTile purpleClub\t\t= new Tile(purple,club,13);\n\t\tTile purpleDiamond\t= new Tile(purple,diamond,14);\n\t\tTile purpleSquare\t= new Tile(purple,square,15);\n\t\tTile purpleStar\t\t= new Tile(purple,star,16);\n\t\tTile purpleSun\t\t= new Tile(purple,sun,17);\n\t\t// ORANGE\n\t\tTile orangeCircle\t= new Tile(orange,circle,18);\n\t\tTile orangeClub\t\t= new Tile(orange,club,19);\n\t\tTile orangeDiamond\t= new Tile(orange,diamond,20);\n\t\tTile orangeSquare\t= new Tile(orange,square,21);\n\t\tTile orangeStar\t\t= new Tile(orange,star,22);\n\t\tTile orangeSun\t\t= new Tile(orange,sun,23);\n\t\t// RED\n\t\tTile redCircle\t\t= new Tile(red,circle,24);\n\t\tTile redClub\t\t= new Tile(red,club,25);\n\t\tTile redDiamond\t\t= new Tile(red,diamond,26);\n\t\tTile redSquare\t\t= new Tile(red,square,27);\n\t\tTile redStar\t\t= new Tile(red,star,28);\n\t\tTile redSun\t\t\t= new Tile(red,sun,29);\n\t\t// YELLOW\n\t\tTile yellowCircle\t= new Tile(yellow,circle,30);\n\t\tTile yellowClub\t\t= new Tile(yellow,club,31);\n\t\tTile yellowDiamond\t= new Tile(yellow,diamond,32);\n\t\tTile yellowSquare\t= new Tile(yellow,square,33);\n\t\tTile yellowStar\t\t= new Tile(yellow,star,34);\n\t\tTile yellowSun\t\t= new Tile(yellow,sun,35);\n\t\t\n\t\tmove.add(new TileOnPositionEX(0,1,redCircle));\n\t\tmove.add(new TileOnPositionEX(0,0,blueCircle));\n\t\t\n\t\tfield.processMove(move, ControlParameters.Server);\n\t\tArrayList<TileOnPositionEX> tilesOnField = field.getTilesOnBoard();\n\t\tmove.clear();\n\t\t\n\t\tmove.add(new TileOnPositionEX(2,1,redClub));\n\t\tmove.add(new TileOnPositionEX(4,1, redStar));\n\t\tmove.add(new TileOnPositionEX(3,1, redDiamond));\n\t\tmove.add(new TileOnPositionEX(1,1, redSun));\n\t\tmove.add(new TileOnPositionEX(5,1, redSquare));\n\t\tfield.processMove(move, ControlParameters.Server);\n\t\ttilesOnField = field.getTilesOnBoard();\n\t\tmove.clear();\n\n\t\t\n\t\tSystem.out.println(\"\\nAMOUNT OF TILES ON FIELD: \" + tilesOnField.size() + \"\\n\");\n\t\tfor (TileOnPositionEX tile : tilesOnField) {\n\t\t\tSystem.out.println(\"The tile: \" + tile);\n\t\t\tif(tile.getNeighbor(Neighbor.Top)!=null) {System.out.println(\"TOP: \" + tile.getNeighbor(Neighbor.Top));}else {System.out.println(\"TOP: NULL\");}\n\t\t\tif(tile.getNeighbor(Neighbor.Right)!=null) {System.out.println(\"RIGHT: \" + tile.getNeighbor(Neighbor.Right));}else {System.out.println(\"RIGHT: NULL\");}\n\t\t\tif(tile.getNeighbor(Neighbor.Bottom)!=null) {System.out.println(\"BOTTOM: \" + tile.getNeighbor(Neighbor.Bottom));}else {System.out.println(\"BOTTOM: NULL\");}\n\t\t\tif(tile.getNeighbor(Neighbor.Left)!=null) {System.out.println(\"LEFT: \" + tile.getNeighbor(Neighbor.Left) + \"\\n\");}else {System.out.println(\"LEFT: NULL\\n\");}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint lol = (int)(-1 % 6);\n\t\tint lol2 = (int)(-2 % 6);\n\t\tSystem.out.printf(\"%d %d\\n\", lol, lol2);\n\t\tVector3 megaCoords = Position.scaleToCoordinates(new Vector3(-200, 0, 5), CHUNK_MAX_SIZE);\n\t\tSystem.out.println(megaCoords);\n\t}", "private static void blockCoordsToChunkCoords(Vector3i pos) {\n pos.x >>= 4;\n pos.y >>= 4;\n pos.z >>= 4;\n }", "public void resetCoordinates(){\n pos=0;\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE;}\n else{\n this.coordinates[0]=0;}\n if(this.pIndex%3==0){\n this.coordinates[1]=0;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE;} \n }", "public long getPositions() {\n return positions;\n }", "private void createPosition() {\n\n switch (new Random().nextInt(4)) {\n\n case 0:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":-90\";\n break;\n\n case 1:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":\" + (Window.HEIGHT + 90);\n break;\n\n case 2:\n sendString = \"-90:\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n\n case 3:\n sendString = (Window.WIDTH + 90) + \":\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n }\n sendString += \":\" + new Random().nextInt(4);\n sendString += \":\" + new Random().nextInt(2);\n }", "public void generatePositionGroups(){\n for (int i = 0; i < Input.length()+1; i++){\n PositionGroup pg = generatePositionGroupAt(i);\n PositionGroupList.add(pg);\n }\n }", "SpacesInvaders_aUnVaisseauQuiOccupeLaPosition createSpacesInvaders_aUnVaisseauQuiOccupeLaPosition();", "public void skystonePos3() {\n }", "private void set_position(int pos[])\r\n\t{\r\n\t\tthis.position = pos;\r\n\t}", "Object getPosition();", "long getCoordinates();", "long getCoordinates();", "private void setNodeCoordinates (int trainPosition)\r\n\t{\r\n\t\tswitch (trainPosition)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\t// S node\r\n\t\t\t\tx = 312;\r\n\t\t\t\ty = 191;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 1:\r\n\t\t\t{\t\r\n\t\t\t\t// I1\r\n\t\t\t\tx = 272;\r\n\t\t\t\ty = 286;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 2:\r\n\t\t\t{\t\r\n\t\t\t\t// I2\r\n\t\t\t\tx = 165;\r\n\t\t\t\ty = 266;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 3:\r\n\t\t\t{\t\r\n\t\t\t\t// I3\r\n\t\t\t\tx = 181;\r\n\t\t\t\ty = 170;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 4:\r\n\t\t\t{\t\r\n\t\t\t\t// I4\r\n\t\t\t\tx = 300;\r\n\t\t\t\ty = 87;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tcase 5:\r\n\t\t\t{\r\n\t\t\t\t// I5\r\n\t\t\t\tx = 442;\r\n\t\t\t\ty = 136;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 6:\r\n\t\t\t{\t\r\n\t\t\t\t// I6\r\n\t\t\t\tx = 437;\r\n\t\t\t\ty = 249;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 7:\r\n\t\t\t{\t\r\n\t\t\t\t// O1\r\n\t\t\t\tx = 309;\r\n\t\t\t\ty = 371;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 8:\r\n\t\t\t{\t\r\n\t\t\t\t// O2\r\n\t\t\t\tx = 34;\r\n\t\t\t\ty = 291;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 9:\r\n\t\t\t{\t\r\n\t\t\t\t// O3\r\n\t\t\t\tx = 113;\r\n\t\t\t\ty = 54;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 10:\r\n\t\t\t{\t\r\n\t\t\t\t// O4\r\n\t\t\t\tx = 383;\r\n\t\t\t\ty = 18;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 11:\r\n\t\t\t{\t\r\n\t\t\t\t// O5\r\n\t\t\t\tx = 560;\r\n\t\t\t\ty = 147;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 12:\r\n\t\t\t{\t\r\n\t\t\t\t// O6\r\n\t\t\t\tx = 558;\r\n\t\t\t\ty = 312;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public int getPos();", "public int getPos();", "private List<BaseLocation> getExpectedBaseLocations() {\r\n final List<BaseLocation> baseLocations = new ArrayList<>();\r\n\r\n final Position position1 = new Position(3104, 3856, PIXEL);\r\n final Position center1 = new Position(3040, 3808, PIXEL);\r\n baseLocations.add(new BaseLocation(position1, center1, 13500, 5000, true, false, true));\r\n\r\n final Position position2 = new Position(2208, 3632, PIXEL);\r\n final Position center2 = new Position(2144, 3584, PIXEL);\r\n baseLocations.add(new BaseLocation(position2, center2, 9000, 5000, true, false, false));\r\n\r\n final Position position3 = new Position(640, 3280, PIXEL);\r\n final Position center3 = new Position(576, 3232, PIXEL);\r\n baseLocations.add(new BaseLocation(position3, center3, 13500, 5000, true, false, true));\r\n\r\n final Position position4 = new Position(2688, 2992, PIXEL);\r\n final Position center4 = new Position(2624, 2944, PIXEL);\r\n baseLocations.add(new BaseLocation(position4, center4, 9000, 5000, true, false, false));\r\n\r\n final Position position5 = new Position(1792, 2480, PIXEL);\r\n final Position center5 = new Position(1728, 2432, PIXEL);\r\n baseLocations.add(new BaseLocation(position5, center5, 12000, 0, true, true, false));\r\n\r\n final Position position6 = new Position(3200, 1776, PIXEL);\r\n final Position center6 = new Position(3136, 1728, PIXEL);\r\n baseLocations.add(new BaseLocation(position6, center6, 13500, 5000, true, false, true));\r\n\r\n final Position position7 = new Position(640, 1968, PIXEL);\r\n final Position center7 = new Position(576, 1920, PIXEL);\r\n baseLocations.add(new BaseLocation(position7, center7, 9000, 5000, true, false, false));\r\n\r\n final Position position8 = new Position(1792, 1808, PIXEL);\r\n final Position center8 = new Position(1728, 1760, PIXEL);\r\n baseLocations.add(new BaseLocation(position8, center8, 12000, 0, true, true, false));\r\n\r\n final Position position9 = new Position(2336, 560, PIXEL);\r\n final Position center9 = new Position(2272, 512, PIXEL);\r\n baseLocations.add(new BaseLocation(position9, center9, 13500, 5000, true, false, true));\r\n\r\n final Position position10 = new Position(3584, 720, PIXEL);\r\n final Position center10 = new Position(3520, 672, PIXEL);\r\n baseLocations.add(new BaseLocation(position10, center10, 9000, 5000, true, false, false));\r\n\r\n final Position position11 = new Position(544, 432, PIXEL);\r\n final Position center11 = new Position(480, 384, PIXEL);\r\n baseLocations.add(new BaseLocation(position11, center11, 13500, 5000, true, false, true));\r\n\r\n return baseLocations;\r\n }", "private int m5278d(int pos, int cmd) {\n int end;\n int start;\n for (int i = this.f3533c.size() - 1; i >= 0; i--) {\n C1070b postponed = (C1070b) this.f3533c.get(i);\n int i2 = postponed.f3539a;\n if (i2 == 8) {\n if (postponed.f3540b < postponed.f3542d) {\n start = postponed.f3540b;\n end = postponed.f3542d;\n } else {\n start = postponed.f3542d;\n end = postponed.f3540b;\n }\n if (pos < start || pos > end) {\n int i3 = postponed.f3540b;\n if (pos < i3) {\n if (cmd == 1) {\n postponed.f3540b = i3 + 1;\n postponed.f3542d++;\n } else if (cmd == 2) {\n postponed.f3540b = i3 - 1;\n postponed.f3542d--;\n }\n }\n } else {\n int i4 = postponed.f3540b;\n if (start == i4) {\n if (cmd == 1) {\n postponed.f3542d++;\n } else if (cmd == 2) {\n postponed.f3542d--;\n }\n pos++;\n } else {\n if (cmd == 1) {\n postponed.f3540b = i4 + 1;\n } else if (cmd == 2) {\n postponed.f3540b = i4 - 1;\n }\n pos--;\n }\n }\n } else {\n int i5 = postponed.f3540b;\n if (i5 <= pos) {\n if (i2 == 1) {\n pos -= postponed.f3542d;\n } else if (i2 == 2) {\n pos += postponed.f3542d;\n }\n } else if (cmd == 1) {\n postponed.f3540b = i5 + 1;\n } else if (cmd == 2) {\n postponed.f3540b = i5 - 1;\n }\n }\n }\n for (int i6 = this.f3533c.size() - 1; i6 >= 0; i6--) {\n C1070b op = (C1070b) this.f3533c.get(i6);\n if (op.f3539a == 8) {\n int i7 = op.f3542d;\n if (i7 == op.f3540b || i7 < 0) {\n this.f3533c.remove(i6);\n mo8470a(op);\n }\n } else if (op.f3542d <= 0) {\n this.f3533c.remove(i6);\n mo8470a(op);\n }\n }\n return pos;\n }", "godot.wire.Wire.Vector3 getPosition();", "public POS(int position) {\n \t\tthis.position = position;\n \t}", "private static Position fetchRandomPosition(){\n return new Position(0,0).returnRandomPosition();\n }", "public float[] findXY(){\n //Initialize the xy coordinates and the array\n int x = -1;\n int y = -1;\n float[] location = new float[2];\n\n //Find the blank card\n for(int i = 0; i < cardArray.length; i++){\n for(int j = 0; j < cardArray.length; j++){\n if(cardArray[i][j].getCardNum() == 16){\n x = i;\n y = j;\n }\n }\n }\n\n /* For each of the following cases, find the neighbors of the\n blank card. Select only neighbors that are in the incorrect spot so that\n the computer player does not mess up the game. If both are in the correct spot\n choose one to move\n */\n //Case 1: it is in the top left corner, find a neighbor\n if((x == 0) && (y == 0)){\n if(cardArray[x+1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 2: it is in the top right corner, find a neighbor\n if((x == 0) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 3: It is in the bottom left corner, find a neighbor\n if((x == cardArray.length - 1) && (y == 0)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 4: It is in the bottom right corner, find a neighbor\n if((x == cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 5: It is in the top row, find a neighbor\n if((x == 0) && (y > 0) && ( y < cardArray.length - 1)){\n if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if(cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n }\n\n //Case 6: It is on the bottom row, find a neighbor\n if((x == cardArray.length - 1) && (y > 0) && (y < cardArray.length- 1)){\n if (cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if (cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n }\n\n //Case 7: It is on the left column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == 0)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 8: It is on the right column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 9: It is not an edge or corner, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y > 0) && (y < cardArray.length -1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Return the array containing the xy coordinates of the blank square's neighbor\n return location;\n }", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "public void testMovToPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.moveToPos(5));\n assertTrue(test1.getValue().inRange(5));\n assertFalse(test1.moveToPos(-5));\n assertFalse(test1.getValue().inRange(-5));\n assertFalse(test1.moveToPos(50));\n assertFalse(test1.getValue().inRange(50));\n }", "Vaisseau_positionner createVaisseau_positionner();", "@Override\n\tpublic int hashCode() {\n\t\tString hashString = posX + \",\" + posY + \",\" + posZ;\n\t\treturn hashString.hashCode();\n\t}", "public ArrayList<Coordinate> getPossibleMoveCoordinate() {\n ChessBoard board = this.getChessBoard(); // get chess board\n ArrayList<Coordinate> coords = new ArrayList<Coordinate>(); // create return ArrayList\n int x, y;\n /*\n several cases\n 2 3\n 1 4\n\n 5 8\n 6 7\n\n */\n // case1\n x = this.x_coordinate - 2;\n y = this.y_coordinate + 1;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case2\n x = this.x_coordinate - 1;\n y = this.y_coordinate + 2;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case3\n x = this.x_coordinate + 1;\n y = this.y_coordinate + 2;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case4\n x = this.x_coordinate + 2;\n y = this.y_coordinate + 1;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case5\n x = this.x_coordinate - 2;\n y = this.y_coordinate - 1;\n if(x >= 0 && y >= 0 ){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case6\n x = this.x_coordinate - 1;\n y = this.y_coordinate - 2;\n if(x >= 0 && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case7\n x = this.x_coordinate + 1;\n y = this.y_coordinate - 2;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case1\n x = this.x_coordinate + 2;\n y = this.y_coordinate - 1;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n\n\n return coords;\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 int getX(){ return xPosition; }", "public int PositionGet();", "public FlagPositions(int number_of_flags) {\r\n // Integer array to store the data.\r\n coords = new int[number_of_flags];\r\n\r\n // Set coordinates to default value.\r\n for (int i = 0; i<coords.length;i++){\r\n coords[i] = -1;\r\n }\r\n\r\n // Set flag.\r\n flagsreceived = false;\r\n }", "public Position position();", "public Position randposition()\r\n\t{\n\t\tRandom random = new Random();\r\n\t\tPosition position = new Position(random.nextInt(7680), random.nextInt(4320), random.nextDouble());\r\n\t\treturn position;\r\n\t}", "int getPosition();", "private void parse(String position) throws Exception {\r\n\t \r\n\t StringTokenizer tokens = new StringTokenizer(position);\r\n\t if(tokens.hasMoreTokens()){\r\n\t \r\n\t try{\r\n\t\t x = Integer.parseInt(tokens.nextToken());\r\n\t\t y = Integer.parseInt(tokens.nextToken());\r\n\t }catch(NumberFormatException ne){\r\n\t throw new Exception(\"Invalid number!!\");\r\n\t }\r\n\t direction = tokens.nextToken().getBytes()[0];\r\n\t }\r\n\t if(!verifyBounds()){\r\n\t throw new Exception(\"Invalid inital position!!!\");\r\n\t }\r\n\t}", "Square getCurrentPosition();", "private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }", "Tile getPosition();", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public List<Position> getPositions(){\r\n List<Position> listPosition = new ArrayList();\r\n int row=currentPosition.getRow(),column=currentPosition.getColumn();\r\n listPosition=getPositionFor(row, column, listPosition);\r\n return listPosition;\r\n }", "public static int getBukkitPosition(int x,int y){\n return ((y-1)*9)+x-1;\n }", "protected int[] pos(int raster, int[] pos) {\n return FormatTools.rasterToPosition(lengths, raster, pos);\n }", "private void placeMines() {\n\t\t Random rand = new Random();\n\t\t if(levelOption == 0) {\n\t\t\t rowCoordinates = new int[10];\n\t\t\t cowCoordinates = new int[10];\n\t\t\t numberOfMines = 10;\n\t\t }\n\t\t else if(levelOption == 1) {\n\t\t\t rowCoordinates = new int[45];\n\t\t\t cowCoordinates = new int[45];\n\t\t\t numberOfMines = 45;\n\t\t }\n\t\t else {\n\t\t\t rowCoordinates = new int[99];\n\t\t\t cowCoordinates = new int[99];\n\t\t\t numberOfMines = 99;\n\t\t }\n\t\t for(int i = 0 ; i < numberOfMines; i++) {\n\t\t\t int randomNumber = rand.nextInt(board[0].length-1)+1;\n\t\t\t int randomNumber2 = rand.nextInt(board[1].length-1)+1;\n\t\t\t rowCoordinates[i] = randomNumber;\n\t\t\t cowCoordinates[i] = randomNumber2;\n\t\t } \n\t\t System.out.println(Arrays.toString(rowCoordinates));\n\t\t System.out.println(Arrays.toString(cowCoordinates));\t \n\t}", "godot.wire.Wire.Vector2 getPosition();", "public void skystonePos4() {\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: */ }", "public static int[] positionUpdate(Point x,int n, int s) {\n\t\tRandom rand = new Random();\n\t\tint p1 ;\n\t\tint p2 ;\n\t\tif (x.x%s == 0 && x.y%s == 0) {\n\t\t\tp1 = rand.nextInt(n-1);\n\t\t\tp2 = rand.nextInt(n-1);\n\t\t}\n\t\t//random distance from [-s;s] is added to current position\n\t\telse {\n\t\t\tp1 =x.x-s+rand.nextInt((2*s)+1);\n\t\t\tp2 =x.y-s+rand.nextInt((2*s)+1);\n\t\t}\n\t\t \n\t\t //checks if only the y-coordinate is out of bounds\n\t\t if((p1>=0&&p1<n)&&!(p2>=0&&p2<n)) {\n\t\t\t p1=closestNumber(p1,n,0);\n\t\t\t if (p2<0) {\n\t\t\t\t p2=0;\n\t\t\t\t \n\t\t\t }\n\t\t\t else {\n\t\t\t\t p2=n-1;\n\t\t\t }\n\t\t\t\t\n\t\t }\n\t\t//checks if only the x-coordinate is out of bounds\n\t\t if(!(p1>=0&&p1<n)&&(p2>=0&&p2<n)) {\n\t\t\t p2=closestNumber(p2,n,0);\n\t\t\t if (p1<0) {\n\t\t\t\t p1=0; \n\t\t\t }\n\t\t\t else {\n\t\t\t\t p1=n-1;\n\t\t\t }\n\t\t }\n\t\t \n\t\t \n\t\t int[] Arr = {p1,p2};\n\t\t return Arr;\n\t}", "public ArrayList<float []> getObjectPos(){\n ArrayList<float []> o_pos = new ArrayList<>();\n float [] pos = new float [3];\n for (int i = 0; i < field.length; i++){\n pos[0] = field[i].x;\n pos[1] = field[i].y;\n pos[2] = field[i].z;\n o_pos.add(pos);\n }\n return o_pos;\n }", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "@Test\n public void testIsPositionValid() {\n assertFalse(this.board.isPositionValid(new Position(-1, -1)));\n assertFalse(this.board.isPositionValid(new Position(11, 11)));\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n assertTrue(this.board.isPositionValid(new Position(line, column)));\n }\n }\n }", "posXY(int x, int y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public Position[] getWinningPositions();", "private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }", "@Test\n public void testPositionEquals(){\n assertEquals(Maze.position(0,0), Maze.position(0,0));\n assertThat(Maze.position(1, 0), not(Maze.position(0, 0)));\n assertThat(Maze.position(0,0), not(Maze.position(0,1)));\n }", "public List<Point> generatePointList(){\r\n\t\t//Can move up to 3 squares horizontally or vertically, but cannot move diagonally.\r\n List<Point> pointList = new ArrayList<>();\r\n int pointCount = 0;\r\n int px = (int)getCoordinate().getX();\r\n int py = (int)getCoordinate().getY();\r\n\r\n for (int i=px-3;i<=px+3;i++){\r\n for(int j=py-3;j<=py+3;j++){\r\n if((i>=0) && (i<9) && (j>=0) && (j<9) && ((i!=px)||(j!=py))){\r\n if ((i==px)||(j==py)){\r\n pointList.add(pointCount, new Point(i,j));\r\n pointCount+=1;\r\n } \r\n }\r\n }\r\n }\r\n return pointList;\r\n }", "@Override\n public String toString() {\n return String.format(\"position X is='%s' ,position Y is='%s'\" , positionX , positionY);\n }", "public void skystonePos2() {\n }", "public static void printPositions()\r\n\t{\r\n\t\tSystem.out.println(\"Doodlebugs\");\r\n\t\tint [][] dbPositions = new int[Board.numberOfDoodlebugs][2];\r\n\t\tdbPositions = doodlebugPositions();\r\n\t\tfor (int i = 0; i < Board.numberOfDoodlebugs; i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(Arrays.toString(dbPositions[i]));\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Ants\");\r\n\t\tint[][] positions = new int[Board.numberOfAnts][2];\r\n\t\tpositions = antPositions();\r\n\t\tfor (int i = 0; i < Board.numberOfAnts; i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(Arrays.toString(positions[i]));\r\n\t\t}\r\n\t}", "public ArrayList<NPPos> getNPPosition(){\n Iterator it = nextPanels.iterator();\n ArrayList<NPPos> listPositions = new ArrayList<>();\n while(it.hasNext()){\n listPositions.add((NPPos) positions.get(it.next()));\n }\n return listPositions;\n }", "@Override\n public void recalculatePositions() { \n \n }", "@Test\n public void testAroundPlayerPositions() {\n IntStream.iterate(0, i -> i + 1).limit(LevelImpl.LEVEL_MAX).forEach(k -> {\n terrain = terrainFactory.create(level.getBlocksNumber());\n final List<Position> safePosition = new ArrayList<>();\n safePosition.add(TerrainFactoryImpl.PLAYER_POSITION);\n safePosition.add(new Position(TerrainFactoryImpl.PLAYER_POSITION.getX() + TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE,\n TerrainFactoryImpl.PLAYER_POSITION.getY()));\n safePosition.add(new Position(TerrainFactoryImpl.PLAYER_POSITION.getX(), \n TerrainFactoryImpl.PLAYER_POSITION.getY() + TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE));\n /*use assertFalse because they have already been removed*/\n assertFalse(terrain.getFreeTiles().stream().map(i -> i.getPosition()).collect(Collectors.toList()).containsAll(safePosition));\n level.levelUp();\n });\n }", "private void addMinigames(){\n Point a = new Point();\n getWindowManager().getDefaultDisplay().getSize(a);\n Log.d(\"XY\", Integer.toString(a.x)+\" \"+Integer.toString(a.y));\n\n\n\n generateMiniGames();\n\n addFlower();\n\n }", "private void goZhuSuOrder(int position){\n\t}", "private void setMin(int min) { this.min = new SimplePosition(false,false,min); }", "static List<Move> generateLegalMoves(Position pos) {\n\t\tList<Move> moves = new ArrayList<>();\n\n\t\t// for (int square : pos.pieces) {\n\t\t// \tif (pos.pieces.size() > 32) {\n\t\t// \t\tSystem.out.println(\"problem\" + pos.pieces.size());\n\t\t// \t}\n\t\t// \tif (pos.at(square) != 0 && Piece.isColor(pos.at(square), pos.toMove)) {\n\t\t// \t\tint piece = pos.at(square);\n\t\t// \t\tint name = Piece.name(piece);\n\t\t// \t\tif (name == Piece.Pawn) {\n\t\t// \t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t// \t\t\tif (square + step >= 0 && square + step < 64) {\n\t\t// \t\t\t\t// 1 square\n\t\t// \t\t\t\tif (pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'q'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'b'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'n'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'r'));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step));\n\t\t// \t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// 2 squares\n\t\t// \t\t\t\tif ((square < 16 && pos.toMove == 'w') || square > 47 && pos.toMove == 'b') {\n\t\t// \t\t\t\t\tif (pos.board.squares[square + 2*step] == 0 && pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + 2*step));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t\t// capture\n\t\t// \t\t\t\t// right\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][3] > 0) {\n\t\t// \t\t\t\t\tint target = square + step + 1;\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t} \n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// left\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][2] > 0) {\n\t\t// \t\t\t\t\tint target = square + step - 1;\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\tfor (int offset : MoveData.KnightOffsets.get(square)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\tif (!Piece.isColor(pos.board.squares[square + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tMove move = new Move(square, square + offset);\n\t\t// \t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse {\n\t\t// \t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t// \t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t// \t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t// \t\t\t\tint maxDist = MoveData.DistanceToEdge[square][dir];\n\t\t// \t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\n\t\t// \t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t// \t\t\t\t\tint squareIdx = square + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, squareIdx));\n\t\t// \t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\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}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\t\t\t\t\t\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t\t// \t}\n\t\t// }\n\n\t\tfor (int i = 0; i < 64; i++) {\n\t\t\tif (pos.board.squares[i] != 0 && Piece.isColor(pos.board.squares[i], pos.toMove)) {\n\t\t\t\tint piece = pos.board.squares[i];\n\t\t\t\tint name = Piece.name(piece);\n\t\t\t\tif (name == Piece.Pawn) {\n\t\t\t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t\t\t\tif (i + step >= 0 && i + step < 64) {\n\t\t\t\t\t\t// 1 square\n\t\t\t\t\t\tif (pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'q'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'b'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'n'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'r'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step));\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 2 squares\n\t\t\t\t\t\tif ((i < 16 && pos.toMove == 'w') || i > 47 && pos.toMove == 'b') {\n\t\t\t\t\t\t\tif (pos.board.squares[i + 2*step] == 0 && pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + 2*step));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// capture\n\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][3] > 0) {\n\t\t\t\t\t\t\tint target = i + step + 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// left\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][2] > 0) {\n\t\t\t\t\t\t\tint target = i + step - 1;\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tfor (int offset : MoveData.KnightOffsets.get(i)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[i + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMove move = new Move(i, i + offset);\n\t\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t\t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t\t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t\t\t\t\tint maxDist = MoveData.DistanceToEdge[i][dir];\n\t\t\t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\t\t\t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t\t\t\t\t\tint squareIdx = i + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, squareIdx));\n\t\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\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}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// castling\t\t\n\t\tif (pos.toMove == 'w' && !underAttack(pos, pos.whiteKing, 'b')) {\t\t\t\n\t\t\tif (pos.castlingRights.whiteKingSide && pos.at(Board.H1) == (Piece.Rook | Piece.White)) {\n\t\t\t\tif (pos.at(Board.F1) == Piece.Empty && pos.at(Board.G1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F1, 'b') && !underAttack(pos, Board.G1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.G1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif (pos.castlingRights.whiteQueenSide && pos.at(Board.A1) == (Piece.Rook | Piece.White)) {\t\t\t\t\n\t\t\t\tif (pos.at(Board.B1) == Piece.Empty && pos.at(Board.C1) == Piece.Empty && pos.at(Board.D1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D1, 'b') && !underAttack(pos, Board.C1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.C1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\telse if (pos.toMove == 'b' && !underAttack(pos, pos.blackKing, 'w')){\n\t\t\tif (pos.castlingRights.blackKingSide && pos.at(Board.H8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.F8) == Piece.Empty && pos.at(Board.G8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F8, 'w') && !underAttack(pos, Board.G8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.G8));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pos.castlingRights.blackQueenSide && pos.at(Board.A8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.B8) == Piece.Empty && pos.at(Board.C8) == Piece.Empty && pos.at(Board.D8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D8, 'w') && !underAttack(pos, Board.C8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.C8));\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// filter illegal moves\n\t\tList<Move> legalMoves = new ArrayList<>();\n\t\tchar color = pos.toMove;\n\t\tfor (Move move : moves) {\n\t\t\tpos.makeMove(move);\n\t\t\tif (!kingInCheck(pos, color)) {\n\t\t\t\tlegalMoves.add(move);\n\t\t\t}\t\t\t\n\t\t\tpos.undoMove();\n\t\t}\n\n\t\treturn legalMoves;\n\t}", "private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }", "public static int randomPosition(){\r\n int max = 4;\r\n int min = 1;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n int pos = randNum;\r\n \r\n return pos;\r\n }", "@Test\r\n\tpublic void testArrayPos(){\n\t\tfor(int y=0;y<5;y++){\r\n\t\t\tfor(int x=0;x<5;x++){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Position() {\n\n\t}", "public ArrayList<Integer> helper(int root, int pos) {\n ArrayList<Integer> positions = new ArrayList<>();\n int base = 0;\n int tmp = (root * 2) + 1;\n if (pos == 8) base = 3;\n else if (pos == 4) base = 2;\n else if (pos == 2) base = 1;\n for (int i = 0; i < base; i++) tmp = (tmp * 2) + 1;\n for (int j = 0; j < pos * 2; j++) positions.add(tmp + j);\n return positions; // while ((tmp = ((location * 2) + 1)) <= 127) ;\n }", "Position_changerAbscisse createPosition_changerAbscisse();", "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}", "public ArrayList<Integer> searchPosition(Estados e) { //considerando um ponto so\n ArrayList<Integer> positions = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n if (matrix[i][j] == e) {\n positions.add(i);\n positions.add(j);\n }\n\n }\n\n }\n return positions;\n\n }", "public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }", "private boolean updatePositions() {\n /*\n r14 = this;\n int r0 = r14.getFirstVisiblePosition()\n int r1 = r14.mFirstExpPos\n int r2 = r1 - r0\n android.view.View r2 = r14.getChildAt(r2)\n if (r2 != 0) goto L_0x001b\n int r1 = r14.getChildCount()\n int r1 = r1 / 2\n int r1 = r1 + r0\n int r0 = r1 - r0\n android.view.View r2 = r14.getChildAt(r0)\n L_0x001b:\n int r0 = r2.getTop()\n int r2 = r2.getHeight()\n int r3 = r14.getShuffleEdge(r1, r0)\n int r4 = r14.getDividerHeight()\n int r5 = r14.mFloatViewMid\n if (r5 >= r3) goto L_0x004c\n L_0x002f:\n if (r1 < 0) goto L_0x004a\n int r1 = r1 + -1\n int r2 = r14.getItemHeight(r1)\n if (r1 != 0) goto L_0x003c\n int r0 = r0 - r4\n int r0 = r0 - r2\n goto L_0x006e\n L_0x003c:\n int r2 = r2 + r4\n int r0 = r0 - r2\n int r2 = r14.getShuffleEdge(r1, r0)\n int r5 = r14.mFloatViewMid\n if (r5 >= r2) goto L_0x0048\n r3 = r2\n goto L_0x002f\n L_0x0048:\n r0 = r2\n goto L_0x006e\n L_0x004a:\n r0 = r3\n goto L_0x006e\n L_0x004c:\n int r5 = r14.getCount()\n L_0x0050:\n if (r1 >= r5) goto L_0x004a\n int r6 = r5 + -1\n if (r1 != r6) goto L_0x0059\n int r0 = r0 + r4\n int r0 = r0 + r2\n goto L_0x006e\n L_0x0059:\n int r2 = r2 + r4\n int r0 = r0 + r2\n int r2 = r1 + 1\n int r6 = r14.getItemHeight(r2)\n int r7 = r14.getShuffleEdge(r2, r0)\n int r8 = r14.mFloatViewMid\n if (r8 < r7) goto L_0x006d\n r1 = r2\n r2 = r6\n r3 = r7\n goto L_0x0050\n L_0x006d:\n r0 = r7\n L_0x006e:\n int r2 = r14.getHeaderViewsCount()\n int r4 = r14.getFooterViewsCount()\n r5 = 0\n int r6 = r14.mFirstExpPos\n int r7 = r14.mSecondExpPos\n float r8 = r14.mSlideFrac\n boolean r9 = r14.mAnimate\n if (r9 == 0) goto L_0x00c7\n int r9 = r0 - r3\n int r9 = java.lang.Math.abs(r9)\n int r10 = r14.mFloatViewMid\n if (r10 >= r0) goto L_0x008e\n r13 = r3\n r3 = r0\n r0 = r13\n L_0x008e:\n float r10 = r14.mSlideRegionFrac\n r11 = 1056964608(0x3f000000, float:0.5)\n float r10 = r10 * r11\n float r9 = (float) r9\n float r10 = r10 * r9\n int r9 = (int) r10\n float r10 = (float) r9\n int r0 = r0 + r9\n int r9 = r3 - r9\n int r12 = r14.mFloatViewMid\n if (r12 >= r0) goto L_0x00b0\n int r3 = r1 + -1\n r14.mFirstExpPos = r3\n r14.mSecondExpPos = r1\n int r3 = r14.mFloatViewMid\n int r0 = r0 - r3\n float r0 = (float) r0\n float r0 = r0 * r11\n float r0 = r0 / r10\n r14.mSlideFrac = r0\n goto L_0x00cb\n L_0x00b0:\n int r0 = r14.mFloatViewMid\n if (r0 < r9) goto L_0x00c7\n r14.mFirstExpPos = r1\n int r0 = r1 + 1\n r14.mSecondExpPos = r0\n r0 = 1065353216(0x3f800000, float:1.0)\n int r9 = r14.mFloatViewMid\n int r3 = r3 - r9\n float r3 = (float) r3\n float r3 = r3 / r10\n float r3 = r3 + r0\n float r3 = r3 * r11\n r14.mSlideFrac = r3\n goto L_0x00cb\n L_0x00c7:\n r14.mFirstExpPos = r1\n r14.mSecondExpPos = r1\n L_0x00cb:\n int r0 = r14.mFirstExpPos\n r3 = 1\n if (r0 >= r2) goto L_0x00d6\n r14.mFirstExpPos = r2\n r14.mSecondExpPos = r2\n r1 = r2\n goto L_0x00ea\n L_0x00d6:\n int r0 = r14.mSecondExpPos\n int r9 = r14.getCount()\n int r9 = r9 - r4\n if (r0 < r9) goto L_0x00ea\n int r0 = r14.getCount()\n int r0 = r0 - r4\n int r1 = r0 + -1\n r14.mFirstExpPos = r1\n r14.mSecondExpPos = r1\n L_0x00ea:\n int r0 = r14.mFirstExpPos\n if (r0 != r6) goto L_0x00f8\n int r0 = r14.mSecondExpPos\n if (r0 != r7) goto L_0x00f8\n float r0 = r14.mSlideFrac\n int r0 = (r0 > r8 ? 1 : (r0 == r8 ? 0 : -1))\n if (r0 == 0) goto L_0x00f9\n L_0x00f8:\n r5 = 1\n L_0x00f9:\n int r0 = r14.mFloatPos\n if (r1 == r0) goto L_0x010e\n com.autonavi.minimap.widget.draglistview.DragSortListView$DragListener r0 = r14.mDragListener\n if (r0 == 0) goto L_0x010b\n com.autonavi.minimap.widget.draglistview.DragSortListView$DragListener r0 = r14.mDragListener\n int r4 = r14.mFloatPos\n int r4 = r4 - r2\n int r2 = r1 - r2\n r0.drag(r4, r2)\n L_0x010b:\n r14.mFloatPos = r1\n goto L_0x010f\n L_0x010e:\n r3 = r5\n L_0x010f:\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.minimap.widget.draglistview.DragSortListView.updatePositions():boolean\");\n }", "public void setPosition(int position) {\r\n if (position > 24) position = 24;\r\n this.position = position;\r\n }", "Position getPosition();", "Position getPosition();", "public Vector[] getCardinalPoints(){\r\n\t\tVector[] ret = new Vector[4];\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tret[i] = getPosition().add(new Vector(dx[i] * Tile.SIZE, dy[i] * Tile.SIZE));\r\n\t\treturn ret;\r\n\t}" ]
[ "0.6268902", "0.6166118", "0.61616105", "0.61318916", "0.611754", "0.5983438", "0.5971866", "0.59646124", "0.59269625", "0.58372474", "0.57970864", "0.5794241", "0.57911164", "0.5775912", "0.5742686", "0.57085663", "0.5706425", "0.569843", "0.56684077", "0.5646834", "0.5645404", "0.5634136", "0.5590193", "0.5575304", "0.55737907", "0.55609906", "0.5556947", "0.555113", "0.55415183", "0.55337656", "0.5531044", "0.55262244", "0.55217034", "0.55139035", "0.55139035", "0.5512055", "0.548704", "0.548704", "0.5473913", "0.54706", "0.54551476", "0.54463434", "0.5439573", "0.5435838", "0.5434955", "0.5421411", "0.5418262", "0.540926", "0.5404966", "0.54028934", "0.53998935", "0.53987265", "0.53967106", "0.53895974", "0.5376493", "0.5375008", "0.53702426", "0.53693706", "0.536053", "0.5349257", "0.53490114", "0.53396136", "0.533954", "0.53308564", "0.53299636", "0.53268224", "0.5320155", "0.531929", "0.53167874", "0.53162134", "0.5316061", "0.5300075", "0.5297346", "0.5293402", "0.529093", "0.5289469", "0.5284498", "0.5280862", "0.52759415", "0.52747405", "0.52699816", "0.52658886", "0.5263555", "0.52612174", "0.5261077", "0.52605844", "0.5260205", "0.52579176", "0.5254818", "0.52529216", "0.5252747", "0.524897", "0.5244773", "0.5244765", "0.5244748", "0.5241715", "0.52411175", "0.52333975", "0.52306724", "0.52306724", "0.5228366" ]
0.0
-1
log("Antiban = Moving the camera");
public void cameraRotation() throws InterruptedException { int lowSide = (int)random(1,4); int highSide = (int)random(5,10); int medLowSide = (int)random(10,15); int medHighSide = (int)random(35,60); int highLowSide = (int)random(70,100); int highHighSide = (int)random(200,300); int cameraRotRandom = (int)random(0,1000); int cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this? // twitch if (cameraRotRandom <= 200) { //log("antiban, move camera, twitch"); int twitchRandom = (int)random(1,4); if (twitchRandom == 1) { camera.movePitch(random(lowSide,highSide)); } else if (twitchRandom == 2) { camera.moveYaw(random(lowSide,highSide)); } else { if(random(0,3) == 1) { camera.moveYaw((random(lowSide,highSide))); sleep(random(100,300)); camera.movePitch((random(lowSide,highSide))); } else { camera.movePitch(random(lowSide,highSide)); sleep(random(100,300)); camera.moveYaw((random(lowSide,highSide))); } } } // medium movements else if (cameraRotRandom <= 900) { //log("antiban, move camera, medium"); int medtwitchRandom = (int)random(1,4); if (medtwitchRandom == 1) { camera.movePitch(random(medLowSide,medHighSide)); } else if (medtwitchRandom == 2) { camera.moveYaw(random(medLowSide,medHighSide)); } else { if(random(0,3) == 1) { camera.moveYaw((random(medLowSide,medHighSide))); sleep(random(100,300)); camera.movePitch((random(medLowSide,medHighSide))); } else { camera.movePitch(random(medLowSide,medHighSide)); sleep(random(100,300)); camera.moveYaw((random(medLowSide,medHighSide))); } } } // complete rotations else if (cameraRotRandom <= 1000) { //log("antiban, move camera, long rotation"); int hightwitchRandom = (int)random(1,4); if (hightwitchRandom == 1) { camera.movePitch(random(highLowSide,highHighSide)); } else if (hightwitchRandom == 2) { camera.moveYaw(random(highLowSide,highHighSide)); } else { if(random(0,3) == 1) { camera.moveYaw((random(highLowSide,highHighSide))); sleep(random(100,300)); camera.movePitch((random(highLowSide,highHighSide))); } else { camera.movePitch(random(highLowSide,highHighSide)); sleep(random(100,300)); camera.moveYaw((random(highLowSide,highHighSide))); } } }else { log("something went wrong with antiban camera rotation"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void moveCamera() {\n\n\t}", "public void updateCamera() {\n\t}", "public static void camDebug(Camera camera) {\n\t}", "private void moveCamera(float tpf) {\n //Place the camera at the node\n this.getCamera().setLocation(cameraNode.getLocalTranslation().multLocal(1,0,1).add(0, 2, 0));\n cameraNode.lookAt(cam.getDirection().mult(999999), new Vector3f(0,1,0)); //Makes the gun point\n if (im.up) {\n cameraNode.move(getCamera().getDirection().mult(tpf).mult(10));\n }\n else if (im.down) {\n cameraNode.move(getCamera().getDirection().negate().mult(tpf).mult(10));\n }\n if (im.right) {\n cameraNode.move(getCamera().getLeft().negate().mult(tpf).mult(10));\n }\n else if (im.left) {\n cameraNode.move(getCamera().getLeft().mult(tpf).mult(10));\n }\n }", "public void cameraUpdate(float delta) {\n Vector3 vPosition = cam.position;\n\n // a + (b-a) * trail amount \n // target\n // a = the current cam position\n //b the current player posistion\n\n\n //determines which player the camera follows\n if (Gdx.input.isKeyJustPressed(Input.Keys.SPACE)) {\n nCurrentPlayer = nCurrentPlayer * -1;\n }\n if (nCurrentPlayer > 0) {\n vPosition.x = cam.position.x + (bplayer.getPosition().x * PPM - cam.position.x) * 0.1f;\n vPosition.y = cam.position.y + (bplayer.getPosition().y * PPM - cam.position.y) * 0.1f;\n } else {\n vPosition.x = cam.position.x + (bplayer2.getPosition().x * PPM - cam.position.x) * 0.1f;\n vPosition.y = cam.position.y + (bplayer2.getPosition().y * PPM - cam.position.y) * 0.1f;\n }\n cam.position.set(vPosition);\n cam.update();\n }", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "public void moveCam() {\n float x = this.cam_bind_x; //current pos the camera is binded to\n float y = this.cam_bind_y;\n\n //this amazing camera code is from: https://stackoverflow.com/questions/24047172/libgdx-camera-smooth-translation\n Vector3 target = new Vector3(x+MathUtils.cos(Global.m_angle)*20,y+MathUtils.sin(Global.m_angle)*20,0);\n final float speed = 0.1f, ispeed=1.0f-speed;\n\n Vector3 cameraPosition = cam.position;\n cameraPosition.scl(ispeed);\n target.scl(speed);\n cameraPosition.add(target);\n cam.position.set(cameraPosition);\n\n this.updateCam();\n\n }", "@Override\n public void run() {\n Toast.makeText(DirectorsCut.this, \"Camera Animation\",\n Toast.LENGTH_SHORT).show();\n animateYaw(0.0f, 2000);\n\n }", "public void camera360() {\n\n }", "void moving() {\n\t\tSystem.out.println(\"Moving the car\");\r\n\t}", "void cameraSetup();", "@Override\n public void onCameraMoveStarted(int i) {\n\n }", "public void processCamera() {\n\t\tif (Mario.getX() > 300) {\n\t\t\tlevelCompound.move(-Mario.xVel, 0);\n\t\t\tPhysics.moveHitboxes(-Mario.xVel, 0);\n\t\t\tPhysics.moveEnemies(-Mario.xVel, 0);\n\t\t\tMario.setLocation(299, Mario.getY());\n\n\t\t\tlevelCompound.move(-3, 0);\n\t\t\tPhysics.moveHitboxes(-3, 0);\n\t\t\tPhysics.moveEnemies(-3, 0);\n\t\t}\n\t}", "@Override\n\tpublic void shiftCamera() {\n\t\t\n\t}", "public void onCamera();", "public void actionPerformed(ActionEvent ae){\n\t\ttarget.moveCameraBRU(target.getVVec().normalize(0.2f));\r\n\t\t// set V vec to 1.0 length\r\n\t\ttarget.getVVec().normalize(1.0f);\r\n\t}", "@Override\n public void onCameraMoveStarted(int reason) {}", "public void startFrontCam() {\n }", "public void openCamera() {\n \n\n }", "public void startGearCam() {\n }", "@Override\n public void move() {\n System.out.println(\"I roam here and there\");\n }", "public void move(){\n\t\t\n\t}", "protected void execute() {\n \tRobot.debug.Update(Robot.lift.DebugMotionMagic());\n }", "public void move() {\n\r\n\t}", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "public void updateCam()\r\n {\n \ttry{\r\n \tSystem.out.println();\r\n \tNIVision.IMAQdxGrab(curCam, frame, 1);\r\n \tif(curCam == camCenter){\r\n \t\tNIVision.imaqDrawLineOnImage(frame, frame, NIVision.DrawMode.DRAW_VALUE, new Point(320, 0), new Point(320, 480), 120);\r\n \t}\r\n server.setImage(frame);}\n \tcatch(Exception e){}\r\n }", "public void cameraRotation() throws InterruptedException {\n\t\tint lowSide = (int)random(1,4);\r\n\t\tint highSide = (int)random(5,10);\r\n\t\tint medLowSide = (int)random(10,15);\r\n\t\tint medHighSide = (int)random(35,60);\r\n\t\tint highLowSide = (int)random(70,100);\r\n\t\tint highHighSide = (int)random(200,300);\r\n\t\tint cameraRotRandom = (int)random(0,1000);\r\n\t\t//int cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this?\r\n\t\t\r\n\t\t// twitch\r\n\t\tif (cameraRotRandom <= 200) {\r\n\t\t\t//log(\"antiban, move camera, twitch\");\r\n\t\t\tint twitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (twitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (twitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// medium movements\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 900) {\r\n\t\t\t//log(\"antiban, move camera, medium\");\r\n\t\t\tint medtwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (medtwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (medtwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// complete rotations\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 1000) {\r\n\t\t\t//log(\"antiban, move camera, long rotation\");\r\n\t\t\tint hightwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (hightwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (hightwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tlog(\"something went wrong with antiban camera rotation\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAMERA.zAxis = zc;\n\t\tVector xc = MathUtils.cross(CAMERA.src.d, new Vector(0, 1, 0)).normalized();\n\t\tCAMERA.xAxis = xc;\n\t\tVector yc = MathUtils.cross(zc, xc).normalized();\n\t\tCAMERA.yAxis = yc;\n\t\t\n\t\tSystem.out.println(\"***** just set camera: \" + CAMERA.toString());\n\t}", "public void update() {\n\t\tupdateCamera();\n\t}", "private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}", "@Override\r\n\tpublic void move() {\n\t\tSystem.out.println(name+\"fly in the sky\");\r\n\t}", "public void move() {\n\t\tSystem.out.println(\"Robot Can Move\");\n\t}", "public void runProjectionMotion(){\n\t\tpos.setLocation(pos.getX() + vel[0]/5, pos.getY() - vel[1]/5);\r\n\t\tvel[1]-=gravity;\r\n\t}", "public void move() {\n\n }", "public void move(Camera camera) {\n stormCloud.setPosition(0, camera.getPositionY() - 387 * 2);\n cloudRectangle.setPosition(stormCloud.getX(),stormCloud.getY());\n }", "@Override\n protected void flamemove ()\n {\n \n }", "public void caminar(){\n if(this.robot.getOrden() == true){\n System.out.println(\"Ya tengo la orden, caminare a la cocina para empezar a prepararla.\");\n this.robot.asignarEstadoActual(this.robot.getEstadoCaminar());\n }\n }", "@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Driving a airplane!\");\n\t}", "@Override\n public void onMove(float x, float y) {\n }", "public void onLogFPS() {\n }", "@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"fly\");\n\n\t}", "@SuppressWarnings(\"unused\")\n private void moveCamera(JSONArray args, CallbackContext callbackContext) throws JSONException {\n this.updateCameraPosition(\"moveCamera\", args, callbackContext);\n }", "private Mat4x4 calculateMatCamera(Vec4df up, Vec4df target, Mat4x4 transform) {\n lookDirection = MatrixMath.matrixMultiplyVector(transform, target);\n target = MatrixMath.vectorAdd(origin, lookDirection);\n return MatrixMath.matrixPointAt(origin, target, up);\n }", "@Override\n public void render(float delta) {\n Gdx.gl.glClearColor(255,255,255,0);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n // 2)Input handling\n input();\n\n // 3)Update system\n\n // 3.1)---> Update Cam\n cam.update();\n game.batch.setProjectionMatrix(cam.combined);\n\n // 4)Draw\n game.batch.begin();\n draw();\n game.batch.end();\n\n\n // 3.2)---> Update Game\n\n update();\n }", "void onMove();", "@Override\n public void onMove(boolean absolute) {\n \n }", "public void move();", "public void move();", "public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}", "@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }", "public void Move()\n {\n \n }", "public void moveForward(){\n\t\tSystem.out.println(\"Vehicle moved forward\");\n\t}", "@Override\r\n\tpublic void move() {\n\r\n\t}", "protected void execute() {\n \tif (m_moving)\n \t{\n \t\tdouble direction;\n \tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n \t{\n \t\tdirection = 0;\n \t\tm_moving = false;\n \t\tm_cameraThread = new CameraThread();\n \t\tm_cameraThread.start();\n \t\tRobot.getDriveBase().teleopDrive(0.0, 0.0);\n \t}\n \telse\n \t{\n\t \tif (Gyro.getYaw() < m_desiredYaw)\n\t \t{\n\t \t\tdirection = 1;\n\t \t}\n\t \telse\n\t \t{\n\t \t\tdirection = -1;\n\t \t}\n\t \t\n\t \tif (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) > m_intervalTolerance)\n\t \t{\n\t \t\tm_speed -= 0.05;\n\t \t}\n\t \telse if (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) < (m_intervalTolerance * -1))\n\t \t{\n\t \t\tm_speed += 0.05;\n\t \t}\n\t \t\n\t \tif (Math.abs((Gyro.getYaw() - m_lastYaw) + Gyro.getYaw() / Math.abs(m_desiredYaw)) >= m_percentDegreesToSlow)\n\t \t{\n\t \t\tm_speed -= 0.007;\n\t \t}\n\t \t\n\t \tif (m_speed < 0)\n\t \t{\n\t \t\tm_speed = 0.0;\n\t \t}\n\t \telse if (m_speed > 1)\n\t \t{\n\t \t\tm_speed = 1.0;\n\t \t}\n\t \t\n\t \tRobot.getDriveBase().teleopDrive(0.0, m_speed * direction);\n\t \tm_lastYaw = Gyro.getYaw();\n \t}\n \t}\n \telse\n \t{\n\t \tif (m_cameraThread.isAlive() == false)\n\t \t{\n\t \t\tif (m_cameraThread.weHaveAShot())\n\t \t\t{\n\t \t\t\tif (Gyro.getYaw() >= CameraThread.desiredLeftYaw() && Gyro.getYaw() <= CameraThread.desiredRightYaw())\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_desiredYaw = CameraThread.desiredCenterYaw();\n\t\t \t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tdouble pixels = m_cameraThread.shotAngleError();\n\t \t\t\t//m_desiredYaw = CameraThread.yawWhenPicture() - pixels * 54 / 640;\n\t \t\t\tm_desiredYaw = CameraThread.yawWhenPicture() - pixels * 0.075; //try with 61 / 640\n\t \t\t\tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t}\n \t}\n \tSmartDashboard.putNumber(\"Desired Yaw\", m_desiredYaw);\n \t\n \tSystem.out.println(\"speed: \" + m_speed);\n \tSystem.out.println(\"desired yaw: \" + m_desiredYaw);\n \tSystem.out.println(\"is moving: \" + m_moving);\n }", "@Override\r\n\tpublic void turn(float delta) {\n\t\t\r\n\t}", "@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"하늘을 날다\");\n\t}", "public void moveActor();", "public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }", "public void move(TrackerState state) {\n\t\t\n\t\tcurrentPosition[0] = state.devicePos[0];\n\t\tcurrentPosition[1] = state.devicePos[1];\n\t\tcurrentPosition[2] = state.devicePos[2];\n\t\t\n\t\tboolean processMove = false;\n\t\t\n\t\tboolean isWheel = (state.actionType == TrackerState.TYPE_WHEEL);\n\t\tboolean isZoom = (isWheel || state.ctrlModifier);\n\t\t\n\t\tif (isZoom) {\n\t\t\t\n\t\t\tdirection[0] = 0;\n\t\t\tdirection[1] = 0;\n\t\t\t\n\t\t\tif (isWheel) {\n\t\t\t\tdirection[2] = state.wheelClicks * 0.1f;\n\t\t\t\t\n\t\t\t} else if (state.ctrlModifier) {\n\t\t\t\tdirection[2] = (currentPosition[1] - startPosition[1]);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdirection[2] = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (direction[2] != 0) {\n\t\t\t\t\n\t\t\t\tdirection[2] *= 16;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tinVector.x = startViewMatrix.m02;\n\t\t\t\tinVector.y = startViewMatrix.m12;\n\t\t\t\tinVector.z = startViewMatrix.m22;\n\t\t\t\tinVector.normalize();\n\t\t\t\tinVector.scale(direction[2]);\n\t\t\t\t\n\t\t\t\tpositionVector.add(inVector);\n\t\t\t\t\n\t\t\t\t// stay above the floor\n\t\t\t\tif (positionVector.y > 0) {\n\t\t\t\t\tdestViewMatrix.set(startViewMatrix);\n\t\t\t\t\tdestViewMatrix.setTranslation(positionVector);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\tdirection[0] = -(startPosition[0] - currentPosition[0]);\n\t\t\tdirection[1] = -(currentPosition[1] - startPosition[1]);\n\t\t\tdirection[2] = 0;\n\t\t\t\n\t\t\tfloat Y_Rotation = direction[0];\n\t\t\tfloat X_Rotation = direction[1];\n\t\t\t\n\t\t\tif( ( Y_Rotation != 0 ) || ( X_Rotation != 0 ) ) {\n\t\t\t\t\n\t\t\t\tdouble theta_Y = -Y_Rotation * Math.PI;\n\t\t\t\tdouble theta_X = -X_Rotation * Math.PI;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tpositionVector.x -= centerOfRotation.x;\n\t\t\t\tpositionVector.y -= centerOfRotation.y;\n\t\t\t\tpositionVector.z -= centerOfRotation.z;\n\t\t\t\t\n\t\t\t\tif (theta_Y != 0) {\n\n\t\t\t\t\trot.set(0, 1, 0, (float)theta_Y);\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (theta_X != 0) {\n\t\t\t\t\t\n\t\t\t\t\tvec.set(positionVector);\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tfloat angle = vec.angle(Y_AXIS);\n\t\t\t\t\t\n\t\t\t\t\tif (angle == 0) {\n\t\t\t\t\t\tif (theta_X > 0) {\n\t\t\t\t\t\t\trightVector.x = startViewMatrix.m00;\n\t\t\t\t\t\t\trightVector.y = startViewMatrix.m10;\n\t\t\t\t\t\t\trightVector.z = startViewMatrix.m20;\n\t\t\t\t\t\t\trightVector.normalize();\n\t\t\t\t\t\t\trot.set(rightVector.x, 0, rightVector.z, (float)theta_X);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trot.set(0, 0, 1, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((theta_X + angle) < 0) {\n\t\t\t\t\t\t\ttheta_X = -(angle - 0.0001f);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvec.y = 0;\n\t\t\t\t\t\tvec.normalize();\n\t\t\t\t\t\trot.set(vec.z, 0, -vec.x, (float)theta_X);\n\t\t\t\t\t}\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpositionPoint.x = positionVector.x + centerOfRotation.x;\n\t\t\t\tpositionPoint.y = positionVector.y + centerOfRotation.y;\n\t\t\t\tpositionPoint.z = positionVector.z + centerOfRotation.z;\n\t\t\t\t\n\t\t\t\t// don't go below the floor\n\t\t\t\tif (positionPoint.y > 0) {\n\t\t\t\t\t\n\t\t\t\t\tmatrixUtils.lookAt(positionPoint, centerOfRotation, Y_AXIS, destViewMatrix);\n\t\t\t\t\tmatrixUtils.inverse(destViewMatrix, destViewMatrix);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (processMove) {\n\t\t\t\n\t\t\tboolean collisionDetected = \n\t\t\t\tcollisionManager.checkCollision(startViewMatrix, destViewMatrix);\n\t\t\t\n\t\t\tif (!collisionDetected) {\n\t\t\t\tAV3DUtils.toArray(destViewMatrix, array);\n\t\t\t\tChangePropertyTransientCommand cptc = new ChangePropertyTransientCommand(\n\t\t\t\t\tve, \n\t\t\t\t\tEntity.DEFAULT_ENTITY_PROPERTIES, \n\t\t\t\t\tViewpointEntity.VIEW_MATRIX_PROP,\n\t\t\t\t\tarray,\n\t\t\t\t\tnull);\n\t\t\t\tcmdCntl.execute(cptc);\n\t\t\t\tif (statusManager != null) {\n\t\t\t\t\tstatusManager.fireViewMatrixChanged(destViewMatrix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstartPosition[0] = currentPosition[0];\n\t\tstartPosition[1] = currentPosition[1];\n\t\tstartPosition[2] = currentPosition[2];\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 }", "void move();", "public void act() \n {\n movement();\n }", "protected void execute() {\t\n \ttarget = Robot.trackingCamera.getTargetPosition();\n \t\n \tSmartDashboard.putNumber(\"targetX\", target[0]);\n \tSmartDashboard.putNumber(\"targetY\", target[1]);\n \t\n \tif(target[0] == TrackingCamera.NOTFOUND || lastDistance < 28){\n \t\tsuper.execute();\n \t\treturn;\n \t}\n \t\n \ttargetX = target[0];\n \ttargetY = target[1];\n \t\n \tsuper.execute();\n \t//System.out.println(distance);\n }", "@Override\n public void move () {\n }", "@Override\n\tpublic void move() {\n\t\t\n\t}", "@Override\n public void init() {\n startCamera();\n }", "public void tick(){\n camera.tick(player);\n handler.tick();\n }", "private void handleDebugInput(float deltaTime)\n\t{\n\t\tif (Gdx.app.getType() != ApplicationType.Desktop) return;\n\t \n\t // Camera Controls (move)\n\t float camMoveSpeed = 5 * deltaTime;\n\t float camMoveSpeedAccelerationFactor = 5;\n\t if (Gdx.input.isKeyPressed(Keys.SHIFT_LEFT)) camMoveSpeed *=\n\t camMoveSpeedAccelerationFactor;\n\t if (Gdx.input.isKeyPressed(Keys.LEFT)) moveCamera(-camMoveSpeed, 0);\n\t if (Gdx.input.isKeyPressed(Keys.RIGHT)) moveCamera(camMoveSpeed,\n\t 0);\n\t if (Gdx.input.isKeyPressed(Keys.UP)) moveCamera(0, camMoveSpeed);\n\t if (Gdx.input.isKeyPressed(Keys.DOWN)) moveCamera(0,\n\t -camMoveSpeed);\n\t if (Gdx.input.isKeyPressed(Keys.BACKSPACE))\n\t cameraHelper.setPosition(0, 0);\n\n\t // Camera Controls (zoom)\n\t float camZoomSpeed = 1 * deltaTime;\n\t float camZoomSpeedAccelerationFactor = 5;\n\t if (Gdx.input.isKeyPressed(Keys.SHIFT_LEFT)) camZoomSpeed *=\n\t camZoomSpeedAccelerationFactor;\n\t if (Gdx.input.isKeyPressed(Keys.COMMA))\n\t cameraHelper.addZoom(camZoomSpeed);\n\t if (Gdx.input.isKeyPressed(Keys.PERIOD)) cameraHelper.addZoom(\n\t -camZoomSpeed);\n\t if (Gdx.input.isKeyPressed(Keys.SLASH)) cameraHelper.setZoom(1);\n\t}", "public AlignByCamera ()\n\t{\n\t\trequires(Subsystems.transmission);\n\t\trequires(Subsystems.goalVision);\n\n\t\tthis.motorRatio = DEFAULT_ALIGNMENT_SPEED;\n\t}", "public void openCamera() {\n Toast.makeText(this, \"Coming soon...\", Toast.LENGTH_SHORT).show();\n }", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "private void updateView(){\n \n camera.updateView();\n }", "public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}", "void cameraInOperation(boolean in_operation, boolean is_video);", "@Override\n public void onMovement() {\n showToast(\"设备移动\");\n LogUtil.e(\"move\");\n }", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "public void move()\n\t{\n\t\tx = x + logDx;\n\t}", "private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }", "void doneMoving();", "public void move(){\n switch(image){\n case 0: // Case 0: Ant moves up/north. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] -= 1;\n if(this.position[0] < 0){\n this.position[0] = 19;\n }\n break;\n case 1: // Case 1: Ant moves right/east. If the ant hits the right border of the screen the ant will appear at the left border of it\n this.position[1] += 1;\n if(this.position[1] == 20){\n this.position[1] = 0;\n }\n break;\n case 2: // Case 2: Ant moves down/south. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] += 1;\n if(this.position[0] == 20){\n this.position[0] = 0;\n }\n break;\n case 3: // Case 3: Ant moves left/west. If the ant hits the left border of the screen the ant will appear at the right border of it\n this.position[1] -= 1;\n if(this.position[1] < 0){\n this.position[1] = 19;\n }\n break;\n default: // Default: This shouldn't happen on a normal run. It prints an error.\n System.err.println(\"Something went wrong while the ant was trying to move\");\n }\n }", "@Override\n\tpublic void move() {\n\n\t}", "@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n// steering = (TextView) findViewById(R.id.steering_angle);\n\n\n Mat frame = inputFrame.rgba();\n steering_angle_ = get_steering_prediction(frame.clone());\n Mat displayMat = null;\n// if(counterFrme % 10 == 0 || counterFrme %10 ==1 || counterFrme %10 ==2 || counterFrme %10 ==3 || counterFrme %10 ==4 ) {\n displayMat = draw_LaneLines(frame.clone());\n// displayMat = CarDetect(displayMat);\n// displayMat = PedestrainDet(frame.clone());\n\n// }else{\n// displayMat = frame;\n// }\n\n counterFrme ++;\n if(steering_angle_< 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn left \" + steering_angle_ * -1 + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n if(steering_angle_ > 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn right \" + steering_angle_ + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n\n return displayMat;\n\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "public String move()\n {\n return \"Vehicle is moving \";\n }", "Camera getCamera();", "@Override\n\tvoid move(int x, int y) {\n\n\t}", "public void updateCamera(Camera cam, double distance) {\r\n camera = cam;\r\n screenDistance = distance;\r\n }", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "public void move(){\n System.out.println(\"I can't move...\");\n }", "@Override\n\tpublic void move() {\n\t}", "@Override\n public void setCamera (GL2 gl, GLU glu, GLUT glut) {\n glu.gluLookAt(0, 0, 2.5, // from position\n 0, 0, 0, // to position\n 0, 1, 0); // up direction\n }", "public void setupCamera() {\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n\r\n if(isTiling) {\r\n float mod=1f/10f;\r\n p.frustum(width*((float)tileX/(float)tileNum-.5f)*mod,\r\n width*((tileX+1)/(float)tileNum-.5f)*mod,\r\n height*((float)tileY/(float)tileNum-.5f)*mod,\r\n height*((tileY+1)/(float)tileNum-.5f)*mod,\r\n cameraZ*mod, 10000);\r\n }\r\n\r\n }", "void cameraClosed();", "public void startCamera()\n {\n startCamera(null);\n }", "@Override\n public void simpleUpdate(float tpf) {\n listener.setLocation(cam.getLocation());\n listener.setRotation(cam.getRotation());\n }", "void look() {\n vision = new float[9];\n //look left\n PVector direction;\n for (int i = 0; i< vision.length; i++) {\n direction = PVector.fromAngle(rotation + i*(Constants.processing.PI/4));\n direction.mult(10);\n vision[i] = lookInDirection(direction);\n }\n\n if (canShoot && vision[0] !=0) {\n vision[8] = 1;\n } else {\n vision[8] =0;\n }\n }", "@Override\n public void update(double delta) {\n model.rotateXYZ(0,(1 * 0.001f),0);\n\n float acceleration = 0.1f;\n float cameraSpeed = 1.5f;\n\n // Left - right\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_A) == GLFW_PRESS)\n speedz+= (speedz < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_A) == GLFW_RELEASE)\n speedz-= (speedz-acceleration > 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_D) == GLFW_PRESS)\n speedz-= (speedz > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_D) == GLFW_RELEASE)\n speedz+= (speedz+acceleration < 0) ? acceleration : 0;\n\n // Forward - backward\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_W) == GLFW_PRESS)\n speedx+= (speedx < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_W) == GLFW_RELEASE)\n speedx-= (speedx > 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_S) == GLFW_PRESS)\n speedx-= (speedx > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_S) == GLFW_RELEASE)\n speedx+= (speedx+acceleration < 0) ? acceleration : 0;\n\n // up - down\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_Q) == GLFW_PRESS)\n speedy+= (speedy < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_Q) == GLFW_RELEASE)\n speedy-= (speedy > 0.1) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_E) == GLFW_PRESS)\n speedy-= (speedy > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_E) == GLFW_RELEASE)\n speedy+= (speedy < 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_TAB) == GLFW_PRESS) {\n speedz = 0;\n speedx = 0;\n }\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_R) == GLFW_PRESS) {\n debugCameraObject.eyePos.x = 0;\n debugCameraObject.eyePos.y = 0;\n debugCameraObject.eyePos.z = 0;\n }\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_T) == GLFW_PRESS) {\n showSkybox = !showSkybox;\n }\n\n\n debugCameraObject.processKeyboard(DebugCamera.CameraMovement.RIGHT, (float) (speedz * delta));\n debugCameraObject.processKeyboard(DebugCamera.CameraMovement.FORWARD, (float) (speedx * delta));\n }", "public void loop() {\n telemetry.addData(\"loop count:\", mLoopCount++);\n telemetry.addData(\"version: \", \"1.3\");\n\n int[] topScan;\n int[] middleScan;\n int[] bottomScan;\n\n // get most recent frame from camera (may be same as last time or null)\n CameraLib.CameraImage frame = mCamAcqFr.loop();\n\n // log debug info ...\n if (frame != null) {\n\n // process the current frame\n // ... \"move toward the light...\"\n\n // log data about the most current image to driver station every loop so it stays up long enough to read\n Camera.Size camSize = frame.cameraSize();\n telemetry.addData(\"preview camera size: \", String.valueOf(camSize.width) + \"x\" + String.valueOf(camSize.height));\n telemetry.addData(\"preview data size:\", frame.dataSize());\n telemetry.addData(\"preview rgb(center):\", String.format(\"%08X\", frame.getPixel(camSize.width / 2, camSize.height / 2)));\n telemetry.addData(\"frame number: \", mCamAcqFr.frameCount());\n\n // log text representations of several significant scanlines\n\n topScan = frame.scanlineValue(camSize.height / 3);\n middleScan = frame.scanlineValue(camSize.height / 2);\n bottomScan = frame.scanlineValue(camSize.height * 2 / 3);\n\n //telemetry.addData(\"value a(1/3): \", topScan);\n //telemetry.addData(\"value b(1/2): \", middleScan);\n //telemetry.addData(\"value c(2/3): \", bottomScan);\n\n final int bandSize = 10;\n telemetry.addData(\"hue a(1/3): \", frame.scanlineHue(camSize.height / 3, bandSize));\n telemetry.addData(\"hue b(1/2): \", frame.scanlineHue(camSize.height / 2, bandSize));\n telemetry.addData(\"hue c(2/3): \", frame.scanlineHue(2*camSize.height / 3, bandSize));\n\n int topThresh = threshFind(topScan);\n int middleThresh = threshFind(middleScan);\n int bottomThresh = threshFind(bottomScan);\n\n telemetry.addData(\"Top Thresh\", topThresh);\n telemetry.addData(\"Middle Thresh\", middleThresh);\n telemetry.addData(\"Bottom Thresh\", bottomThresh);\n\n int topPos = findAvgOverThresh(topScan, topThresh);\n int middlePos = findAvgOverThresh(middleScan, middleThresh);\n int bottomPos = findAvgOverThresh(bottomScan, bottomThresh);\n\n telemetry.addData(\"Top Pos\", topPos);\n telemetry.addData(\"Middle Pos\", middlePos);\n telemetry.addData(\"Bottom Pos\", bottomPos);\n }\n }", "public void centerCameraOn(GameObject thing) {\r\n\t\tthis.cameraX = (int)(thing.getX() - Game.WIDTH / 2);\r\n\t\tthis.cameraY = (int) (thing.getY() - Game.HEIGHT / 2);\r\n\t}", "public void move() {\r\n\t\tSystem.out.print(\"This Tiger moves forward\");\r\n\t}" ]
[ "0.7439807", "0.70505416", "0.69580024", "0.693812", "0.68630666", "0.6737074", "0.6716315", "0.6664952", "0.6606811", "0.65525544", "0.65431684", "0.6469783", "0.64266247", "0.6417439", "0.6405307", "0.63147026", "0.6289205", "0.6176955", "0.6161576", "0.61582106", "0.61503744", "0.6110967", "0.6105969", "0.6104442", "0.60936415", "0.607671", "0.60739326", "0.6062543", "0.60604405", "0.6053656", "0.6053361", "0.60399896", "0.6028199", "0.60226095", "0.60076356", "0.59827274", "0.5967101", "0.5946554", "0.5943749", "0.59214854", "0.589184", "0.5843066", "0.5834409", "0.5831598", "0.5830973", "0.5823454", "0.58170646", "0.58170646", "0.58145535", "0.57821053", "0.5779673", "0.57789546", "0.5778554", "0.57747084", "0.5760853", "0.57567894", "0.57546777", "0.5751968", "0.5749542", "0.57481706", "0.57423055", "0.5737871", "0.5731304", "0.5729163", "0.5719837", "0.5719764", "0.571478", "0.57129586", "0.5711446", "0.57106876", "0.5707113", "0.5702416", "0.56893146", "0.56846535", "0.5680763", "0.5680451", "0.5677178", "0.5677171", "0.5675622", "0.56719273", "0.5669429", "0.56625974", "0.5660679", "0.5648245", "0.56437355", "0.5642189", "0.563545", "0.56340325", "0.56256735", "0.5624636", "0.56224865", "0.5621566", "0.5619789", "0.5618785", "0.56061304", "0.56058455", "0.56003314", "0.55980563", "0.5591271", "0.55904365" ]
0.6031144
32
random mouse movements over the screen log("antiban, mouse movements");
public void mouseMovements() throws InterruptedException{ int intMouseX = (int)random(10,700); int intMouseY = (int)random(10,400); int randomMouse = (int)random(0,1000); // small movements if (randomMouse <= 400) { getMouse().move(intMouseX,intMouseY); sleep(random(100,300)); getMouse().move((intMouseX + random(20,70)),(intMouseY + random(10,50))); sleep(random(100,300)); if (randomMouse <= 300) { getMouse().move((intMouseX + random(20,70)),(intMouseY + random(10,50))); sleep(random(100,300)); } else if (randomMouse <= 375) { getMouse().move((intMouseX + random(20,70)),(intMouseY + random(10,50))); sleep(random(100,300)); getMouse().move((intMouseX + random(20,70)),(intMouseY + random(10,50))); sleep(random(100,300)); } } // medium movements else if (randomMouse <= 800) { getMouse().move(intMouseX,intMouseY); sleep(random(100,300)); getMouse().move((intMouseX + random(100,200)),(intMouseY + random(100,200))); sleep(random(100,300)); if (randomMouse <= 600) { getMouse().move((intMouseX + random(100,200)),(intMouseY + random(100,200))); sleep(random(100,300)); } else if (randomMouse <= 675) { getMouse().move((intMouseX + random(100,200)),(intMouseY + random(100,200))); sleep(random(100,300)); getMouse().move((intMouseX + random(100,200)),(intMouseY + random(100,200))); sleep(random(100,300)); } } // large movements else if (randomMouse <= 1000) { getMouse().move(intMouseX,intMouseY); sleep(random(100,300)); getMouse().move((intMouseX + random(200,300)),(intMouseY + random(200,300))); sleep(random(100,300)); if (randomMouse <= 950) { getMouse().move((intMouseX + random(200,300)),(intMouseY + random(200,300))); sleep(random(100,300)); } else if (randomMouse <= 990) { getMouse().move((intMouseX + random(200,300)),(intMouseY + random(200,300))); sleep(random(100,300)); getMouse().move((intMouseX + random(200,300)),(intMouseY + random(200,300))); sleep(random(100,300)); } }else { log("something went wrong with antiban mouse movement"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "public static void main(String[] args) throws AWTException, InterruptedException {\n\t\tRobot robot = new Robot();\n\t\tPoint point = new Point();\n\t\tRandom random = new Random();\n\t\tint x, y, xSign, ySign, time;\n\t\t\n\t\twhile(true)\n\t\t{\n\t\t\tx = random.nextInt(6);\t\t\t\t\t//random number between 0 and 5\n\t\t\ty = random.nextInt(6);\t\t\t\t\t//random number between 0 and 5\n\t\t\txSign = (random.nextInt(2)==0)?-1:1;\t//randomly either -1 or 1\n\t\t\tySign = (random.nextInt(2)==0)?-1:1;\t//randomly either -1 or 1\n\t\t\ttime = random.nextInt(10001);\t\t\t//random time between 0 and 10 seconds\n\t\t\t\n\t\t\tpoint = MouseInfo.getPointerInfo().getLocation();\t\t\t//get current position of cursor\n\t\t\trobot.mouseMove(point.x + x * xSign, point.y + y * ySign);\t//move it within a 5 pixel square \n\t\t\tThread.sleep(time);\t\t\t\t\t\t\t\t\t\t \t//random interval(0 - 10 seconds)\n\t\t}\n\t\t\n\t}", "private void randomMove() {\n }", "public void shield_random_start() {\n\t\tint randomX;\n\t\tint randomY;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tescudo.setX_coord(randomX); \n\t\tescudo.setY_coord(randomY);\n\t\tchange_escudo_pos();\n\t}", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }", "public static void main(String[] args) throws AWTException {\n\n\nPointerInfo a = MouseInfo.getPointerInfo();\nPoint b = a.getLocation();\nint x = (int) b.getX();\nint y = (int) b.getY();\nSystem.out.print(y + \"jjjjjjjjj\");\nSystem.out.print(x);\nRobot r = new Robot();\nr.mouseMove(x, y - 50);\n\n\n\t}", "public void generateRandomEvents();", "public void randomizePointer(){\n\n pointerPos.set(p.random(BASE_POS.x,BASE_POS.x+300),p.random(BASE_POS.y-300,BASE_POS.y+300));\n while(pointerPos.dist(BASE_POS)>280 || pointerPos.dist(BASE_POS)<80 || p.atan2(pointerPos.y-BASE_POS.y,pointerPos.x - BASE_POS.x)>p.radians(60)){\n pointerPos.set(p.random(BASE_POS.x,BASE_POS.x+300),p.random(BASE_POS.y-300,BASE_POS.y+300));\n }\n }", "public void randomWalk() {\n if (getX() % GameUtility.GameUtility.TILE_SIZE < 5 && getY() % GameUtility.GameUtility.TILE_SIZE < 5) {\n if (canChangeDirection) {\n direction = (int) (Math.random() * 3);\n direction += 1;\n direction *= 3;\n canChangeDirection = false;\n }\n }\n move(direction);\n if (timer >= timeTillChanngeDirection) {\n canChangeDirection = true;\n timer = 0;\n }\n\n if (lastLocation.x == this.getLocation().x && lastLocation.y == this.getLocation().y) {\n direction = (direction + 3) % 15;\n canChangeDirection = false;\n\n }\n lastLocation = this.getLocation();\n\n }", "public static void main(String[]args) {\n\t\t//2. create an array of 5 robots.\n\t\tRobot[] potato = new Robot[3];\n\t\t//3. use a for loop to initialize the robots.\n\t\tfor(int i = 0; i<potato.length; i++) {\n\t\t\tpotato[i]= new Robot();\n\t\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\n\t\t\t//potato[i].setX(i*100+50);\n\t\t\t//potato[i].setY(500);\n\t\t\tpotato[i].setX(250);\n\t\t\tpotato[i].setSpeed(100);\n\t\t}\n\tpotato[0].setPenColor(Color.red);\n\tpotato[1].setPenColor(Color.blue);\n\tpotato[2].setPenColor(Color.green);\n\tpotato[0].penDown();\n\tpotato[1].penDown();\n\tpotato[2].penDown();\n\t\n\t\t//5. use another for loop to iterate through the array and make each robot move \n\t\t// a random amount less than 50.\n\t\tRandom ran = new Random();\n\t\t\n\t\tboolean done = false;\n\tint x =0;\n\tRobot rob = new Robot();\n\trob.penDown();\n\trob.setSpeed(100);\n\trob.setX(300);\n\tfor(int i = 0; i < 360; i++) {\n\t\trob.move(2);\n\t\trob.turn(1);\n\t}\n\trob.penUp();\n\trob.move(1000);\n\tRobot r2 = new Robot();\n\tr2.penDown();\n\tr2.setSpeed(100);\n\tr2.setX(200);\n\tfor(int i = 0; i < 360; i++) {\n\t\tr2.move(4);\n\t\tr2.turn(1);\n\t}\n\tr2.penUp();\n\tr2.move(1000);\n\t\n\twhile(!done) {\n\t\tfor(int i = 0; i<potato.length&&!done; i++) {\t\n\t\t\tint u = ran.nextInt(50)+1;\n\t\t\tfor(int y = 0;y<u ;y++) {\n\t\t\tpotato[i].move(3);\n\t\t\tpotato[i].turn(1);\n\t\t\t}\n\t\t\tx=i+1;\n\t\t\tif(potato[i].getX()<=252) {\n\t\t\t\tdone=true;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\n\n\t//7. declare that robot the winner and throw it a party!\n\t\tSystem.out.println(\"The fastest robot is robot #\" + x);\n\t//8. try different races with different amounts of robots.\n\t\t\n\t//9. make the robots race around a circular track.\n\t\n}", "public void runRandom()\n\t{\n\t\tinit(); //Scan the area\n\t\t\n\t\twaitForPress();\n\t\twhile(_run)\n\t\t{\n\t\t\tboolean midLine = LS_MIDDLE.getLightValue() >= s_mid.threshold;\n\t\t\tboolean leftLine = LS_LEFT.getLightValue() >= s_left.threshold;\n\t\t\tboolean rightLine = LS_RIGHT.getLightValue() >= s_right.threshold;\n\t\t\t\n\t\t\tif(!leftLine && !rightLine) //INTERSECTION\n\t\t\t{\n\t\t\t\tstop();\n\t\t\t\tgoForward(50);\n\t\t\t\tchooseRandomDirection();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (midLine && leftLine && rightLine) turnAround();\n\t\t\t\telse followLine();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public final void move() {\n int x = getPosisi().getX();\n int y = getPosisi().getY();\n int dx = 0, dy = 0;\n\n if (getWaktu() % getDeltaTime() == 0) {\n do {\n do {\n Random randomGenerator = new Random();\n dx = randomGenerator.nextInt(N_RAND) - 1;\n dy = randomGenerator.nextInt(N_RAND) - 1;\n } while (dx == 0 && dy == 0);\n } while (x + dx < 0 || x + dx > getWorldSize() - 1\n || y + dy < 0 || y + dy > getWorldSize() - 1);\n }\n setPX(x + dx);\n setPY(y + dy);\n }", "public void randomTeleport() {\n Random random = new Random(seed);\n seed = random.nextInt(10000);\n int randomY = RandomUtils.uniform(random, 0, worldHeight);\n int randomX = RandomUtils.uniform(random, 0, worldWidth);\n int randomDirection = RandomUtils.uniform(random, 0, 4);\n move(randomX, randomY);\n turn(randomDirection);\n }", "private void random() {\n\n\t}", "void random_alien_fires() {\n Random rand = new Random();\n int alien_index = rand.nextInt(aliens.size());\n alien_shoot_missile(aliens.get(alien_index));\n }", "public void randomMove() {\r\n\t\tRandom rand = new Random();\r\n\t\tint moveNum = rand.nextInt(100)+100;\r\n\t\tcheck++;\r\n\t\tif(check >= moveNum) {\r\n\t\t\tspeed = speed*-1;\r\n\t\t\tcheck =0;\r\n\r\n\t\t}\r\n\r\n\t\tif(speed > 0) {\r\n\t\t\tsetIcon(rightImage);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetIcon(leftImage);\r\n\t\t}\r\n\t\tx += speed; setLocation(x,y); repaint();\r\n\t}", "private void moveRandomly()\r\n {\r\n if (Greenfoot.getRandomNumber (100) == 50)\r\n turn(Greenfoot.getRandomNumber(360));\r\n else\r\n move(speed);\r\n }", "void mouseMove(int x,int y) throws BhelpException\n{\n // BoardLog.logD(\"BHELP\",\"MOVE MOUSE \" + x + \" \" + y);\n\n checkMouse();\n\n Point sp = new Point(x,y);\n convertPointToScreen(sp);\n getRobot().mouseMove(sp.x,sp.y);\n setMouse(x,y);\n}", "public void randomWalk(){\r\n int newAngle = (int) ( (double) Math.random() * 360) ;\r\n\r\n super.xVelocity = (velocity * Math.cos(newAngle * Math.PI/180));\r\n super.yVelocity = (velocity * Math.cos(newAngle * Math.PI/180));\r\n }", "private int random_dragao_fire(Dragao dragao) {\n\t\tint spit = (int)(1 + Math.random()*5);\t\t\n\t\tif (spit == 1) {\n\t\t\tint spitX = (int)(1 + Math.random()*2);\n\t\t\tspitX--;\t\t\t\n\t\t\tint spitY = 0;\n\t\t\tif (spitX != 0) {\n\t\t\t\tspitY = (int)(1 + Math.random()*2);\n\t\t\t\tspitY--;\n\t\t\t}\t\t\t\n\t\t\treturn spit_fire (spitX, spitY, dragao);\n\t\t}\n\t\treturn 0;\n\t}", "public void randomDisplayTick(yc world, int i, int j, int k, Random random) {}", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "public abstract void randomMoves();", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "void moveNorthEast(){\n xpos = xpos + 3;\n ypos = ypos-xspeed;\n if (xpos > width){ // 20\n xpos = random(-width/2, width/2); // 25\n ypos = width; // 30\n }\n }", "public int[] move(){\n double inProb = Math.random();\n if (inProb < .25){\n y--;\n }\n else if (inProb < .5){\n y ++;\n }\n else if (inProb <.75){\n x--;\n }\n else {\n x++;\n }\n int[]loc = new int[2];\n loc[0] = x;\n loc[1] = y;\n \n return loc;\n }", "public void Onwin(){\r\n xPos=0;\r\n yPos=0;\r\n indice = rand.nextInt(11);\r\n if(indice==12){indice2= indice-1;}\r\n else{indice2= indice+1;};\r\n\r\n\r\n texto.setText(\"\");\r\n texto.append(expressions[indice]);\r\n texto1.setText(\"\");\r\n texto1.append(expressions[indice2]);\r\n\r\n matrix=generateMatrix(Alphat,expressions[indice]);\r\n textoG.setText(\"\");\r\n for(int i=0;i<matrix.length;i++){\r\n textoG.append(matrix[i]+\"\\n\");\r\n }\r\n\r\n }", "public void randomHit() throws LocationHitException{\r\n\t\t// Random ran = new Random();\r\n\t\tint x = randomX();\r\n\t\tint y = randomY();\r\n\r\n\t\tboolean newHit = false;\r\n\t\twhile (!newHit) {\r\n\t\t\tif (Player.userGrid[x][y] == 2) {\r\n\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t} else\r\n\t\t\t\tnewHit = true;\r\n\t\t}\r\n\t\tint hitCoord[] = { x, y };\r\n\t\tsetCoords(hitCoord);\r\n\t\tString coordx = Integer.toString(x);\r\n\t\tString coordy = Integer.toString(y);\r\n\t\tif (Player.userGrid[x][y] == 1) {\r\n\t\t\t// change the grid value from 1 to 2 to signify hit\r\n\t\t\tPlayer.userGrid[x][y] = 2;\r\n\t\t\t\r\n\t\t\tif(!time1) {\r\n\t\t\t\ttimea=java.lang.System.currentTimeMillis();\r\n\t\t\t\ttime1=!time1;\r\n\t\t\t}else if(!time2) {\r\n\t\t\t\ttimeb=java.lang.System.currentTimeMillis();\r\n\t\t\t\t\ttime2=!time2;\r\n\t\t\t}else {\r\n\t\t\t\tdouble t=timeb-timea;\r\n\t\t\t\tif(t<3000) {\r\n\t\t\t\t\tsetScore(20);\r\n\t\t\t\t}\r\n\t\t\t\ttime1=false;\r\n\t\t\t\ttime2=false;\r\n\t\t\t\ttimea=0;\r\n\t\t\t\ttimeb=0;\r\n\t\t\t\t\r\n\t\t\t}//if time between consecutive hit is less than 3 seconds ,then bonus score\r\n\t\t\tsetScore(10);\r\n\t\t\tPlayer.coordinatesHit.add(coordx + \",\" + coordy);\r\n\t\t\tsetReply(\"It's a Hit!!!!!\");\r\n\r\n\t\t} else if (Player.userGrid[x][y] == 0) {\r\n\t\t\tPlayer.userGrid[x][y] = 3;\r\n\t\t\tsetScore(-1);\r\n\t\t\tsetReply(\"It's a miss!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 2 || Player.userGrid[x][y] == 3) {\r\n\t\t\tsetReply(\"The location has been hit earlier\");\r\n\t\t\t //throw new LocationHitException(\"The location has been hit earlier\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tdouble x = (double) Math.pow(Math.PI, RandomNumbers.getRandomInt(1,9));\n\t\tdouble y = (double) Math.pow(RandomNumbers.getRandomInt(3,14), Math.PI);\n\t\t\n\t\tSystem.out.println(\"X: \" + x + \"\\n\" + \"Y: \" + y);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint x = 120;\n\t\t\n\t\tint rob1 = 0;\n\t\tint rob2 = 0;\n\t\tint rob3 = 0;\n\t\tint rob4 = 0;\n\t\t\n\t\tint[] rob1c = {0, 0};\n\t\tint[] rob2c = {0, 0};\n\t\tint[] rob3c = {0, 0};\n\t\tint[] rob4c = {0, 0};\n\t\t\n\t\tint counts0 = 0;\n\t\tint counts1 = 0;\n\t\tint counts2 = 0;\n\t\tint counts3 = 0;\n\t\t\n\t\tRobot[] rob = new Robot[4];\n\t\tfor (int i = 0; i < rob.length; i++) {\n\t\t\trob[i] = new Robot();\n\t\t\trob[i].miniaturize();\n\t\t\trob[i].setX(x);\n\t\t\trob[i].setSpeed(100);\n\t\t\tif (i == 0) {\n\t\t\t\trob1c[0] = rob[0].getX();\n\t\t\t\trob1c[1] = rob[0].getY();\n\t\t\t}else if (i == 1) {\n\t\t\t\trob2c[0] = rob[1].getX();\n\t\t\t\trob2c[1] = rob[1].getY();\n\t\t\t}else if (i == 2) {\n\t\t\t\trob3c[0] = rob[2].getX();\n\t\t\t\trob3c[1] = rob[2].getY();\n\t\t\t}else if (i == 3) {\n\t\t\t\trob4c[0] = rob[3].getX();\n\t\t\t\trob4c[1] = rob[3].getY();\n\t\t\t}\n\t\t\tx = x - 30;\n\t\t}\n\t\t\n\t\tint dis = 0;\n\t\tboolean win = false;\n\t\twhile (win == false) {\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tdis = new Random().nextInt(30);\n\t\t\t\t\tfor (int j = 0; j < dis; j++) {\n\t\t\t\t\t\trob[0].move(1);\n\t\t\t\t\t\trob1++;\n\t\t\t\t\t\tif (rob1 == 30) {\n\t\t\t\t\t\t\trob[0].turn(36);\n\t\t\t\t\t\t\trob1 = 0;\n\t\t\t\t\t\t\tcounts0++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (counts0 == 10) {\n\t\t\t\t\tSystem.out.println(\"Robot 1 wins!!! ^_^\");\n\t\t\t\t\twin = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (i == 1) {\n\t\t\t\t\tdis = new Random().nextInt(60);\n\t\t\t\t\tfor (int j = 0; j < dis; j++) {\n\t\t\t\t\t\trob[1].move(1);\n\t\t\t\t\t\trob2++;\n\t\t\t\t\t\tif (rob2 == 60) {\n\t\t\t\t\t\t\trob[1].turn(36);\n\t\t\t\t\t\t\trob2 = 0;\n\t\t\t\t\t\t\tcounts1++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (counts1 == 10) {\n\t\t\t\t\tSystem.out.println(\"Robot 2 wins!!! ^_^\");\n\t\t\t\t\twin = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (i == 2) {\n\t\t\t\t\tdis = new Random().nextInt(90);\n\t\t\t\t\tfor (int j = 0; j < dis; j++) {\n\t\t\t\t\t\trob[2].move(1);\n\t\t\t\t\t\trob3++;\n\t\t\t\t\t\tif (rob3 == 90) {\n\t\t\t\t\t\t\trob[2].turn(36);\n\t\t\t\t\t\t\trob3 = 0;\n\t\t\t\t\t\t\tcounts2++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (counts2 == 10) {\n\t\t\t\t\tSystem.out.println(\"Robot 3 wins!!! ^_^\");\n\t\t\t\t\twin = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (i == 3) {\n\t\t\t\t\tdis = new Random().nextInt(120);\n\t\t\t\t\tfor (int j = 0; j < dis; j++) {\n\t\t\t\t\t\trob[3].move(1);\n\t\t\t\t\t\trob4++;\n\t\t\t\t\t\tif (rob4 == 120) {\n\t\t\t\t\t\t\trob[3].turn(36);\n\t\t\t\t\t\t\trob4 = 0;\n\t\t\t\t\t\t\tcounts3++;\n\t\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\tif (counts3 == 10) {\n\t\t\t\t\tSystem.out.println(\"Robot 4 wins!!! ^_^\");\n\t\t\t\t\twin = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "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 void random_hero_start() {\n\t\tint randomX;\n\t\tint randomY;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\theroi.setX_coord(randomX);\n\t\theroi.setY_coord(randomY);\n\t\tchange_hero_pos();\n\t}", "private void wentOffWall() {\n //random location\n b.numX = r.nextInt(2400) + 100;\n b.numY = r.nextInt(1400) + 100;\n //random speed\n b.xSpeed = this.newSpeed();\n b.ySpeed = this.newSpeed();\n }", "public void Onwin2(){\r\n xPos=0;\r\n yPos=0;\r\n indice = rand.nextInt(11);\r\n if(indice==12){indice2= indice-1;}\r\n else{indice2= indice+1;};\r\n\r\n\r\n texto.setText(\"\");\r\n texto.append(expressions[indice2]);\r\n texto1.setText(\"\");\r\n texto1.append(expressions[indice]);\r\n\r\n matrix=generateMatrix(Alphat,expressions[indice]);\r\n textoG.setText(\"\");\r\n for(int i=0;i<matrix.length;i++){\r\n textoG.append(matrix[i]+\"\\n\");\r\n }\r\n\r\n }", "public void random_dragao(int pos) {\n\t\tint randomX = 1;\n\t\tint randomY = 1;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tdragoes[pos].setX_coord(randomX);\n\t\tdragoes[pos].setY_coord(randomY);\n\t\tchange_dragon_pos(pos);\n\t}", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "private void randomBehavior() {\n\t\trandom = rand.nextInt(50);\n\t\tif (random == 0) {\n\t\t\trandom = rand.nextInt(4);\n\t\t\tswitch (random) {\n\t\t\t\tcase 0:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void turnAround() {\n d = Math.random();\n if (d < 0.1) {\n changeAppearance();\n }\n }", "void move()\n {\n Random rand = new Random();\n int moveOrNot = rand.nextInt(2);//50% chance\n if(moveOrNot == 1)\n super.move();\n }", "public void act() {\n if (System.currentTimeMillis() - lastTime > 5000) {\n lastTime = System.currentTimeMillis();\n int y = (int)(Math.random() * ((BackGround1.height-30)+1)+30);\n int x = (int)(Math.random() * ((BackGround1.width-15)+1)+15);\n addObject(new Coin(),x ,y);\n }\n }", "public void randomMove(Random choiceGen){\n\tint choice = choiceGen.nextInt(4);\n\tswitch(choice){\n case 0:\n\tif(position[0] < worldEdge[0]){\n\t position[0] += 1;\n\t break;\n\t}\n\t\n\tcase 1:\n\t if(position[0] > 0){\n\t\tposition[0] -= 1;\n\t }\n\t else{\n\t position[0] += 1;\n\t }\n\t break;\n\tcase 2:\n\t if(position[1] < worldEdge[1]){\n\t\tposition[1] += 1;\n\t\tbreak;\n\t}\n\tcase 3:\n\t if(position[1] > 0){\n\t\tposition[1] -= 1;\n\t }\n\t else{\n\t\tposition[1] += 1;\n\t }\n\t break;\n\t}\n }", "public static void main(String[] args) {\n\t\t\n\t\n\t\t//2. create an array of 5 robots.\n\tRobot[] robot = new Robot[5];\n\t\t//3. use a for loop to initialize the robots.\n\tfor (int i = 0; i < robot.length; i++) {\n\t\trobot[i]=new Robot();\n\t}\n\t\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\nrobot[0].moveTo(50, 550);\nrobot[1].moveTo(150, 550);\nrobot[2].moveTo(250, 550);\nrobot[3].moveTo(350, 550);\nrobot[4].moveTo(450, 550);\n\t\t//5. use another for loop to iterate through the array and make each robot move \n\t // a random amount less than 50.\n \n\t\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\nboolean finished=false;\nwhile(!finished) {\n \tfor (int i = 0; i < robot.length; i++) {\n\tRandom random = new Random();\n\t\trandom.nextInt(50);\n\t\trobot[i].move(i);\n\t\tif(robot[i].getY()==0) {\n \t\tfinished=true;\n \t\trobot[i].sparkle();\n \t\tSystem.out.println(\"You are the winner!\");\n \t\t\n \t}\n \t}\n}\n\t}", "public void posiziona_bersaglio() {\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_x = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_x<102 || bersaglio_x>LARGHEZZA);\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_y = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_y<102 || bersaglio_y>ALTEZZA);\n //System.out.println (\"x : \"+bersaglio_x+\" y : \"+bersaglio_y);\n }", "private MoveAction wanderRandomly() {\n\t\tint intDir = rand.nextInt(8) + 1;\n\t\tDirection direction = Direction.fromInt(intDir);\n\t\treturn moveInDirection(direction);\n\t}", "private void testGrab()\n {\n if(gamepad1.y) {\n //move to position where it touches block ----might have to change angle based on trial----\n //Drastic angles at the moment for testing\n servoLeft.setPosition(0.5);\n //servoRight.setPosition(0.5);\n }\n }", "private Vector3 randomLocationMonster() {\n\t\t\n\t\tVector3 center = this.getEngine().getSceneManager().getRootSceneNode().getLocalPosition();\n\t\tVector3 randomPosition;\n\t\tfloat[] randomFloat;\n\t\tdo {\n\t\t\trandomFloat = randomFloatArray(1000);\n\t\t\trandomPosition = Vector3f.createFrom(randomFloat[0], 1.5f, randomFloat[2]);\n\t\t} while (distanceFrom(center, randomPosition) > 380f);\n\t\treturn randomPosition;\n\t}", "@Override\n public void moverRaton(MouseEvent e) {}", "public void move()\n\t{\n time++;\n\t\tif (time % 10 == 0)\n\t\t{\n\t\t\thistogramFrame.clearData();\n\t\t}\n\t\tfor (int i = 0; i < nwalkers; i++)\n\t\t{\n\t\t\tdouble r = random.nextDouble();\n\t\t\tif (r <= pRight)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] + 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] - 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft + pDown)\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] - 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] + 1;\n\t\t\t}\n\t\t\tif (time % 10 == 0)\n\t\t\t{\n\t\t\t\thistogramFrame.append(Math.sqrt(xpositions[i] * xpositions[i]\n\t\t\t\t\t\t+ ypositions[i] * ypositions[i]));\n\t\t\t}\n\t\t\txmax = Math.max(xpositions[i], xmax);\n\t\t\tymax = Math.max(ypositions[i], ymax);\n\t\t\txmin = Math.min(xpositions[i], xmin);\n\t\t\tymin = Math.min(ypositions[i], ymin);\n\t\t}\n\t}", "public void act() \r\n {\r\n move(5);\r\n if(isAtEdge())\r\n turn(4);\r\n if(Greenfoot.getRandomNumber(35) < 34)\r\n turn(10);\r\n if(Greenfoot.getRandomNumber(20)<5)\r\n turn(-15);\r\n }", "public void generateNether(World world, Random random, int x, int y){\n\t}", "@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\t\thero.x = e.getX();\r\n\t\thero.y = e.getY();\r\n\t\tSystem.out.println(hero.x + \":\" + hero.y);\r\n\t\t\r\n\t}", "@Test\n\tpublic void testMouseMoved() {\n\t}", "@Test\n public void test20True() {\n long start = System.currentTimeMillis();\n for (int i = 1; i <= 20; i++) {\n RandomGUID myguid = new RandomGUID(true);\n System.out.println(i + \" \" + myguid.toString());\n }\n System.out.println(Ansi.ansi().eraseScreen().render(String.format(\"20 条@|blue 耗时 |@@|yellow %s |@@|blue 毫秒|@\", System.currentTimeMillis() - start)));\n }", "public void mousePressed() {\n vy = -17;\n //if we weren't playing the game when pressing the mouse, we want to start\n //the game. We do this by reseting all the values used while playing the game\n if(gamestate==1) {\n wx[0] = 600;\n wy[0] = y = height/2;\n wx[1] = 900;\n wy[1] = 600;\n x = gamestate = score = 0;\n }\n}", "public int randomMove()\r\n {\r\n r = new Random();\r\n x = r.nextInt(7);\r\n return x;\r\n }", "public Position sampleRandomUniformPosition();", "public static void main(String[] args) {\n\t\t\n\t//2. create an array of 5 robots.\n\tRobot[] robs = new Robot[5];\n\t//3. use a for loop to initialize the robots.\n\tfor (int i = 0; i < robs.length; i++) {\n\t\t\trobs[i] = new Robot();\n\t\t\trobs[i].setX(100 * i + 100);\n\t\t\trobs[i].setY(500);\n\t\t\trobs[i].setSpeed(10);\n\t}\n\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\n\t\t\n\t//5. use another for loop to iterate through the array and make each robot move \n\t// a random amount less than 50.\n\tfor (int i = 0; i < robs.length; i++) {\n\t\tRandom rnd = new Random();\n\t\trobs[i].move(rnd.nextInt(50)+1);\n\t}\n\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\n\tboolean notwon = true;\n\tint winner = -250;\n\twhile(notwon) {\n\t\tfor (int i = 0; i < robs.length; i++) {\n\t\t\tRandom rnd = new Random();\n\t\t\trobs[i].move(rnd.nextInt(50)+1);\n\t\t}\n\t\tfor (int i = 0; i < robs.length; i++) {\n\t\t\tif (notwon && winner == -250 && robs[i].getY() <= 72) {\n\t\t\t\twinner = i;\n\t\t\t\tnotwon = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\trobs[winner].sparkle();\n\t//7. declare that robot the winner and throw it a party!\n\t\n\t//8. try different races with different amounts of robots.\n\n\t//9. make the robots race around a circular track.\n}", "@Test\n public void RandomBallLocationStopped() {\n final boolean seenAll[] = new boolean[1];\n seenAll[0] = false;\n\n WheelObserver wheelObserver = new WheelObserver() {\n Set<Integer> seen = new HashSet<Integer>();\n public void stopped(final int location) {\n if (location < 0 || location > 36)\n throw new IllegalArgumentException();\n seen.add(location);\n if (seen.size() == 37) seenAll[0] = true;\n }\n };\n RouletteWheel wheel = new RouletteWheel(wheelObserver);\n\n for (int x = 0; x < 1000; x++)\n {\n wheel.spin(0);\n wheel.tick(20000);\n }\n\n assertTrue(seenAll[0]);\n }", "void moveSouthEast(){\n xpos = xpos + 15;\n ypos = ypos + 15;\n if (xpos > width){ // 25\n xpos = random(-width, width); // 30\n ypos = 0; // 35\n }\n }", "public void makeRandomMove() {\n\t\ttry{\r\n\t\t\tif (playerId == game.getState().getTurn()){\r\n\t\t\t\tgame.execute(randPlayer.requestAction(game.getState()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e){\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void thinking(){\n int sleepTime = (int)(Math.random()*2000);\n try{\n Thread.sleep(sleepTime);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\t\t\n\t\t\t//2. create an array of 5 robots.\n\t\t\tRobot[] a = new Robot[5];\n\t\t\t//3. use a for loop to initialize the robots.\n\t\t\tfor(int i = 0; i<a.length; i++) {\n\t\t\t\ta[i] = new Robot();\n\t\t\t\ta[i].setX(800-i*125);\n\t\t\t\ta[i].setY(400);\n\t\t\t}\n\t\t\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\n\t\t\n\t\t\t//5. use another for loop to iterate through the array and make each robot move \n\t\t // a random amount less than 50.\n\t \n\t\t\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\n\t \tboolean top = false;\n\t \twhile(top == false) {\n\t \t\tfor(int x = 0; x<a.length; x++) {\n\t \t\t\tif(a[x].getY() <= 0) {\n\t \t\t\t\ttop = true;\n\t \t\t\t\tint robotNum = 5-x;\n\t \t\t\t\tJOptionPane.showMessageDialog(null, \"robot #\" + robotNum + \" is the winner\");\n\t \t\t\t}\n\t \t\t} \tfor(int j = 0; j < a.length; j++) {\n\t \t\tint r = new Random().nextInt(50);\n\t \t\ta[j].move(r);\n\t \t}\n\t \t}\n\t\t\t//7. declare that robot the winner and throw it a party!\n\t \t\n\t\t\t//8. try different races with different amounts of robots.\n\t \t\n\t\t //9. make the robots race around a circular track.\n\t\t}", "@Override\r\n\tprotected void action() {\r\n\t\tdistance = ir.getDistance();\r\n\t\ttimer = getTimer.getTimer();\r\n\t\tcolorID = color.getColorID();\r\n\t\tdirection = random.nextInt(4) + 1;\r\n\t\tDoge.message(6, \"Random: \" + Integer.toString(direction));\r\n\r\n\t\tif (colorID == Color.YELLOW) { // If sensor is on yellow, stop motor\r\n\t\t\tmotor.halt();\r\n\t\t\ttail.wagTail(4,700);\r\n\t\t\twhile (colorID == Color.YELLOW) {\r\n\t\t\t\tcolorID = color.getColorID();\r\n\t\t\t\tDelay.msDelay(500);\r\n\t\t\t}\r\n\t\t} else if (distance > 5 && distance <= 50) { //If something is in front, change direction\r\n\t\t\tif (lastTurn == 0) { \r\n\t\t\t\tmotor.rollRight();\r\n\t\t\t} else if (lastTurn == 1) {\r\n\t\t\t\tmotor.rollLeft();\r\n\t\t\t}\r\n\t\t\twhile (distance > 5 && distance <= 50 && colorID != Color.YELLOW) { // Delay to to\r\n\t\t\t\tDelay.msDelay(1000);\t\t\t\t\t\t\t\t\t\t//give some time\r\n\t\t\t\tdistance = ir.getDistance();\t\t\t\t\t\t\t\t//to turn\r\n\t\t\t\tcolorID = color.getColorID();\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\tswitch (direction) { // Switch for random movement orders\r\n\t\t\tcase 1:\r\n\t\t\t\tmotor.gentleLeft(700);\r\n\t\t\t\tlastTurn = 0;\r\n\t\t\t\tDoge.message(4, \"Gentle left\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 2:\r\n\t\t\t\tmotor.gentleRight(700);\r\n\t\t\t\tlastTurn = 1;\r\n\t\t\t\tDoge.message(4, \"Gentle right\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 3:\r\n\t\t\t\tmotor.sharpLeft(700);\r\n\t\t\t\tlastTurn = 0;\r\n\t\t\t\tDoge.message(4, \"Sharp left\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 4:\r\n\t\t\t\tmotor.sharpRight(700);\r\n\t\t\t\tlastTurn = 1;\r\n\t\t\t\tDoge.message(4, \"Sharp right\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t}", "@Test\n public void test20False() {\n long start = System.currentTimeMillis();\n for (int i = 1; i <= 20; i++) {\n RandomGUID myguid = new RandomGUID(false);\n System.out.println(i + \" \" + myguid.toString());\n }\n System.out.println(Ansi.ansi().eraseScreen().render(String.format(\"20 条@|blue 耗时 |@@|yellow %s |@@|blue 毫秒|@\", System.currentTimeMillis() - start)));\n }", "void moveMouse(int horizontal, int vertical);", "static int getRandomDelta() {\n int d = rand.nextInt(100);\n if (d < 50) {\n return -1;\n } else {\n return 1;\n }\n }", "public static void main(String[] args) {\n int x = 10;\r\n \r\n System.out.println(Math.pow(x, 3)); //1000\r\n System.out.println(Math.sqrt(x)); //square root 10\r\n double y = 8.9876;\r\n System.out.println(Math.round(y)); //rounds to nearest (9)\r\n System.out.println(Math.max(x, y)); //10 also min\r\n \r\n int roll = (int)(Math.random() * 6 + 1); //from 1 to 6\r\n //Math.random() * range + start number\r\n //ex --> 30 and 50 (int)(Math.random() * 21 + 30);\r\n System.out.println(roll);\r\n // System.out.println((int)(Math.random() * 10 + 20));\r\n \r\n System.out.println(\"\\n\\nSHORTCUTS\\n============\");\r\n \r\n int a = 10;\r\n a += 10; //a - 20\r\n System.out.println(\"a is \" + a);\r\n int b = a;\r\n b++; //21\r\n System.out.println(\"b is \" + b);\r\n a *= 2; //a = a * 2\r\n System.out.println(\"a is \" + a); //40\r\n int c = b++; //c = 21, b = 22\r\n System.out.format(\"c = %d and b = %d\", c, b);\r\n int d = ++b; //d = 23, b = 23\r\n System.out.format(\"d = %d and b = %d\\n\", d, b);\r\n \r\n \r\n }", "void walk(){\n\t\tif(intelligent){\n\t\t\tif(d[0]){\n\t\t\t\txPos--;\n\t\t\t\tyPos--;\n\t\t\t} else if(d[1]){\n\t\t\t\tyPos--;\n\t\t\t} else if(d[2]){\n\t\t\t\txPos++;\n\t\t\t\tyPos--;\n\t\t\t} else if(d[3]){\n\t\t\t\txPos++;\n\t\t\t} else if(d[4]){\n\t\t\t\txPos++;\n\t\t\t\tyPos++;\n\t\t\t} else if(d[5]){\n\t\t\t\tyPos++;\n\t\t\t} else if(d[6]){\n\t\t\t\txPos--;\n\t\t\t\tyPos++;\n\t\t\t} else if(d[7]){\n\t\t\t\txPos--;\n\t\t\t}\n\t\t} else {\n\t\t\tif(appleDetected){\n\t\t\t\txPos += xNextApple;\n\t\t\t\tyPos += yNextApple;\n\t\t\t\townGarden.removeApple(xPos, yPos);\n\t\t\t\tappleCache++;\n\t\t\t\tappleDetected = false;\n\t\t\t} else {\n\t\t\t\txRandomDirection = 500;\n\t\t\t\tyRandomDirection = 500;\n\t\t\t\twhile(\t!(\n\t\t\t\t\t\t\txPos + xRandomDirection >= 0 &&\n\t\t\t\t\t\t\txPos + xRandomDirection < 10 &&\n\t\t\t\t\t\t\tyPos + yRandomDirection >= 0 &&\n\t\t\t\t\t\t\tyPos + yRandomDirection < 10\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tswitch((int)(Math.random()*7)){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\txRandomDirection = 1;\n\t\t\t\t\t\tyRandomDirection = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\txRandomDirection = 1;\n\t\t\t\t\t\tyRandomDirection = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\txRandomDirection = 0;\n\t\t\t\t\t\tyRandomDirection = -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\txPos += xRandomDirection;\n\t\t\t\tyPos += yRandomDirection;\n\t\t\t}\n\t\t}\n\t}", "public void random_sword() {\n\t\tint randomX = 1;\n\t\tint randomY = 1;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tespada.setX_coord(randomX);\n\t\tespada.setY_coord(randomY);\n\t\tchange_sword_pos();\n\t}", "public static void main( String[] args ) {\n Mosaic.open( ROWS, COLUMNS, SQUARE_SIZE, SQUARE_SIZE );\n fillWithRandomColors();\n currentRow = ROWS / 2; // Start at the center of the window.\n currentColumn = COLUMNS / 2;\n\n while ( true ) {\n changeToRandomColor( currentRow, currentColumn );\n randomMove();\n Mosaic.delay( 10 ); // Remove this line to speed things up!\n\n }\n }", "public void activateUncontrolledMoves() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n actualPoint = new Point();\n actualPoint.x = 0;\n actualPoint.y = 0;\n final int maxX = wheel.getBounds().width(); //This represent the max X possible coord on the wheel\n final int maxY = wheel.getBounds().height();\n int timeBtwnMvmnts = 5000; //Time between each new movement\n while (true) {\n\n try {\n Thread.sleep(timeBtwnMvmnts);//Waiting for the next movement\n } catch (InterruptedException e) {\n\n }\n if (isUncontrolledActivated) { //If is activated continue\n double userCurrentSnap = USER_CURRENT_BREATH_RATE; //Snapshot to the current BR\n\n //Getting the percent of excess according to the max ideal breathing rate and the max posible rate (20)\n //Consider 6-8, MAX_IDEAL_BREATH_RATE (8) will be the max\n double referenceDistance = MAX_BREATH_RATE - MAX_IDEAL_BREATH_RATE;\n double myRateExcess = userCurrentSnap - MAX_IDEAL_BREATH_RATE;\n double relationPreferedActual = myRateExcess / referenceDistance;\n double percentOfExcess = relationPreferedActual * 100;\n\n Random r = new Random();\n\n //Probability of appearance of each special move\n if (percentOfExcess <= 40 && percentOfExcess > 10) { //A little error margin to make it easier. Nets to be 10% excess\n //Boost, stop, roll , inverted. probabilities (70,16,10,4)\n int diceRolled = r.nextInt(100); //This works as the \"probability\"\n if (diceRolled < 4) {// 4% inverted\n /*Enable inverted controlling. Determine how much time is this going to last.\n Not more than the time between each movement.*/\n final int duration = new Random().nextInt(timeBtwnMvmnts - 1000) + 1000;\n invertControls(duration);\n } else if (diceRolled >= 4 && diceRolled < 14) { // 10% roll\n uncRoll(maxX, maxY);\n } else if (diceRolled >= 14 && diceRolled < 30) { // 16% stop\n uncStop();\n } else if (diceRolled >= 30 && diceRolled < 100) { // 70% boost\n int whichBoost = new Random().nextInt(1);\n if (whichBoost == 0)\n uncBackwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n else\n uncForwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n }\n timeBtwnMvmnts = 8000;\n } else if (percentOfExcess <= 60 && percentOfExcess > 10) {\n //Boost, stop, roll , inverted. probabilities (45,30,15,10)\n int diceRolled = r.nextInt(100);\n if (diceRolled < 10) {// 10% inverted\n final int duration = new Random().nextInt(timeBtwnMvmnts - 1000) + 1000;\n invertControls(duration);\n } else if (diceRolled >= 10 && diceRolled < 25) { // 15% roll\n uncRoll(maxX, maxY);\n } else if (diceRolled >= 25 && diceRolled < 55) { // 30% stop\n uncStop();\n } else if (diceRolled >= 55 && diceRolled < 100) { // 45% boost\n int whichBoost = new Random().nextInt(1);\n if (whichBoost == 0)\n uncBackwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n else\n uncForwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n }\n timeBtwnMvmnts = 6700;\n } else if (percentOfExcess > 10) {//Percent > 60\n //Boost, stop, roll , inverted. probabilities (5,10,25,60)\n int diceRolled = r.nextInt(100);\n if (diceRolled < 60) {// 60% inverted\n final int duration = new Random().nextInt(timeBtwnMvmnts - 1000) + 1000;\n invertControls(duration);\n } else if (diceRolled >= 60 && diceRolled < 85) { // 25% roll\n uncRoll(maxX, maxY);\n } else if (diceRolled >= 85 && diceRolled < 95) { // 10% stop\n uncStop();\n } else if (diceRolled >= 95 && diceRolled < 100) { // 5% boost\n int whichBoost = new Random().nextInt(1);\n if (whichBoost == 0)\n uncBackwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n else\n uncForwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n }\n timeBtwnMvmnts = 5000;\n }\n\n } else {\n break;\n }\n }\n }\n }).start();\n }", "@SideOnly(Side.CLIENT)\r\n public void randomDisplayTick(World world, int x, int y, int z, Random random)\r\n {\r\n int meta = world.getBlockMetadata(x, y, z);\r\n if(meta != 1) {\r\n \tif(this.litLevel > 0) {\r\n\t if(random.nextInt(36) == 0) {\r\n\t world.playSound((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), \"fire.fire\", 1.0F + random.nextFloat(), 0.3F + random.nextFloat() * 0.7F, false);\r\n\t }\r\n\t\r\n//\t TileCampfire tile = (TileCampfire)world.getTileEntity(x, y, z);\r\n\t float xOffset = 0.5F;\r\n\t float yOffset = 0.7F;\r\n\t float zOffset = 0.5F;\r\n\t double d0 = (double)((float)x + xOffset);\r\n\t double d1 = (double)((float)y + yOffset);\r\n\t double d2 = (double)((float)z + zOffset);\r\n\t GL11.glPushMatrix();\r\n\t MainRegistry.proxy.spawnParticle(\"largesmoke\", d0, d1, d2, 0.0D, 0.0D, 0.0D, 1.5F * this.litLevel);\r\n\t MainRegistry.proxy.spawnParticle(\"flame\", d0, d1, d2, 0.0D, 0.0D, 0.0D, 2.5F * this.litLevel);\r\n\t GL11.glPopMatrix();\r\n\t }\r\n }\r\n }", "static void randomMove() {\n int directionNum; // Randomly set to 0, 1, 2, or 3 to choose direction.\n directionNum = ( int )( Math.random() * 4 );\n\n switch ( directionNum ) {\n case 0: // Move up.\n currentRow--;\n if ( currentRow < 0 )\n currentRow = ROWS - 1;\n break;\n case 1 : // Move right.\n currentColumn++;\n if ( currentColumn >= COLUMNS )\n currentColumn = 0;\n break;\n case 2 : // Move down.\n currentRow++;\n if ( currentRow >= ROWS )\n currentRow = 0;\n break;\n case 3 : // Move left.\n currentColumn--;\n if ( currentColumn < 0 )\n currentColumn = COLUMNS - 1;\n break;\n\n }\n }", "@Override\r\n\tpublic void input(MouseHandle mouse) {\n\t\tif(mouse.clicked() > click) {\r\n\t\t\tclick++;\r\n\t\t\t//BarelList.add(new GoblinBarel(new Vector2f(GamePanel.width/2, GamePanel.height), mouse.getMousePosition(), 100, 10, ally));\r\n\t\t\t//Ally.PushEntity(6, mouse.getMousePosition(),ally,ground);\r\n\t\t\t//Ally.PushEntity(5, mouse.getMousePosition(),ally,ground);\r\n\t\t\t//Ally.PushEntity(4, mouse.getMousePosition(),ally,sky);\r\n\t\t\t//GroundList.add(new MinerGround(new Vector2f(GamePanel.width/2, GamePanel.height), mouse.getMousePosition(), 100, 10, ally));\r\n\t\t\t//WoodList.add(new Wood(mouse.getMousePosition(), 150, 80, 10, 3, ally));//pos, height,width,damage,speed,side\r\n\t\t\t//FireBallList.add(new FireBall(new Vector2f(GamePanel.width/2, GamePanel.height), mouse.getMousePosition(), 100, 100, 10, ally, 30)); //Pos,destination,size,damage,speed,side,radius\r\n\t\t\t//Ally.PushEntity(0, mouse.getMousePosition(),ally,ground);//PushEntity(new TestCube(30,10,10,10));\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t Robot Damian = new Robot();\n\t\t//3. Ask the user what color they would like the robot to draw\n\t\tString color = JOptionPane.showInputDialog(null, \"What color should my robot draw? Red, Blue, or Green\");\n\t\t//5. Use an if/else statement to set the pen color that the user requested\n\t\n\n //6. If the user doesn’t enter anything, choose a random color\nif (color == \" \") {\n\tDamian.setPenColor(255, 255, 0);\n}\n //7. Put a loop around your code so that you keep asking the user for more colors & drawing them\n\t\t\n\t\t//4. Set the pen width to 10\n\t\tDamian.setPenWidth(10);\n\t //2. Make the robot draw a shape (this will take more than one line of code)------------------\n\t\tif (color.equalsIgnoreCase(\"red\")) {\n\t\t\tDamian.setPenColor(255, 0, 0);\n\t\t}\n\t\tif (color.equalsIgnoreCase(\"green\")) {\n\t\t\tDamian.setPenColor(0, 255, 0);\n\t\t}\n\t\tif (color.equalsIgnoreCase(\"blue\")) {\n\t\t\tDamian.setPenColor(0, 0, 255);\n\t\t}\n\tDamian.setSpeed(100);\n\tDamian.penDown();\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\t\n\t}", "@Override\r\n\tpublic void doTimeStep() {\n\t\tdir = Critter.getRandomInt(8);\r\n\t\t\r\n\t\tnumSteps = Critter.getRandomInt(maxStep) + 1;\r\n\t\t\r\n\t\t//go a random number of steps in that direction\r\n\t\tfor(int i = 0; i < numSteps; i++) {\r\n\t\t\twalk(dir);\r\n\t\t}\t\t\r\n\t}", "public void takeStep() {\n \tRandom rand = new Random();\n\t\tint number = rand.nextInt(4);\n\t if(number == 0) {\n\t \tmoveNorth();\n\t \t}\n\t \telse if(number == 1) {\n\t \t\tmoveSouth();\n\t \t}\n \telse if(number == 2) {\n \t\tmoveWest();\n\t }\n\t \telse if(number == 3) {\n\t \t\tmoveEast();\n\t \t}\n }", "public static void main(String[] args) throws AWTException {\n Robot rob = new Robot();\r\n Scanner scanner = new Scanner(System.in);\r\n System.out.println(\"How many columns of pixels would you like to scan?\");\r\n int precision = scanner.nextInt();\r\n int increment = (840/precision);\r\n int greatestY = 0;\r\n Color white = new Color(255,255,255);\r\n long curTime = System.currentTimeMillis();\r\n for(int x = 430; x <= 1250;x+=increment){\r\n System.out.println(x);\r\n for(int y = 100; y <= 1050;y+=30){\r\n if(!rob.getPixelColor(x,y).equals(white) && y > greatestY){\r\n greatestY = y;\r\n }\r\n }\r\n }\r\n long pastTime = System.currentTimeMillis();\r\n System.out.println(pastTime-curTime);\r\n rob.delay(100);\r\n //top-left full screen position\r\n rob.mouseMove(420,45);\r\n //bottom right full screen position\r\n rob.mouseMove(1260,greatestY+20);\r\n System.out.println(rob.getPixelColor(1260,45));\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n double h = screenSize.getHeight();\r\n double w = screenSize.getWidth();\r\n System.out.println(h + \", \" + w);\r\n //multi monitor config\r\n GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\r\n int width = gd.getDisplayMode().getWidth();\r\n int height = gd.getDisplayMode().getHeight();\r\n System.out.println(height + \", \" + width);\r\n }", "@Override\n public void relocatedWithinBounds() {\n x = random.nextInt(maxX - width);\n y = random.nextInt(maxY - height);\n }", "public void act() \n {\n // Add your action code here.\n if (Greenfoot.mouseClicked(this)){\n World myWorld = getWorld();\n List<Crab> crabs = myWorld.getObjects(Crab.class);\n for(Crab c : crabs){\n // int y = Greenfoot.getRandomNumber(560);\n // int x = Greenfoot.getRandomNumber(560);\n //c.setLocation(x,y);\n // myWorld.removeObjects(crabs);\n }\n \n /*\n Crab c = new Crab();\n int y = Greenfoot.getRandomNumber(560);\n int x = Greenfoot.getRandomNumber(560);\n myWorld.addObject(c, x, y);\n */\n \n }\n}", "public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }", "void reset(){ \n cueX= width/2 -150;\n cueY= height/2;\n \n \n redX = random(right , middle); redY = random(top, bottom);\n bluX = random(left, middle); bluY= random(top, bottom);\n yelX = random(left, right); yelY= random(top, bottom);\n \n //speed\n redDX = random(1,3); redDY = random(1,3);\n bluDX = random(1,3); bluDY = random(1,3);\n yelDX = random(1,3); yelDY = random(1,3);\n cueDX = random(1,3); cueDY = random(1,3);\n}", "public static void playRandomJumpLand() {\n\t\t\n\t\tString[] jumpLandSoundArray = {\"jumpLand1\", \"jumpLand2\", \"jumpLand3\", \"jumpLand4\", \"jumpLand5\"};\n\t\t\n\t\tint rnd = new Random().nextInt(jumpLandSoundArray.length);\n\t\tplaySound(jumpLandSoundArray[rnd], 1f);\n\t}", "public void move() {\n super.move(DIRECTION.getRandom());\n }", "public static void main(String[] args) {\r\n\t\tRobot tl = new Robot(250, 250);\r\n\t\tRobot tm = new Robot(650, 250);\r\n\t\tRobot tr = new Robot(1050, 250);\r\n\t\tRobot bl = new Robot(450, 450);\r\n\t\tRobot br = new Robot(850, 450);\r\n\t\r\n\t\ttl.setSpeed(100);\r\n\t\ttm.setSpeed(100);\r\n\t\ttr.setSpeed(100);\r\n\t\tbl.setSpeed(100);\r\n\t\tbr.setSpeed(100);\r\n\t\t\r\n\t\ttl.setPenColor(Color.blue);\r\n\t\ttm.setPenColor(Color.black);\r\n\t\ttr.setPenColor(Color.red);\r\n\t\tbl.setPenColor(Color.yellow);\r\n\t\tbr.setPenColor(Color.green);\r\n\t\t\r\n\t\ttl.setPenWidth(3);\r\n\t\ttm.setPenWidth(3);\r\n\t\ttr.setPenWidth(3);\r\n\t\tbl.setPenWidth(3);\r\n\t\tbr.setPenWidth(3);\r\n\t\r\n\t\ttl.penDown();\r\n\t\ttm.penDown();\r\n\t\ttr.penDown();\r\n\t\tbl.penDown();\r\n\t\tbr.penDown();\r\n\t\t\r\n\t\tThread r1 = new Thread(()->tl.move(3));\r\n\t\tThread r2 = new Thread(()->tm.move(3));\r\n\t\tThread r3 = new Thread(()->tr.move(3));\r\n\t\tThread r4 = new Thread(()->bl.move(3));\r\n\t\tThread r5 = new Thread(()->br.move(3));\r\n\t\t\r\n\t\tThread t1 = new Thread(()->tl.turn(1));\r\n\t\tThread t2 = new Thread(()->tm.turn(1));\r\n\t\tThread t3 = new Thread(()->tr.turn(1));\r\n\t\tThread t4 = new Thread(()->bl.turn(1));\r\n\t\tThread t5 = new Thread(()->br.turn(1));\r\n\t\t\r\n\t\tfor(int i=0;i<360;i++) {\r\n\t\t\tr1.run();\r\n\t\t\tr2.run();\r\n\t\t\tr3.run();\r\n\t\t\tr4.run();\r\n\t\t\tr5.run();\r\n\t\t\t\r\n\t\t\tt1.run();\r\n\t\t\tt2.run();\r\n\t\t\tt3.run();\r\n\t\t\tt4.run();\r\n\t\t\tt5.run();\r\n\t\t}\r\n\t\t\r\n\t\ttl.penUp();\r\n\t\ttm.penUp();\r\n\t\ttr.penUp();\r\n\t\tbl.penUp();\r\n\t\tbr.penUp();\r\n\t\t\r\n\t\tThread l1 = new Thread(()->tl.move(2000));\r\n\t\tThread l2 = new Thread(()->tm.move(2000));\r\n\t\tThread l3 = new Thread(()->tr.move(2000));\r\n\t\tThread l4 = new Thread(()->bl.move(2000));\r\n\t\tThread l5 = new Thread(()->br.move(2000));\r\n\t\t\r\n\t\tl1.run();\r\n\t\tl2.run();\r\n\t\tl3.run();\r\n\t\tl4.run();\r\n\t\tl5.run();\r\n\t}", "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 static void main(String args[]) {\n\t\t\n\t\tint populationSize = 5;\n\t\tint crossCount = (int)(populationSize * 0.9);\n\t\tint mutCount = (int)(populationSize * 0.05);\n\t\tint copyCount = populationSize - crossCount - mutCount;\n\n\t\t//90% through crossover\n\t\tfor(int i = 0; i < crossCount; i++) \n\t\t\tSystem.out.println(\"Cross: \" + i);\n\t\t\n\t\t//5% by copying\n\t\tfor(int i = crossCount; i < crossCount + copyCount; i++) \n\t\t\tSystem.out.println(\"Copy: \" + i);\n\t\t\n\t\t\n\t\t//5% by mutation\n\t\tfor(int i = crossCount + copyCount; i < populationSize; i++) \n\t\t\tSystem.out.println(\"Mut: \" + i);\n\t\t\n\t\tfor(int i = 0; i < 60; i++) {\n\t\t\t\n\t\t\tPoint p1 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //bot's point\n\t\t\tPoint p2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //enemy point\n\t\t\twhile(p2.equals(p1))\n\t\t\t\tp2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600));\n\t\t\t\n\t\t\tfloat angle = (float) Math.atan2(p2.y - p1.y, p2.x - p1.x);\n\t\t\tDecimalFormat df = new DecimalFormat(\"0.0000\");\n\t\t\tSystem.out.println(p1.x + \" \" + p1.y + \" \" + p2.x + \" \" + p2.y + \" \" + df.format(angle));\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void spawnRandomAsteroid() {\n\t\tRandom r = new Random();\n\n\t\t// The size of the asteroid is randomised.\n\t\tdouble size = r. nextDouble() * (AsteroidsAsteroid.maximumSize - AsteroidsAsteroid.minimumSize) + AsteroidsAsteroid.minimumSize;\n\n\t\t// The spawn distance is a fair distance away from the action.\n\t\tfinal double spawnDistance = cameraZoom * 2 + size;\n\n\t\t// Same with its velocity magnitude.\n\t\tdouble decidedVelocity = r.nextDouble() * (AsteroidsAsteroid.maximumVelocity - AsteroidsAsteroid.minimumVelocity) + AsteroidsAsteroid.minimumVelocity;\n\n\t\t// And the angle.\n\t\tdouble decidedAngle = r.nextDouble() * 360 - 180;\n\n\t\t// The velocity is then converted to a Vector3.\n\t\tVector3 velocity = new Vector3(decidedVelocity * -Math.sin(Math.toRadians(decidedAngle)), decidedVelocity * Math.cos(Math.toRadians(decidedAngle)));\n\n\t\t// Then we pick a random point on the screen.\n\t\tVector3 randomPoint = new Vector3(r.nextDouble() * 2 * cameraZoom - cameraZoom, r.nextDouble() * 2 * cameraZoom - cameraZoom);\n\n\t\t// We then set the asteroid's starting position as that spawn distance away from the point\n\t\t// in the reverse direction to its velocity.\n\t\tVector3 startingPosition = randomPoint.add(new Vector3(spawnDistance * Math.sin(Math.toDegrees(-decidedAngle)), spawnDistance * -Math.cos(Math.toDegrees(-decidedAngle))));\n\n\t\t// Then we just create the asteroid.\n\t\tAsteroidsAsteroid asteroid = new AsteroidsAsteroid(GameObject.ROOT, this, size, velocity);\n\t\tasteroid.translate(startingPosition);\n\t\tasteroids.add(asteroid);\n\n\t}", "@Override /* failed to load code for net.minecraft.block.NetherPortalBlock */\r\n\r\n\t\t@OnlyIn(Dist.CLIENT)\r\n\t\t@Override\r\n\t\tpublic void animateTick(BlockState state, World world, BlockPos pos, Random random) {\r\n\t\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\t\tdouble px = pos.getX() + random.nextFloat();\r\n\t\t\t\tdouble py = pos.getY() + random.nextFloat();\r\n\t\t\t\tdouble pz = pos.getZ() + random.nextFloat();\r\n\t\t\t\tdouble vx = (random.nextFloat() - 0.5) / 2f;\r\n\t\t\t\tdouble vy = (random.nextFloat() - 0.5) / 2f;\r\n\t\t\t\tdouble vz = (random.nextFloat() - 0.5) / 2f;\r\n\t\t\t\tint j = random.nextInt(4) - 1;\r\n\t\t\t\tif (world.getBlockState(pos.west()).getBlock() != this && world.getBlockState(pos.east()).getBlock() != this) {\r\n\t\t\t\t\tpx = pos.getX() + 0.5 + 0.25 * j;\r\n\t\t\t\t\tvx = random.nextFloat() * 2 * j;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpz = pos.getZ() + 0.5 + 0.25 * j;\r\n\t\t\t\t\tvz = random.nextFloat() * 2 * j;\r\n\t\t\t\t}\r\n\t\t\t\tworld.addParticle(ParticleTypes.PORTAL, px, py, pz, vx, vy, vz);\r\n\t\t\t}\r\n\r\n\t\t}", "public Critter(){\n\tthis.x_location = (int) (Math.random()*99);\n\tthis.y_location = (int) (Math.random()*99);\n\tthis.wrap();\n\t}", "static Tour rndTour() {\r\n\t\tTour tr = Tour.sequence();\r\n\t\ttr.randomize();\r\n\t\ttr.distance = tr.distance();\r\n\t\treturn tr;\r\n\t}", "public void movimentar_dragao(int pos) {\n\t\tint check = 0;\n\t\tint counter = 0; //After 1000 tries it means that the dragon is trapped and cant move either way\n\t\twhile (check == 0 && counter < 1000) {\n\t\t\tint random = 1 + (int)(Math.random()*4);\n\t\t\tif (random == 1) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'X' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 2) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 3) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}", "@SideOnly(Side.CLIENT)\n\tpublic void randomDisplayTick(World world, int x, int y, int z, Random random) {\n\t\tif (this.isActive) {\n\t\t\tint direction = world.getBlockMetadata(x, y, z);\n\n\t\t\tfloat x1 = (float) x + 0.5F;\n\t\t\tfloat y1 = (float) y + 0.6F;\n\t\t\tfloat z1 = (float) z + 0.5F;\n\n\t\t\tfloat f = 0.52F;\n\t\t\tfloat f1 = random.nextFloat() * 0.6F - 0.3F;\n\n\t\t\t// facing west\n\t\t\tif (direction == 4) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 - f + 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 - f + 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t}\n\n\t\t\t// facing east\n\t\t\tif (direction == 2) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 + f - 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 + f - 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t}\n\n\t\t\t// facing north\n\t\t\tif (direction == 5) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 + f1), (double) (y1), (double) (z1 - f + 0.2F), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 + f1), (double) (y1), (double) (z1 - f + 0.2F), 0D, 0D, 0D);\n\t\t\t}\n\n\t\t\t// facing south\n\t\t\tif (direction == 3) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 + f1), (double) (y1), (double) (z1 + f - 0.2F), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 + f1), (double) (y1), (double) (z1 + f - 0.2F), 0D, 0D, 0D);\n\t\t\t}\n\t\t}\n\t}", "public void randomizeDirection()\n\t{\n\t\txSpeed = (int) (Math.pow(-1, random.nextInt(2)) * speed);\n\t\tySpeed = (int) (Math.pow(-1, random.nextInt(2)) * speed);\n\t}", "private void getOnLog(ArrayList<Sprite> sprites) {\n\t\tArrayList<Sprite> logs = new ArrayList<Sprite> ();\n\t\tfor (Sprite temp : sprites) {\n\t\t\tif (temp.getClass().getName() == \"Log\") {\n\t\t\t\tlogs.add(temp);\n\t\t\t}\n\t\t}\n\t\tonLog = (Log)logs.get(new Random().nextInt(logs.size()));\n\t\tsetX(onLog.getX());\n\t\tsetY(onLog.getY());\n\t}", "private void locateApple() {\n xApplePosition = random.nextInt(32);\n yApplePosition = random.nextInt(21);\n }", "public static void main(String[] args) { \n\t\tRobot bots[] = new Robot[5];\n\t\tint x = 400;\n\t\tfor(int i = 0; i< bots.length; i++) {\n\t\t\tbots[i] = new Robot();\n\t\t\tbots[i].setY(350);\n\t\t\tbots[i].setX(x);\n\t\t\tx+=100;\n\t\t\tbots[i].setSpeed(15);\n\t\t}\n\t\tboolean ifWin = false;\n\t\twhile(ifWin == false) {\n\t\t\tfor(int j = 0; j<bots.length; j++) {\n\t\t\t\tRandom number = new Random();\n\t\t\t\tint movingY = number.nextInt(20);\n\t\t\t\tbots[j].move(movingY);\n\t\t\t\tbots[j].turn(-3);\n\t\t\t\tif(bots[j].getX()<=500 && bots[j].getX()>450 && bots[j].getY()<500 && bots[j].getY()>450) {\n\t\t\t\t\tifWin = true;\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Winner!\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tifWin = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void myRandomTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\n\t\tstart();\n\t\tint n = gui.myRandom(1, 1);\n\t\tassertTrue(n == 1);\n\n\t\tn = gui.myRandom(2, 2);\n\t\tassertTrue(n == 2);\n\n\t\tn = gui.myRandom(0, 0);\n\t\tassertTrue(n == 0);\n\t\t\n\t\tn = gui.myRandom(4, 4);\n\t\tassertTrue(n == 4);\n\n\t\tn = gui.myRandom(1000, 1001);\n\t\tassertTrue(n == 1000 || n == 1001);\n\t\t\n\t\t}\n\t}" ]
[ "0.6949888", "0.67936474", "0.6514197", "0.6485939", "0.6408509", "0.6361136", "0.62787056", "0.62731445", "0.6228517", "0.6203059", "0.61742187", "0.61565953", "0.6132541", "0.61310565", "0.6130372", "0.6037738", "0.6011548", "0.5977791", "0.59663314", "0.5965777", "0.59426516", "0.59242916", "0.58864254", "0.5863983", "0.58265626", "0.58256066", "0.57438695", "0.5740191", "0.57362837", "0.57259256", "0.5717588", "0.57160294", "0.5707421", "0.5703251", "0.5699596", "0.5695563", "0.5682879", "0.56688327", "0.5648179", "0.5644819", "0.5640508", "0.5634388", "0.562825", "0.562709", "0.5620239", "0.56171685", "0.5613091", "0.5610713", "0.55910784", "0.55844575", "0.5582714", "0.5571965", "0.5564813", "0.5561698", "0.5552006", "0.55414665", "0.5534935", "0.55276924", "0.55225164", "0.5510372", "0.55071676", "0.5501678", "0.54942596", "0.5485981", "0.548217", "0.54812884", "0.5476869", "0.5475324", "0.5465888", "0.5463888", "0.5460632", "0.54535687", "0.544986", "0.5445816", "0.5443862", "0.544025", "0.54399973", "0.54398406", "0.543012", "0.5429773", "0.54238045", "0.5423632", "0.54165614", "0.5416273", "0.5412062", "0.53972495", "0.53952515", "0.539003", "0.5389185", "0.5379486", "0.53785735", "0.53781307", "0.5377796", "0.5377111", "0.53767794", "0.5371215", "0.53703517", "0.5367838", "0.5367794" ]
0.722976
1
CRUD operations for product get one product
@RequestMapping(value = "/api/products/{id}", method = RequestMethod.GET) public Product getOneProduct(@PathVariable("id") long id) { return this.productRepo.findById(id).orElseThrow(() -> { throw new ProductNotFoundException(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Product getProductById(Integer productId);", "Product getProductById(Integer productId);", "Product findProductById(Long id);", "Product getProductByID(Long id);", "@GetMapping(\"/products/{id}\")\r\n\t@ApiOperation(value=\"Return unique product.\")\r\n\tpublic Product showOneProduct(@PathVariable(value=\"id\") long id){\n\t\treturn productRepository.findById(id);\r\n\t}", "Product editProduct(Product product);", "Product getProductById(Integer productID);", "Product findById(long id);", "public void retrieveProductFromDatabase(){\r\n // retrieve product from the database here\r\n System.out.println(\"Product Retrieved using ID --> \" + this.productId);\r\n \r\n }", "Product getProductDetails(int idproduct) throws DataBaseException;", "@Override\r\n\tpublic void ManageProduct() {\n\t\tint id = this.view.enterId();\r\n\t\tString name = this.view.enterName();\r\n\t\tfloat price = this.view.enterPrice();\r\n\t\tint quantity = this.view.enterQuantity();\r\n\t\t\r\n\t\tthis.model.updProduct(id, name, price, quantity);\r\n\t}", "@GetMapping(Mappings.ADD_PRODUCT)\n public ModelAndView add_product(){\n Product product = new Product();\n ModelAndView mv = new ModelAndView(ViewNames.ADD_PRODUCT);\n mv.addObject(\"product\", product);\n return mv;\n }", "public Product executeCRUD(HttpServletRequest request) throws SQLException {\n\t\t\n\t\tProduct product = new Product();\n\t String paramName;\n\t\tString paramValue;\n\t\t\n\t\tEnumeration<String> paramNames = request.getParameterNames();\n\t while(paramNames.hasMoreElements()) { \n\t\t \tparamName = paramNames.nextElement();\n\t\t paramValue = request.getParameter(paramName);\n\t\t switch (paramName) {\n\t\t \n\t\t case \"Id\" :\n\t\t \t product.setId(Integer.parseInt(paramValue));\n\t\t \tbreak;\n\t\t \t\n\t\t case \"Name\" : \n\t\t \t\n\t\t \t if(!Utility.validateInput(paramValue)) {\n\t\t \t\t throw new IllegalArgumentException(\"Name is not a nullable field. Enter product name.\");\n\t\t } else {\n\t\t product.setName(paramValue);\n\t\t }\n \t\t break;\n \t\t \n\t \t case \"Price\" :\n\t \t \t\n\t\t \tif(!Utility.validateInput(paramValue)) {\n\t \t throw new IllegalArgumentException(String.format(\"Price is not a nullable field. %s\", PRICE_ERROR)); \n\t \t }\n\t\t \tdouble price;\n\t\t \ttry {\n\t\t \t price = Double.parseDouble(paramValue);\n\t\t \t} catch (java.lang.NumberFormatException e) {\n\t\t \t \tthrow new java.lang.NumberFormatException(String.format(\"Invalid Entry: '%s'. %s\", paramValue, PRICE_ERROR));\n\t\t \t}\n\t\t \t if(!Utility.isPositive(price)) {\n\t\t \t\t throw new IllegalArgumentException(String.format(\"Invalid Entry: '%s'. Price must be positive.\", paramValue));\n\t\t \t} else {\n\t\t \t\tproduct.setPrice(Utility.twoDecimals(price));\n\t\t \t }\n\t\t break;\n\t\t \n\t \t case \"Weight\" :\n\t \t \t\n\t\t \tif(!Utility.validateInput(paramValue)) {\n\t\t \t throw new IllegalArgumentException(String.format(\"Weight is not a nullable field. %s\", WEIGHT_ERROR));\n\t\t \t } \n\t \t \tdouble weight;\n\t\t \ttry {\n\t\t \t weight = Double.parseDouble(paramValue);\n\t\t \t } catch (java.lang.NumberFormatException e) {\n\t\t \t\tthrow new java.lang.NumberFormatException(String.format(\"Invalid Input: '%s'. %s\", paramValue, WEIGHT_ERROR));\n\t\t \t}\n\t\t \t if(!Utility.isPositive(weight)) {\n\t\t \t\t throw new IllegalArgumentException(String.format(\"Invalid input: '%s'. Weight must be positive. %s\", paramValue, WEIGHT_ERROR)); \n\t\t } else {\n\t\t product.setWeight(Utility.twoDecimals(weight));\n\t\t } \n\t\t break;\n\t\t \n\t\t case \"Code\" : \n\t\t \t\n\t\t \tif(!Utility.validateInput(paramValue)) {\n\t\t \t \tthrow new IllegalArgumentException(String.format(\"Code is not a nullable field. %s\", CODE_ERROR));\n\t\t \t} else if (!Utility.checkPattern(paramValue, CODE_PATERN)) {\n\t\t \t\tthrow new IllegalArgumentException(String.format(\"Invalid Entry: '%s'. %s\", paramValue, CODE_ERROR)); \n\t\t \t } else if(request.getParameter(\"update\") == null && dao.validateCode(Integer.parseInt(paramValue))) {\n\t\t \t throw new IllegalArgumentException(\"Duplicate code. A product with code '\" + paramValue + \"' already exists in the table. \"\n\t\t \t\t\t\t\t+ \"Check your poduct code and try again with a valid code.\");\n\t\t } else {\n\t\t \t\tproduct.setCode(Integer.parseInt(paramValue));\n\t\t }\n\t\t \tbreak;\n\t\t \t\n\t\t case \"Manufacturer\" : \n\t\t \t\n\t\t \t product.setManufacturer(paramValue);\n\t\t \tbreak;\n\t\t \t\n\t\t case \"MadeIn\" : \n\t\t \t\n\t\t \t product.setMadeIn(paramValue);\n\t\t \tbreak;\n\t\t \t\n\t\t case \"Description\" : \n\t\t \t\n\t\t \tproduct.setDescription(paramValue);\n\t\t \tbreak;\n\t\t }\n\t\t}\n\t return product;\n\t}", "public Product get(String id);", "CafeProduct getProductById(final Integer productId);", "void viewProductById(long id);", "@GetMapping(\"/product/{id}\")\n\tpublic Product getProductById(@PathVariable(\"id\") Long id);", "@RequestMapping(value = \"/products/{productId}\", method = RequestMethod.GET, produces = \"application/json\")\n\tpublic ResponseEntity<Product> getSingleProduct(@PathVariable int productId) {\n\t\tProduct productById = pm.getProductById(productId);\n\t\tif (productById != null) {\n\t\t\treturn new ResponseEntity<Product>(productById, HttpStatus.OK);\n\t\t}\n\t\treturn new ResponseEntity<Product>(productById, HttpStatus.NOT_FOUND);\n\t}", "@GetMapping(path = \"/products/{id}\")\n public ResponseEntity<Product> getProductById(@PathVariable(name=\"id\") Long id){\n Product product = productService.findById(id);\n if (product!=null)\n return ResponseEntity.ok(product);\n return ResponseEntity.notFound().build();\n }", "@RequestMapping(value = {\"/add_product\"}, method = RequestMethod.GET)\n public String viewProductAdd() {\n return \"product_detail_new\";\n }", "ProductEntity findById(long id);", "Product getProductByName(String name) throws EntityNotFoundException;", "@Override\r\n\tpublic Product showOne(int id) throws Exception {\n\t\treturn this.dao.showOne(id);\r\n\t}", "@GetMapping(\"/product/{pid}\")\n public String getProductDetails(@PathVariable(\"pid\") String pid, Model model){\n if(!Util.isPositiveInteger(pid)){\n return \"redirect:/products\";\n }\n\n Product currProduct = productService.findById(Long.valueOf(pid));\n\n //Redirect user to a /products if invalid id is received\n if(currProduct == null){\n return \"redirect:/products\";\n }\n\n\n model.addAttribute(\"categories\",categoryService.findAll());\n model.addAttribute(\"currProduct\", currProduct);\n\n return \"productDetails\";\n }", "@Override\n\tpublic Product getProduct(@Min(value = 1, message = \"Invalid Product ID.\") long id) {\n\t\treturn productRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(\"Product not found\"));\n\t}", "@GetMapping(VERSION + \"/product/{productId}\")\n public ResponseEntity<?> retrieveProductDetails(@PathVariable(\"productId\") String productId) {\n ProductDto productDto = productCompositeService.fetchProductById(productId);\n return ResponseEntity.ok().body(productDto);\n }", "Product storeProduct(Product product);", "@GetMapping(\"/edit\")\r\n\tpublic String showEdit(@RequestParam Integer id,Model model)\r\n\t{\r\n\t\tProduct p=service.getOneProduct(id);\r\n\t\tmodel.addAttribute(\"product\", p);\r\n\t\treturn \"ProductEdit\";\r\n\t}", "@ModelAttribute(\"product\")\n public Product productToAdd() {\n return new Product();\n }", "@Override\r\n\tpublic Product getProduct(int productId) {\n\t\treturn dao.getProduct(productId);\r\n\t}", "Product postProduct(Product product);", "@GetMapping(\"/getProduct/{id}\")\n\tpublic Product getProduct(@PathVariable(\"id\") Long id){\n\n\t\treturn productServiceImpl.getProduct(id);\n\t}", "@RequestMapping(value = { \"/newproduct\" }, method = RequestMethod.GET)\r\n\tpublic String newProduct(ModelMap model) {\r\n\t\tProduct product = new Product();\r\n\t\tmodel.addAttribute(\"product\", product);\r\n\t\tmodel.addAttribute(\"productTypes\", productTypeService.findAllProductTypes());\r\n\t\tmodel.addAttribute(\"brands\", brandService.findAllBrands());\r\n\t\tmodel.addAttribute(\"edit\", false);\r\n\t\treturn \"newproduct\";\r\n\t}", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }", "@GetMapping(\"/products/{id}\")\n\tpublic Product getOneProduct(@PathVariable(\"id\") int id) {\n\t\t//enhanced for loop \n\t\tfor (Product product : products) {\n\t\t\tif (product.getId() == id) {\n\t\t\t\treturn product;\n\t\t\t}\n\t\t}\n\t\tthrow new ProductNotFoundException() ;\n\t}", "@PostMapping(\"\")\n ResponseEntity<ResponseObject> insertProduct(@RequestBody Product newProduct) {\n // two products must not have the same name\n List<Product> foundProducts = repository.findByName(newProduct.getName().trim());\n return foundProducts.size() < 1 ? ResponseEntity.status(HttpStatus.OK).body(\n new ResponseObject(\"ok\", \"insert successfully\", repository.save(newProduct))\n ) : ResponseEntity.status(HttpStatus.OK).body(\n new ResponseObject(\"failed\", \"Product name already taken\", \"\")\n );\n }", "Product save(Product product);", "PromoModel getPromoByProductId(Integer ProductId);", "ProductRepository findById(Long id);", "@Transactional(readOnly = true) \n public Product findOne(Long id) {\n log.debug(\"Request to get Product : {}\", id);\n Product product = productRepository.findOne(id);\n return product;\n }", "public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }", "public void Editproduct(Product objproduct) {\n\t\t\n\t}", "@RequestMapping(value = {\"/add_product\"}, method = RequestMethod.POST)\n public String createProduct(Model model, HttpServletRequest request) {\n boolean isSuccess = addProductByRest(request);\n if (isSuccess) {\n ProductController controller = new ProductController();\n List<Product> productList = controller.getProductList(request, \"products\");\n model.addAttribute(\"products\", productList);\n return \"product_list\";\n } else {\n return \"product_detail_new\";\n }\n }", "@Override\n\tpublic Product getProduct(int id) {\n\t\treturn productDao.getProduct(id);\n\t}", "@PostMapping(path =\"/products\")\n public ResponseEntity<Product> createProduct(@RequestBody Product product) throws URISyntaxException {\n log.debug(\"REST request to create Product : {}\", product);\n Product result = productService.save(product);\n return ResponseEntity.created(new URI(\"/api/products/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@CrossOrigin()\r\n @PostMapping(\"/products\")\r\n Integer createProduct(@Valid @RequestBody ProductEntity productEntity) {\r\n // TODO set a DTO so that you can filter out id later and you don't have to do this each time\r\n // manually\r\n Integer id = productEntity.getId();\r\n if (id != null && id != 0) {\r\n // TODO check so that only the fields that are not being sent are being kept constant,\r\n // also make it so that this\r\n // this is done for all the fields automatically\r\n ProductEntity p =\r\n productRepository\r\n .findById(id)\r\n .<BusinessErrorException>orElseThrow(\r\n () -> {\r\n throw new BusinessErrorException(\"Bad product ID\");\r\n });\r\n productEntity.setCategoryEntityList(p.getCategoryEntityList());\r\n productEntity.setNumberOfPurchases(p.getNumberOfPurchases());\r\n }\r\n // productEntity.setId(0);\r\n productRepository.save(productEntity);\r\n productRepository.flush();\r\n // TODO make angular use Response Entity\r\n // URI location =\r\n // ServletUriComponentsBuilder.fromCurrentRequest()\r\n // .path(\"/{ID}\")\r\n // .buildAndExpand(productEntity.getId())\r\n // .toUri();\r\n // return ResponseEntity.created(location).build();\r\n return productEntity.getId();\r\n }", "@Override\r\n\tpublic Product getProduct(String productId) {\n\t\treturn dao.getProduct(productId);\r\n\t}", "public Product getProductFromId(Integer prodId) throws BackendException;", "public void retrieveProduct(Product product) {\n // Place string values in TextFields.\n productIdField.setPromptText(String.valueOf(product.getId()));\n productNameField.setText(product.getName());\n productInvField.setText(String.valueOf(product.getStock()));\n productPriceField.setText(String.valueOf(product.getPrice()));\n productMaxField.setText(String.valueOf(product.getMax()));\n productMinField.setText(String.valueOf(product.getMin()));\n // load the TableViews after copying necessary values to instance.\n associatedPartsCopyMachine(product);\n this.product.setId(product.getId());\n super.initialize();\n }", "@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}", "@GetMapping(\"/sysadmin/product/view/{id}\")\n public String showProductPage(@PathVariable(value = \"id\") Integer id, ModelMap model) {\n Product product = productService.findById(id);\n if (product == null) {\n return \"redirect:/admin/product\";\n }\n\n ProductUpdateDTO productDTO = new ProductUpdateDTO();\n productDTO.setProductCode(product.getProductCode());\n productDTO.setCategory(product.getCategory());\n productDTO.setDescription(product.getDescription());\n productDTO.setPrice(product.getPrice());\n productDTO.setTitle(product.getTitle());\n productDTO.setType(product.getType());\n productDTO.setPublished(product.isPublish());\n\n List<CodeValue> lstCode = codeValueService.getByType(\"product_category\");\n for(int i = 0; i < lstCode.size(); i++){\n CodeValue code = lstCode.get(i);\n if(code.getCode() == productDTO.getCategory()){\n productDTO.setCategoryDescription(code.getDescription());\n break;\n }\n }\n model.addAttribute(\"product\", productDTO);\n model.addAttribute(\"productCategory\", codeValueService.getByType(\"product_category\"));\n\n return \"admin/sysadm/productFormView\";\n }", "public void saveProduct(Product product);", "Product updateProductInStore(Product product);", "@RequestMapping(value = \"/products/{productId}\", method = RequestMethod.GET)\n\t public ResponseEntity<ProductData> getProductDetails(@PathVariable int productId){\t\t\t\t\t\n\t ProductData product = productService.getProduct(productId);\n\t return new ResponseEntity<>(product, HttpStatus.OK);\n\t }", "@RequestMapping(\"/productlist/Productdetails/{id}\")\n\n public String Productdetails(@PathVariable String id, Model model) throws IOException{\n\n Product bike = productDao.getProductById(id);\n model.addAttribute(bike);\n\n\n return \"productdetails\";\n }", "public ProductModel getProduct()\n\t{\n\t\treturn product;\n\t}", "@PostMapping(\"/addproduct\")\n\t\tpublic ResponseEntity<List<Product>> insertProduct(@RequestBody Product product) {\n\t\t\tlogger.info(\"product inserted\");\n\t\t\tList<Product> sq = productService.saveProduct(product);\n\n\t\t\treturn new ResponseEntity<List<Product>>(sq, HttpStatus.OK);\n\t\t}", "@Transactional(readOnly = true)\n public ProductFullDTO getProduct(Integer productId) {\n ProductEntity productEntity = productRepository.getOne(productId);\n if (productEntity.getRemoved()) {\n throw new NotFoundException(getNotFoundMessage(productId));\n }\n return new ProductFullDTO(productEntity);\n }", "@RequestMapping(value={\"/manageProducts\",\"/Product\"}, method=RequestMethod.GET)\n\tpublic ModelAndView manageProducts()\n\t{\n\t\tModelAndView mv=new ModelAndView(\"admin/Product\");\n\t\tmv.addObject(\"isAdminClickedProducts\",\"true\");\n\t\tmv.addObject(\"product\", new Product());\n\t\tsetData();\n\t\treturn mv;\n\t}", "public void saveNewProduct(Product product) throws BackendException;", "@GetMapping(\"/updateProduct\")\n\tpublic String updateProduct(@RequestParam(\"productId\") int productId , Model theModel) {\n\t\tProduct product = productDAO.getProduct(productId);\n\n\t\t// add the users to the model\n\t\ttheModel.addAttribute(\"product\", product);\n\t\t \n\t\treturn \"update-product\";\n\t}", "@Override\r\n\tOptional<Product> findById(String id);", "@RequestMapping(value = \"/getId/{id}\")\n\tpublic @ResponseBody ProductDto getById(@PathVariable(\"id\") int id) {\n\t\treturn productFacade.getProductById(id);\n\t}", "@Override\n\tpublic Product getProduct() {\n\t\treturn productDao.getProduct();\n\t}", "Product getProductById(Serializable productId);", "Product getProductByProductName(String productName);", "@PostMapping(\"/add\")\r\n\tpublic ProductDetails addProduct(@Valid @RequestBody AddProduct request) {\r\n\r\n\t\tProduct product = productUtil.getProduct();\r\n\t\tproduct.setProduct_Id(productUtil.generateId());\r\n\t\tproduct.setProduct_Name(request.getProduct_Name());\r\n\t\tproduct.setProduct_Price(request.getProduct_Price());\r\n\t\tproduct.setProduct_Quantity(request.getProduct_Quantity());\r\n\t\tproduct.setProduct_Availability(request.isProduct_Availability());\r\n\t\tproduct = productService.addProduct(product);\r\n\t\treturn productUtil.toProductDetails(product);\r\n\r\n\t}", "@RequestMapping(value = {\"/product_detail/{id}\"}, method = RequestMethod.POST)\n public String updateProduct(Model model, @PathVariable(\"id\") long id, HttpServletRequest request) {\n updateProductByRest(id, request);\n Product product = getProduct(id, request);\n model.addAttribute(\"product\", product);\n return \"product_detail\";\n }", "@Override\n\tpublic Product getById(int productId) {\n\t\treturn session.get(Product.class, productId);\n\t}", "@GetMapping(\"/id/{id}\")\n public ProductDto getProductById(\n @PathVariable(\"id\") String id\n ){\n return productService.getProductById(id);\n }", "@Override\n\t@Transactional\n\tpublic Product getProductById(int productId) {\n\t\tOptional<Product>product = productDAO.findById(productId);\n\t\tif(product.isPresent()) return product.get();\n\t\telse return null;\n\t}", "Product addNewProductInStore(Product newProduct);", "Product updateProductById(Long id);", "List<Product> retrieveProducts();", "@RequestMapping(value = {\"/product_detail/{id}\"}, method = RequestMethod.GET)\n public String viewProductDetail(Model model, @PathVariable(\"id\") long id, HttpServletRequest request) {\n Product product = getProduct(id, request);\n model.addAttribute(\"product\", product);\n return \"product_detail\";\n }", "Product selectByPrimaryKey(Integer id);", "Object getProduct();", "@RequestMapping(value=\"/manage_product_edit/{id}\", method=RequestMethod.GET)\n\tpublic ModelAndView editProduct(@PathVariable(\"id\")String id)\n\t{\n\t\tModelAndView mv = new ModelAndView(\"/admin/Product\");\n\t\tProduct prod =productDAO.getProductById(id);\n\t\tmv.addObject(\"product\",prod);\n\t\tmv.addObject(\"isEditing\",true);\n\t\t\n\t\treturn mv;\t\n\t}", "@Override\r\n public Optional<Product> findbyId(Long id) {\r\n return productRepository.findById(id);\r\n }", "@Override\n\tpublic Optional<Product> findById(Long id) {\n\t\t return productRepository.findById(id);\n\t}", "public Product ProductDetail(int id){\n Product p = new Product();\n connect();\n ResultSet result = null;\n String sql = \"SELECT * FROM productos WHERE id_producto = ?\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, id);\n result = ps.executeQuery();\n if(result != null){\n p.setProductId(\"\"+result.getInt(\"id_producto\"));\n p.setProductDescription(result.getString(\"descripcion\"));\n p.setProductPresentation(result.getString(\"presentacion\"));\n p.setProductCuantity(result.getInt(\"cantidad\"));\n p.setProductPrice(result.getFloat(\"precio\"));\n p.setProductProvider(result.getInt(\"proveedor\"));\n }\n connect.close();\n return p;\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n return p;\n }", "Product selectByPrimaryKey(Long id);", "public String editProduct() {\n ConversationContext<Product> ctx = ProductController.newEditContext(products.getSelectedRow());\n ctx.setLabelWithKey(\"part_products\");\n ctx.setCallBack(editProductCallBack);\n getCurrentConversation().setNextContextSub(ctx);\n return ctx.view();\n }", "public Product toeditdao(int id) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tSystem.out.println(\"进入dao\");\n\t\tsession.beginTransaction();\n\t\tProduct product=(Product)session.get(Product.class,id);\n\t\tSystem.out.println(\"成功\");\n\t\tsession.beginTransaction().commit();\n\t\tsession.close();\n\t\tsessionFactory.close();\n\t\treturn product;\n\t\t\n\t}", "public interface ProductService {\n List<Product> products();\n\n Product findById(int id);\n\n Product save(Product product);\n\n Product updateById(int id, boolean active);\n\n //void delete(int id);\n\n //Product save(Product product);\n}", "public interface ProductService {\n\n// List<Product> getAllProduct();\n\n List<Product> getProduct(Product product);\n\n Product getProductById(Integer id);\n\n int insertProduct(Product product);\n\n int insertSelectiveProduct(Product product);\n\n int deleteProduct(Integer id );\n\n int updateProduct(Product product );\n}", "Product update(Product product, long id);", "@GetMapping (\"/{id}\")\n public ResponseEntity<ProductDto> getOneProduct(@PathVariable Long id){\n return new ResponseEntity<>(productService.oneProductDto(id), HttpStatus.OK);\n }", "@Override\n\tpublic Product findProductById(Long id) {\n\t\treturn productDAO.findById(id).orElse(null);\n\t}", "public Product getProduct(int id) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\r\n\t\tProduct product = (Product) session.get(Product.class, id);\r\n\t\treturn product;\r\n\t}", "public int getProductId() {\n return productId;\n }", "public int getProductId() {\n return productId;\n }", "@Override\n\tpublic Product getById(int id) throws SQLException {\n\t\treturn productDao.getById(id);\n\t}", "@Override\n @Transactional\n public Producto findById(long id) {\n return productoDao.findById(id);\n }", "@Override\n\tpublic ProductVO detailProduct(int product_id) {\n\t\treturn null;\n\t}", "@PostMapping(\"/products\") \nprivate int saveProduct(@RequestBody Products products) \n{ \nproductsService.saveOrUpdate(products); \nreturn products.getProductid(); \n}", "@RequestMapping(\"/detail/{id}\")\n public String showproduct(@PathVariable(\"id\") long id, Model model, Principal principal, Authentication authentication) {\n model.addAttribute(\"product\", productRepository.findById(id).get());\n model.addAttribute(\"categories\", categoryRepository.findAll());\n// model.addAttribute(\"product_user_id\", userRepository.findByUsername(principal.getName()).getId());\n\n String username = null;\n try {\n username = principal.getName();\n model.addAttribute(\"product_user_id\", userRepository.findByUsername(principal.getName()).getId());\n model.addAttribute(\"user_id\", userRepository.findByUsername(principal.getName()).getId());\n\n return \"show\";\n } catch (Exception e){\n model.addAttribute(\"product_user_id\", 0);\n return \"show\";\n }\n }", "@GetMapping(\"/product/{productid}\") \nprivate Products getProducts(@PathVariable(\"productid\") int productid) \n{ \nreturn productsService.getProductsById(productid); \n}", "public void add(Product product) {\r\n sessionFactory.getCurrentSession()\r\n .save(product);\r\n }", "@GetMapping(path = \"/products/{id}\")\n Product getProductById(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @PathVariable Long id);" ]
[ "0.75045645", "0.75045645", "0.7435943", "0.73872286", "0.738021", "0.7374757", "0.7336685", "0.7189181", "0.71691877", "0.710464", "0.70614845", "0.7011986", "0.7002974", "0.6948302", "0.69181514", "0.6902543", "0.68711853", "0.68702215", "0.6850991", "0.68392867", "0.6806011", "0.6800329", "0.6793859", "0.6785889", "0.67838895", "0.6779147", "0.67719555", "0.6739294", "0.6705494", "0.66747886", "0.6649208", "0.6637445", "0.6636246", "0.66320604", "0.6621505", "0.66131234", "0.6610445", "0.660744", "0.6604514", "0.66008663", "0.6592551", "0.6583048", "0.6574712", "0.65742475", "0.6567441", "0.65656966", "0.6561567", "0.6558201", "0.6557925", "0.65561795", "0.65549475", "0.65501815", "0.65488845", "0.6544391", "0.65355873", "0.6521895", "0.65123236", "0.650847", "0.65071625", "0.65012443", "0.6496517", "0.64962083", "0.6490886", "0.6486601", "0.64857316", "0.6479015", "0.6476728", "0.6467965", "0.6462442", "0.6461281", "0.6453372", "0.64426214", "0.64415365", "0.64354646", "0.64342517", "0.6428928", "0.64243704", "0.64108545", "0.6406529", "0.64064103", "0.64054996", "0.6402818", "0.6384626", "0.6381125", "0.6378275", "0.63779694", "0.63701946", "0.636997", "0.63650346", "0.6346454", "0.6343681", "0.6343681", "0.63430434", "0.6335436", "0.63323563", "0.63231075", "0.63155454", "0.63115853", "0.6304139", "0.6300977" ]
0.70770526
10
Created by fowafolo Date: 16/5/25 Time: 17:03
public interface PopDAO extends GeneralDAO<PopTable> { public List<PopTable> getPopRankList(int limit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo38117a() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo4359a() {\n }", "private void poetries() {\n\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public void mo21877s() {\n }", "public void mo12930a() {\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 }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "public void mo55254a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo1531a() {\n }", "public void mo12628c() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void method_4270() {}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public static void listing5_14() {\n }", "public void mo3749d() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo21878t() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public Pitonyak_09_02() {\r\n }", "public void mo21785J() {\n }", "public void gored() {\n\t\t\n\t}", "zzang mo29839S() throws RemoteException;", "private void kk12() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo3376r() {\n }", "public void mo21794S() {\n }", "static void feladat6() {\n\t}", "public void mo5382o() {\n }", "public void mo21825b() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "public void mo21779D() {\n }", "public void mo115190b() {\n }", "public void mo23813b() {\n }", "public void mo21783H() {\n }", "public void mo9848a() {\n }", "public void mo21795T() {\n }", "static void feladat4() {\n\t}", "static void feladat9() {\n\t}", "static void feladat7() {\n\t}", "public void skystonePos6() {\n }", "public void mo21782G() {\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"\", defaultDBTable0, 34, \"\");\n ColumnDescriptorList columnDescriptorList0 = new ColumnDescriptorList();\n columnDescriptorList0.add((DBColumn) defaultDBColumn0);\n String string0 = SQLUtil.renderColumnNames((List<DBColumn>) columnDescriptorList0);\n assertEquals(\"\", string0);\n }", "static void feladat5() {\n\t}", "public void mo21793R() {\n }", "@Override\n public int describeContents() { return 0; }", "public void mo44053a() {\n }", "public abstract void mo56925d();", "zzafe mo29840Y() throws RemoteException;", "@Override\n protected void getExras() {\n }", "public final void mo91715d() {\n }", "public void mo115188a() {\n }", "@Override\n public Date getCreated()\n {\n return null;\n }", "zzana mo29855eb() throws RemoteException;", "private void m50367F() {\n }", "public void mo56167c() {\n }", "public void mo97908d() {\n }", "@Override\n public void memoria() {\n \n }", "public String getName() {\n/* 50 */ return \"M\";\n/* */ }", "public static void listing5_16() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "public void skystonePos4() {\n }", "public void mo1403c() {\n }", "public void mo21787L() {\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"alter sessionrefereznces\", (DBTable) null, (-280560848), \"*2{\");\n DBColumn[] dBColumnArray0 = new DBColumn[1];\n dBColumnArray0[0] = (DBColumn) defaultDBColumn0;\n String string0 = SQLUtil.renderColumnNames(dBColumnArray0);\n assertEquals(\"alter sessionrefereznces\", string0);\n }", "public static void listing5_15() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo13682d();", "private void getStatus() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "public abstract String mo118046b();", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"dKop matrUalized view\", (DBTable) null, 149, \"org.h2.store.LobStorage\");\n SQLUtil.renderColumnTypeWithSize((DBColumn) defaultDBColumn0, stringBuilder0);\n assertEquals(\"ORG.H2.STORE.LOBSTORAGE\", stringBuilder0.toString());\n }", "@Override\n public int getOrder() {\n return 4;\n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo21791P() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}" ]
[ "0.5458822", "0.5441621", "0.53577024", "0.534927", "0.5342813", "0.5336522", "0.5327996", "0.52702534", "0.52671", "0.52478033", "0.52478033", "0.52478033", "0.52478033", "0.52478033", "0.52478033", "0.52478033", "0.5240445", "0.5213676", "0.5212339", "0.5208812", "0.5195765", "0.5175357", "0.5168904", "0.5167538", "0.51556164", "0.51405597", "0.5117709", "0.5103568", "0.50995284", "0.5097354", "0.5086205", "0.5086205", "0.50841826", "0.5081252", "0.508121", "0.50802046", "0.50737935", "0.5063691", "0.50480336", "0.5041464", "0.5024441", "0.50236905", "0.50229603", "0.5020212", "0.50164145", "0.50109273", "0.50073713", "0.5005774", "0.500307", "0.5000704", "0.4999669", "0.49978787", "0.499723", "0.4993506", "0.49880284", "0.4987892", "0.4978505", "0.4977464", "0.49666733", "0.49631745", "0.49629694", "0.4938223", "0.4931448", "0.49311146", "0.49269727", "0.49269664", "0.49238798", "0.49161738", "0.4916037", "0.49138665", "0.49134585", "0.49130192", "0.49086535", "0.49072504", "0.4901963", "0.48968408", "0.48961794", "0.48951215", "0.48926464", "0.4892328", "0.48863596", "0.48843232", "0.48809737", "0.4879874", "0.487448", "0.48656103", "0.48611176", "0.48589018", "0.48541215", "0.48503742", "0.48495775", "0.4846641", "0.48450366", "0.48442262", "0.48432878", "0.48427552", "0.48394895", "0.48381975", "0.4835122", "0.48349327", "0.48347104" ]
0.0
-1